|  | @@ -20,10 +20,11 @@ import CommitAuditModal from './CommitAuditModal';
 | 
	
		
			
				|  |  |  import CommentContent from '@/components/CommentContent';
 | 
	
		
			
				|  |  |  import MergeModal from './MergeModal';
 | 
	
		
			
				|  |  |  import { GetTokenFromUrl, getToken } from '@/utils/utils';
 | 
	
		
			
				|  |  | -import { queryDetail } from '@/services/boom';
 | 
	
		
			
				|  |  | +import { queryDetail, queryDingInstanceExecute } 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';
 | 
	
		
			
				|  |  |  const LocalData = localStorage.luckysheet;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  const { Option } = Select;
 | 
	
	
		
			
				|  | @@ -349,7 +350,7 @@ function Detail(props) {
 | 
	
		
			
				|  |  |      });
 | 
	
		
			
				|  |  |    };
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -  const onApprove = flag => {
 | 
	
		
			
				|  |  | +  const onApprove = (flag, taskId) => {
 | 
	
		
			
				|  |  |      if (!flag) {
 | 
	
		
			
				|  |  |        setAuditVisible(true);
 | 
	
		
			
				|  |  |        return;
 | 
	
	
		
			
				|  | @@ -391,9 +392,10 @@ function Detail(props) {
 | 
	
		
			
				|  |  |          );
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  | -    Modal.confirm({
 | 
	
		
			
				|  |  | +    /*Modal.confirm({
 | 
	
		
			
				|  |  |        title: '提示',
 | 
	
		
			
				|  |  | -      content: isSingle
 | 
	
		
			
				|  |  | +      content: 
 | 
	
		
			
				|  |  | +      isSingle
 | 
	
		
			
				|  |  |          ? `节点【${serviceNode.label}】只能拥有一个清单,是否覆盖?`
 | 
	
		
			
				|  |  |          : `是否通过审批。`,
 | 
	
		
			
				|  |  |        okText: '确定',
 | 
	
	
		
			
				|  | @@ -439,6 +441,47 @@ function Detail(props) {
 | 
	
		
			
				|  |  |            },
 | 
	
		
			
				|  |  |          });
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  | +    });*/
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    const callback = () => {
 | 
	
		
			
				|  |  | +      // 更新flow流程图
 | 
	
		
			
				|  |  | +      dispatch({
 | 
	
		
			
				|  |  | +        type: 'xflow/queryBoomFlowDetail',
 | 
	
		
			
				|  |  | +        payload: {
 | 
	
		
			
				|  |  | +          id: templateId,
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  | +      });
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      // 更新审批流
 | 
	
		
			
				|  |  | +      dispatch({
 | 
	
		
			
				|  |  | +        type: 'detail/queryDingInstanceDetail',
 | 
	
		
			
				|  |  | +        payload: {
 | 
	
		
			
				|  |  | +          process_instance_id: version.ding_instance_id, //创建表单成功返回的id
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  | +      });
 | 
	
		
			
				|  |  | +    };
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    Modal.confirm({
 | 
	
		
			
				|  |  | +      title: '提示',
 | 
	
		
			
				|  |  | +      content: isSingle
 | 
	
		
			
				|  |  | +        ? `节点【${serviceNode.label}】只能拥有一个清单,是否覆盖?`
 | 
	
		
			
				|  |  | +        : `是否通过审批。`,
 | 
	
		
			
				|  |  | +      okText: '确定',
 | 
	
		
			
				|  |  | +      cancelText: '取消',
 | 
	
		
			
				|  |  | +      onOk: async () => {
 | 
	
		
			
				|  |  | +        let param = {
 | 
	
		
			
				|  |  | +          request: {
 | 
	
		
			
				|  |  | +            process_instance_id: version.ding_instance_id,
 | 
	
		
			
				|  |  | +            result: flag ? 'agree' : 'refuse',
 | 
	
		
			
				|  |  | +            actioner_userid: currentUser.DingUserId || getCurrentUser()?.DingUserId,
 | 
	
		
			
				|  |  | +            task_id: taskId,
 | 
	
		
			
				|  |  | +          },
 | 
	
		
			
				|  |  | +        };
 | 
	
		
			
				|  |  | +        let res = await queryDingInstanceExecute(param);
 | 
	
		
			
				|  |  | +        if (res?.data?.result) {
 | 
	
		
			
				|  |  | +          callback();
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  |      });
 | 
	
		
			
				|  |  |    };
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -881,6 +924,12 @@ function Detail(props) {
 | 
	
		
			
				|  |  |      dispatch({
 | 
	
		
			
				|  |  |        type: 'user/fetch',
 | 
	
		
			
				|  |  |      });
 | 
	
		
			
				|  |  | +    dispatch({
 | 
	
		
			
				|  |  | +      type: 'detail/queryListParentByUser',
 | 
	
		
			
				|  |  | +      payload: {
 | 
	
		
			
				|  |  | +        userid: currentUser.DingUserId || getCurrentUser()?.DingUserId,
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +    });
 | 
	
		
			
				|  |  |    }, []);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |    useEffect(() => {
 | 
	
	
		
			
				|  | @@ -955,18 +1004,8 @@ function Detail(props) {
 | 
	
		
			
				|  |  |          />
 | 
	
		
			
				|  |  |        </div>
 | 
	
		
			
				|  |  |        {/* <TimeNode flow={flow} isAuditor={isAuditor} onApprove={onApprove}></TimeNode> */}
 | 
	
		
			
				|  |  | -      {version.flow_id ? (
 | 
	
		
			
				|  |  | -        <AuditFlow
 | 
	
		
			
				|  |  | -          {...auditDetail}
 | 
	
		
			
				|  |  | -          // status={auditDetail.status}
 | 
	
		
			
				|  |  | -          // processCode={auditDetail.processCode}
 | 
	
		
			
				|  |  | -          // deptId={auditDetail.deptId}
 | 
	
		
			
				|  |  | -          // userId={auditDetail.userId}
 | 
	
		
			
				|  |  | -          // tasks={auditDetail.tasks}
 | 
	
		
			
				|  |  | -          // cc_userids={auditDetail.cc_userids}
 | 
	
		
			
				|  |  | -          // formComponentValues={auditDetail.formComponentValues}
 | 
	
		
			
				|  |  | -        />
 | 
	
		
			
				|  |  | -      ) : null}
 | 
	
		
			
				|  |  | +      {version.flow_id ? <AuditFlow {...auditDetail} onApprove={onApprove} /> : null}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |        {/* {renderAlert()} */}
 | 
	
		
			
				|  |  |        {/* 判断是否为比对模式 */}
 | 
	
		
			
				|  |  |        {compareList.length == 2 ? (
 |