|  | @@ -1,7 +1,7 @@
 | 
	
		
			
				|  |  | -import React, {useEffect, useState, useRef, useMemo} from 'react';
 | 
	
		
			
				|  |  | -import {UnorderedListOutlined, PlusOutlined, InfoOutlined} from '@ant-design/icons';
 | 
	
		
			
				|  |  | -import {Button, Modal, message, Alert, Avatar} from 'antd';
 | 
	
		
			
				|  |  | -import {connect} from 'dva';
 | 
	
		
			
				|  |  | +import React, { useEffect, useState, useRef, useMemo } from 'react';
 | 
	
		
			
				|  |  | +import { UnorderedListOutlined, PlusOutlined, InfoOutlined } from '@ant-design/icons';
 | 
	
		
			
				|  |  | +import { Button, Modal, message, Alert, Avatar } from 'antd';
 | 
	
		
			
				|  |  | +import { connect } from 'dva';
 | 
	
		
			
				|  |  |  import styles from './Index.less';
 | 
	
		
			
				|  |  |  import LuckySheet from './LuckySheet';
 | 
	
		
			
				|  |  |  import AuditModal from './AuditModal';
 | 
	
	
		
			
				|  | @@ -18,7 +18,7 @@ import VersionModal from './VersionModal';
 | 
	
		
			
				|  |  |  import CommitAuditModal from './CommitAuditModal';
 | 
	
		
			
				|  |  |  import CommentContent from '@/components/CommentContent';
 | 
	
		
			
				|  |  |  import MergeModal from './MergeModal';
 | 
	
		
			
				|  |  | -import {GetTokenFromUrl, getToken} from '@/utils/utils';
 | 
	
		
			
				|  |  | +import { GetTokenFromUrl, getToken } from '@/utils/utils';
 | 
	
		
			
				|  |  |  import {
 | 
	
		
			
				|  |  |    getAuditDetail,
 | 
	
		
			
				|  |  |    queryDelSheetRecord,
 | 
	
	
		
			
				|  | @@ -28,15 +28,15 @@ import {
 | 
	
		
			
				|  |  |  } from '@/services/boom';
 | 
	
		
			
				|  |  |  import HistoryDrawer from './HistoryDrawer';
 | 
	
		
			
				|  |  |  import AuditFlow from './AuditFlow';
 | 
	
		
			
				|  |  | -import {getCurrentUser} from '@/utils/authority';
 | 
	
		
			
				|  |  | -import {async} from '@antv/x6/es/registry/marker/async';
 | 
	
		
			
				|  |  | +import { getCurrentUser } from '@/utils/authority';
 | 
	
		
			
				|  |  | +import { async } from '@antv/x6/es/registry/marker/async';
 | 
	
		
			
				|  |  |  import FileViewerModal from '@/components/FileViewer';
 | 
	
		
			
				|  |  |  import PreviewFile from '@/components/PreviewFile';
 | 
	
		
			
				|  |  |  import FormAndFilesNode from './FormAndFilesNode';
 | 
	
		
			
				|  |  |  import DropdownMenu from './DropdownMenu';
 | 
	
		
			
				|  |  |  import CurrentInfo from './CurrentInfo';
 | 
	
		
			
				|  |  |  import moment from 'moment';
 | 
	
		
			
				|  |  | -import {LocalStorage} from "@antv/x6";
 | 
	
		
			
				|  |  | +import { LocalStorage } from '@antv/x6';
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  const LocalData = localStorage.luckysheet;
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -49,8 +49,8 @@ function Detail(props) {
 | 
	
		
			
				|  |  |      auditList,
 | 
	
		
			
				|  |  |      flowDetail,
 | 
	
		
			
				|  |  |      versionTree,
 | 
	
		
			
				|  |  | -    match: {params},
 | 
	
		
			
				|  |  | -    location: {query},
 | 
	
		
			
				|  |  | +    match: { params },
 | 
	
		
			
				|  |  | +    location: { query },
 | 
	
		
			
				|  |  |      instanceDetail,
 | 
	
		
			
				|  |  |      typeOptions,
 | 
	
		
			
				|  |  |      classifyList,
 | 
	
	
		
			
				|  | @@ -112,8 +112,8 @@ function Detail(props) {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |    const projectId = parseInt(params.projectId);
 | 
	
		
			
				|  |  |    const templateId = parseInt(params.templateId);
 | 
	
		
			
				|  |  | -  const versionID = parseInt(query.version_id);
 | 
	
		
			
				|  |  | -  const TOKEN = query['JWT-TOKEN']
 | 
	
		
			
				|  |  | +  const excelID = parseInt(query.excel_id);
 | 
	
		
			
				|  |  | +  const TOKEN = query['JWT-TOKEN'];
 | 
	
		
			
				|  |  |    if (!localStorage.getItem('JWT-TOKEN')) {
 | 
	
		
			
				|  |  |      localStorage['JWT-TOKEN'] = TOKEN;
 | 
	
		
			
				|  |  |    }
 | 
	
	
		
			
				|  | @@ -273,7 +273,7 @@ function Detail(props) {
 | 
	
		
			
				|  |  |      await queryDelSheetRecord(params);
 | 
	
		
			
				|  |  |    };
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -  const onAudit = ({audit_comment, audit_status}) => {
 | 
	
		
			
				|  |  | +  const onAudit = ({ audit_comment, audit_status }) => {
 | 
	
		
			
				|  |  |      const flowNode = flow.currentNode;
 | 
	
		
			
				|  |  |      dispatch({
 | 
	
		
			
				|  |  |        type: 'detail/approve',
 | 
	
	
		
			
				|  | @@ -309,7 +309,7 @@ function Detail(props) {
 | 
	
		
			
				|  |  |          } else {
 | 
	
		
			
				|  |  |            dispatch({
 | 
	
		
			
				|  |  |              type: 'authList/queryAuthList',
 | 
	
		
			
				|  |  | -            payloda: {user_id: currentUser.ID},
 | 
	
		
			
				|  |  | +            payloda: { user_id: currentUser.ID },
 | 
	
		
			
				|  |  |            });
 | 
	
		
			
				|  |  |            localStorage.excelId = newVersion.id;
 | 
	
		
			
				|  |  |            setVersion({
 | 
	
	
		
			
				|  | @@ -321,7 +321,7 @@ function Detail(props) {
 | 
	
		
			
				|  |  |          //更新未审批列表
 | 
	
		
			
				|  |  |          dispatch({
 | 
	
		
			
				|  |  |            type: 'authList/queryAuthList',
 | 
	
		
			
				|  |  | -          payloda: {user_id: currentUser.ID},
 | 
	
		
			
				|  |  | +          payloda: { user_id: currentUser.ID },
 | 
	
		
			
				|  |  |          });
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |      });
 | 
	
	
		
			
				|  | @@ -406,13 +406,13 @@ function Detail(props) {
 | 
	
		
			
				|  |  |        localStorage.excelId = version.id;
 | 
	
		
			
				|  |  |        localStorage.excelItem = JSON.stringify(version);
 | 
	
		
			
				|  |  |      } else {
 | 
	
		
			
				|  |  | -      version = await getAuditDetail({userId: currentUser.ID, versionID})
 | 
	
		
			
				|  |  | +      version = await getAuditDetail({ userId: currentUser.ID, excelID });
 | 
	
		
			
				|  |  |        if (!version) {
 | 
	
		
			
				|  |  |          const excelId = localStorage.excelItem
 | 
	
		
			
				|  |  |            ? JSON.parse(localStorage.excelItem)
 | 
	
		
			
				|  |  |            : localStorage.excelId;
 | 
	
		
			
				|  |  |          if (typeof excelId === 'object') {
 | 
	
		
			
				|  |  | -          changeVersion(excelId)
 | 
	
		
			
				|  |  | +          changeVersion(excelId);
 | 
	
		
			
				|  |  |            return;
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |        }
 | 
	
	
		
			
				|  | @@ -448,8 +448,7 @@ function Detail(props) {
 | 
	
		
			
				|  |  |          userRef.current = newUser;
 | 
	
		
			
				|  |  |          setUser(newUser);
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  | -    } catch (error) {
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | +    } catch (error) {}
 | 
	
		
			
				|  |  |    };
 | 
	
		
			
				|  |  |    const handleSubmitCell = (value, callback) => {
 | 
	
		
			
				|  |  |      if (!value) return;
 | 
	
	
		
			
				|  | @@ -505,7 +504,7 @@ function Detail(props) {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |    useEffect(() => {
 | 
	
		
			
				|  |  |      if (compareList.length == 2) {
 | 
	
		
			
				|  |  | -      const callback = ({diff, add}) => {
 | 
	
		
			
				|  |  | +      const callback = ({ diff, add }) => {
 | 
	
		
			
				|  |  |          setUpdateCount(updateCount => {
 | 
	
		
			
				|  |  |            return {
 | 
	
		
			
				|  |  |              diff: diff.length,
 | 
	
	
		
			
				|  | @@ -520,9 +519,9 @@ function Detail(props) {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |    useEffect(() => {
 | 
	
		
			
				|  |  |      // if (versionList.length == 0) return;
 | 
	
		
			
				|  |  | -    if (!currentUser.ID) return
 | 
	
		
			
				|  |  | +    if (!currentUser.ID) return;
 | 
	
		
			
				|  |  |      if (!version.id) {
 | 
	
		
			
				|  |  | -      changeVersion(versionID);
 | 
	
		
			
				|  |  | +      changeVersion(excelID);
 | 
	
		
			
				|  |  |      } else {
 | 
	
		
			
				|  |  |        changeVersion(version.id);
 | 
	
		
			
				|  |  |      }
 | 
	
	
		
			
				|  | @@ -532,7 +531,7 @@ function Detail(props) {
 | 
	
		
			
				|  |  |      <>
 | 
	
		
			
				|  |  |        <div className={styles.top}>
 | 
	
		
			
				|  |  |          <div>
 | 
	
		
			
				|  |  | -          <Button type="primary" style={{marginRight: 20}} onClick={() => setFlowVisible(true)}>
 | 
	
		
			
				|  |  | +          <Button type="primary" style={{ marginRight: 20 }} onClick={() => setFlowVisible(true)}>
 | 
	
		
			
				|  |  |              查看流程
 | 
	
		
			
				|  |  |            </Button>
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -542,10 +541,10 @@ function Detail(props) {
 | 
	
		
			
				|  |  |                新建清单
 | 
	
		
			
				|  |  |              </Button>
 | 
	
		
			
				|  |  |            )}
 | 
	
		
			
				|  |  | -          <CurrentInfo version={version} flowDetail={flowDetail}/>
 | 
	
		
			
				|  |  | +          <CurrentInfo version={version} flowDetail={flowDetail} />
 | 
	
		
			
				|  |  |          </div>
 | 
	
		
			
				|  |  |          <div className={styles.btns}>
 | 
	
		
			
				|  |  | -          {saveTime && <span style={{color: '#333', fontSize: 14}}>上次保存时间 {saveTime}</span>}
 | 
	
		
			
				|  |  | +          {saveTime && <span style={{ color: '#333', fontSize: 14 }}>上次保存时间 {saveTime}</span>}
 | 
	
		
			
				|  |  |            {version.audit_status === 0 && (
 | 
	
		
			
				|  |  |              <Button type="primary" loading={loading.effects['detail/saveSheet']} onClick={onUpdate}>
 | 
	
		
			
				|  |  |                保存
 | 
	
	
		
			
				|  | @@ -553,16 +552,16 @@ function Detail(props) {
 | 
	
		
			
				|  |  |            )}
 | 
	
		
			
				|  |  |            <Button
 | 
	
		
			
				|  |  |              type="primary"
 | 
	
		
			
				|  |  | -            style={{marginRight: 20}}
 | 
	
		
			
				|  |  | +            style={{ marginRight: 20 }}
 | 
	
		
			
				|  |  |              onClick={() => setVersionTreeVisible(true)}
 | 
	
		
			
				|  |  |            >
 | 
	
		
			
				|  |  |              历史版本
 | 
	
		
			
				|  |  |            </Button>
 | 
	
		
			
				|  |  | -          <Avatar.Group style={{marginRight: 20}}>
 | 
	
		
			
				|  |  | +          <Avatar.Group style={{ marginRight: 20 }}>
 | 
	
		
			
				|  |  |              {user.map((item, id) => (
 | 
	
		
			
				|  |  |                <Avatar
 | 
	
		
			
				|  |  |                  key={`${id}-${item.name}`}
 | 
	
		
			
				|  |  | -                style={{backgroundColor: '#008dff'}}
 | 
	
		
			
				|  |  | +                style={{ backgroundColor: '#008dff' }}
 | 
	
		
			
				|  |  |                  size="large"
 | 
	
		
			
				|  |  |                >
 | 
	
		
			
				|  |  |                  {item.Name}
 | 
	
	
		
			
				|  | @@ -586,11 +585,11 @@ function Detail(props) {
 | 
	
		
			
				|  |  |          <input
 | 
	
		
			
				|  |  |            type="file"
 | 
	
		
			
				|  |  |            ref={fileRef}
 | 
	
		
			
				|  |  | -          style={{display: 'none'}}
 | 
	
		
			
				|  |  | +          style={{ display: 'none' }}
 | 
	
		
			
				|  |  |            onChange={e => exportExcl(e.target.files)}
 | 
	
		
			
				|  |  |          />
 | 
	
		
			
				|  |  |        </div>
 | 
	
		
			
				|  |  | -      <div style={{display: 'flex'}}>
 | 
	
		
			
				|  |  | +      <div style={{ display: 'flex' }}>
 | 
	
		
			
				|  |  |          <div
 | 
	
		
			
				|  |  |            className={styles.content}
 | 
	
		
			
				|  |  |            style={{
 | 
	
	
		
			
				|  | @@ -726,7 +725,7 @@ function Detail(props) {
 | 
	
		
			
				|  |  |    );
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -export default connect(({detail, user, xflow, loading}) => ({
 | 
	
		
			
				|  |  | +export default connect(({ detail, user, xflow, loading }) => ({
 | 
	
		
			
				|  |  |    flowDetail: xflow.flowDetail,
 | 
	
		
			
				|  |  |    auditList: detail.auditList,
 | 
	
		
			
				|  |  |    instanceDetail: detail.dingInstanceDetail,
 |