ソースを参照

修改查看流程/历史版本

Renxy 2 年 前
コミット
d06b6ae6af

+ 1 - 0
src/components/Flow/config-toolbar.ts

@@ -235,6 +235,7 @@ namespace NSToolbarConfig {
                 };
               });
               console.log(data);
+              console.log(JSON.stringify(data));
               localStorage.graphData = JSON.stringify(data);
               return null;
             },

+ 7 - 6
src/pages/PurchaseAdmin/PurchaseList/Detail/CommitAuditModal.js

@@ -25,6 +25,10 @@ function CommitAuditModal(props) {
     if(data.length <= 0) setAuditId(currentId)
     setData(data)
   }, [auditId, version.template_node_id])
+  
+  useEffect(()=>{
+    form.resetFields()
+  },[visible])
 
   const treeData = (currentId) => {
     const list = getNextNodes(currentId,'custom-circle');
@@ -32,11 +36,11 @@ function CommitAuditModal(props) {
       const re = nodes?.forEach((item, idx)=>{
         const data = getNextNodes(item.Id,'custom-circle');
         if(data || data.length > 0) list.push(...data);
-        fun(nodes[idx].children)
+        fun(data)
       })
     }
     fun(list)
-    
+    console.log(list)
     const fun2 = (list) => {
       const parents = list.filter(item=>list.findIndex(node=>node.Id == item.parentId) == -1)
       let translator = (parents, children) => {
@@ -105,7 +109,6 @@ function CommitAuditModal(props) {
         if(!curId) return;
         let data = {}
         let approvalNode = flowDetail.nodes.find?.(item => item.Id == curId);
-        console.log("approvalNode==========================",approvalNode)
         data.template_id = version.template_id;
         data.flow_id = approvalNode?.flow_id || 0;
         data.node_level_id = approvalNode?.flow_id ? 1 : 0;
@@ -121,7 +124,6 @@ function CommitAuditModal(props) {
       return itemData
     }
     let  result = Object.values(fieldsValue).map(item=> {if(item && Array.isArray(item)) return item}).filter(item=>item)
-    // console.log(result)
     let serviceNode = flowDetail.nodes.find?.(
       item => item.Id == fieldsValue.next_template_node_id
     );
@@ -166,13 +168,12 @@ function CommitAuditModal(props) {
     //   }
     
     // setAuditId();
-    form.resetFields()
     onOk(params);
   }
 
   const CascaderNode = (index) => {
     return(
-      <Form.Item labelCol={{ span: 7 }} wrapperCol={{ span: 15 }} label={`审批节点${index}`} name={`circle${index}`} key={`circle${index}`}>
+      <Form.Item labelCol={{ span: 7 }} wrapperCol={{ span: 15 }} label={`审批节点${index+1}`} name={`circle${index}`} key={`circle${index}`}>
         <Cascader style={{ width: '100%' }}  options={data} onChange={onChange} />
       </Form.Item>
     )

+ 66 - 9
src/pages/PurchaseAdmin/PurchaseList/Detail/FlowModal.js

@@ -1,5 +1,5 @@
 import React, { useEffect, useState, useRef, useMemo } from 'react';
-import { Modal, Input, Select, List, Row, Col, Table, message } from 'antd';
+import { Modal, Input, Select, List, Row, Col, Table, message, Steps, Space, Button } from 'antd';
 import Flow from '@/components/Flow/index';
 import { connect } from 'dva';
 import { GetTokenFromUrl, getToken } from '@/utils/utils';
@@ -7,15 +7,19 @@ import { MODELS, useXFlowApp, useModelAsync } from '@antv/xflow';
 import { CheckOutlined } from '@ant-design/icons';
 import { queryVserionByNode } from '@/services/boom';
 import { async } from '@antv/x6/lib/registry/marker/async';
+const { Step } = Steps;
 
 const { TextArea } = Input;
 const localData = JSON.parse(localStorage.ggDetaiData || '{}');
 
 // 提交
 function FlowModal(props) {
-  const { visible, version, onClose, onChangeVersion, form, loading, flowDetail } = props;
+  const { visible, version, onClose, onChangeVersion, form, loading, flowDetail, dispatch } = props;
   const [data, setData] = useState([]);
   const [nodeLoading, setNodeLoading] = useState(false);
+  const [pageSize, setPageSize] = useState(9)
+  const [stepsData, setStepsData] = useState([])
+  const [auditvisible, setAuditVisible] = useState(false);
   // const app = useXFlowApp();
   // const appRef = userRef()
 
@@ -30,6 +34,10 @@ function FlowModal(props) {
     };
   }, [flowDetail, version.template_node_id]);
 
+  useEffect(() => {
+    if(!visible) setAuditVisible(false);
+  }, [visible, version])
+
   const handleSelectNode = async args => {
     let res;
     const id = args.nodeId || args.nodeIds[0];
@@ -41,22 +49,52 @@ function FlowModal(props) {
       let data = [];
       Object.values(res.data.excel_version).map(arr => {
         if (res.data.flow_id) {
-          data = [...data, arr[0]];
+          data = [...data, {...arr[0], flow_id:res.data.flow_id}];
+          console.log(data)
         } else {
           data = [...data, ...arr];
         }
       });
       //解决key报错问题
       data.forEach((item, id)=>data[id].key=`${id}-${item.name}`)
+      console.log(data.length)
       setData(data);
     } catch (error) {
       console.log(error);
     }
     setNodeLoading(false);
+    setAuditVisible(false);
+  };
+
+  const updateSteps = (data) => {
+    let newData = []
+    data?.forEach(item => {
+      let list = {
+        current: item.audit_status == 0 ? item.audit_status : item.audit_status-1,
+        list:item.FlowInfo.FlowNodes,
+        name:item.FlowInfo.name,
+      }
+      newData.push(list);
+    })
+    setStepsData(newData)
+    setPageSize(pageSize - data.length)
   };
-  const handleChangeClick = (audit_status) => {
-    if(audit_status != 1) return
+
+  const handleChangeClick = (item) => {
     message.success('哈哈哈哈')
+    dispatch({
+      type: 'detail/queryAuditExcel',
+      payload: {
+        excel_id: item.id,
+        // project_id: item.project_id,
+        // template_id:item.template_id,
+        // template_node_id:item.template_node_id,
+      },
+      callback: res => {
+        updateSteps(res);
+      },
+    });
+    setAuditVisible(true)
   }
   const columns = useMemo(() => {
     return [
@@ -74,7 +112,7 @@ function FlowModal(props) {
         title: '状态',
         width: '33%',
         render: item => {
-          let style = { color: getColor(item) };
+          let style = {  color: getColor(item) };
           let txt = '';
           switch (item.audit_status) {
             case 0:
@@ -93,7 +131,11 @@ function FlowModal(props) {
               txt = '已提交';
               break;
           }
-          return <span style={style} onClick={()=>handleChangeClick(item.audit_status)}>{txt}</span>;
+          return <Button onClick={()=>handleChangeClick(item)}>{txt}</Button>
+          // (item.audit_status == 1 || item.audit_status == 4) ? 
+          //   <Button onClick={()=>handleChangeClick(item)}>{txt}</Button> :
+          //   <span style={style} >{txt}</span>
+              
         },
       },
       {
@@ -127,8 +169,23 @@ function FlowModal(props) {
         <Col span={18}>
           <Flow meta={{ type: 'view' }} flowDetail={graphData} onSelectNode={handleSelectNode} />
         </Col>
-        <Col span={6}>
-          <Table columns={columns} dataSource={data} loading={nodeLoading} bordered={false} />
+        <Col span={6} >
+          <div style={{width:'100%'}}>
+            <Table style={{maxHeight:'90%'}} columns={columns} dataSource={data} loading={nodeLoading} bordered={false} pagination={{ pageSize}}/>
+          </div>
+          <Space direction="vertical" size='8' style={{ display: auditvisible ? 'flex' : 'none' }}>
+            {stepsData.map((item ,idx)=> <div key={`${item.name}_${idx}`} style={{marginBottom:'8px'}}>
+              <div style={{marginBottom:'4px'}}>{item.name}</div>
+              <Steps size='small' current={item.current} >
+                {item.list.map(node => 
+                  <Step
+                    key={`${node.id}_${node.node}`}
+                    title={node.node}
+                  />
+                )}
+              </Steps>
+            </div>)}
+          </Space>
         </Col>
       </Row>
     </Modal>

+ 34 - 42
src/pages/PurchaseAdmin/PurchaseList/Detail/HistoryDrawer.js

@@ -12,14 +12,10 @@ function HistoryDrawer(props) {
   const {
     visible,
     onClose,
-    comment,
-    bomComment,
-    addComment,
     version,
     loading,
     dispatch,
-    userList,
-    cellPosition,
+    versionTree,
   } = props;
   const columns = useMemo(() => {
     return [
@@ -27,38 +23,38 @@ function HistoryDrawer(props) {
         title: '名称',
         width: '33%',
         render: item => (
-          <div style={{ color: item.audit_status != 0 ? '#9b9b9b' : '' }}>
-            {item.id == version.id && <CheckOutlined style={{ marginRight: 10 }} />}
-            {item.version_name}
+          <div style={{ color: '#9b9b9b'}}>
+            {/* {item.id == version.id && <dix style={{ marginRight: 10 }} />} */}
+            {`${item.version_name}.${item.version_no}`}
           </div>
         ),
       },
-      {
-        title: '状态',
-        width: '33%',
-        render: item => {
-          let style = { color: getColor(item) };
-          let txt = '';
-          switch (item.audit_status) {
-            case 0:
-              txt = '未提交';
-              break;
-            case 1:
-              txt = '待审批';
-              break;
-            case 2:
-              txt = '拒绝';
-              break;
-            case 3:
-              txt = '通过';
-              break;
-            case 4:
-              txt = '已提交';
-              break;
-          }
-          return <span style={style}>{txt}</span>;
-        },
-      },
+      // {
+      //   title: '状态',
+      //   width: '33%',
+      //   render: item => {
+      //     let style = { color: getColor(item) };
+      //     let txt = '';
+      //     switch (item.audit_status) {
+      //       case 0:
+      //         txt = '未提交';
+      //         break;
+      //       case 1:
+      //         txt = '待审批';
+      //         break;
+      //       case 2:
+      //         txt = '拒绝';
+      //         break;
+      //       case 3:
+      //         txt = '通过';
+      //         break;
+      //       case 4:
+      //         txt = '已提交';
+      //         break;
+      //     }
+      //     return <span style={style}>{txt}</span>;
+      //   },
+      // },
       {
         title: '操作',
         render: item =>
@@ -100,13 +96,9 @@ function HistoryDrawer(props) {
   //   });
   // };
 
-  // useEffect(() => {
-  //   if (!version.id || !visible) return;
-  //   dispatch({
-  //     type: 'detail/queryBomComment',
-  //     payload: { excel_id: version.id },
-  //   });
-  // }, [version.id,visible]);
+  useEffect(() => {
+    console.log("====================================",versionTree)
+  }, [version.id]);
 
   return (
     <Drawer
@@ -117,7 +109,7 @@ function HistoryDrawer(props) {
       onClose={onClose}
       visible={visible}
     >
-      {/* <Table columns={columns} dataSource={data} loading={nodeLoading} bordered={false} /> */}
+      <Table columns={columns} dataSource={versionTree} bordered={false} />
     </Drawer>
   );
 }

+ 30 - 17
src/pages/PurchaseAdmin/PurchaseList/Detail/Index.js

@@ -39,9 +39,10 @@ function Detail(props) {
     versionList,
     auditList,
     flowDetail,
+    versionTree,
     match: { params },
   } = props;
-  const [historyVisible, setHistoryVisible] = useState(false);
+  const [versionTreeVisible, setVersionTreeVisible] = useState(false);
   const [commentVisible, setCommentVisible] = useState(false);
   const [mergeVisible, setMergeVisible] = useState(false);
   const [compareVisible, setCompareVisible] = useState(false);
@@ -217,6 +218,7 @@ function Detail(props) {
   };
 
   const onCommit = (values, id) => {
+    console.log("=================================", values, id)
     let currentNode = flowDetail.nodes.find?.(item => item.Id == version.template_node_id);
     let currentData = sheetRef.current.getSheetJson().data;
     let sheets = JSON.parse(JSON.stringify(currentData));
@@ -250,6 +252,7 @@ function Detail(props) {
       new_version: '0',
       audit_status: 0,
       data: JSON.stringify(sheets),
+      base_id: version.id,
     };
     dispatch({
       type: 'detail/commitSheet',
@@ -376,13 +379,13 @@ function Detail(props) {
               },
             });
             if (flow.current == flow.list.FlowNodes.length - 1) {
-              // 最后一个审核节点通过后  需要更新version id
-              localStorage.excelId = newVersion.id;
-              setVersion({
-                ...version,
-                flow_id: newVersion.flow_id,
-                id: newVersion.id,
-              });
+              // 最后一个审核节点通过后  需要更新version id 不更不更,留在原地
+              // localStorage.excelId = newVersion.id;
+              // setVersion({
+              //   ...version,
+              //   flow_id: newVersion.flow_id,
+              //   id: newVersion.id,
+              // });
             }
           },
         });
@@ -722,6 +725,13 @@ function Detail(props) {
       localStorage.excelId = id;
     }
     setVersion(version);
+    //请求历史版本
+    dispatch({
+      type:'detail/queryVersionsTree',
+      payload: {
+        excel_id: version.id || localStorage.excelId,
+      },
+    })
 
     // 判断是否审批节点
     if (version.flow_id) {
@@ -744,12 +754,12 @@ function Detail(props) {
       callback: newVersion => {
         setCommitAuditVisible(false);
         // 更新version
-        localStorage.excelId = newVersion.id;
-        changeVersion({
-          ...version,
-          ...newVersion,
-          version_id: version.id
-        });
+        // localStorage.excelId = newVersion.id;
+        // changeVersion({
+        //   ...version,
+        //   ...newVersion,
+        //   version_id: version.id
+        // });
         // 更新flow流程图
         dispatch({
           type: 'xflow/queryBoomFlowDetail',
@@ -800,6 +810,7 @@ function Detail(props) {
     dispatch({
       type: 'user/fetch',
     });
+    
   }, []);
 
   useEffect(() => {
@@ -844,7 +855,7 @@ function Detail(props) {
           <span style={{ marginLeft: 20 }}>{renderNode()}</span>
         </div>
         <div className={styles.btns}> 
-          <Button type="primary" style={{ marginRight: 20 }} onClick={() => setHistoryVisible(true)}>
+          <Button type="primary" style={{ marginRight: 20 }} onClick={() => setVersionTreeVisible(true)}>
             历史版本
           </Button>
           <Avatar.Group style={{ marginRight: 20 }}>
@@ -892,9 +903,10 @@ function Detail(props) {
       )}
 
       <HistoryDrawer 
+        versionTree={versionTree}
          version={version}
-         visible={historyVisible}
-         onClose={() => setHistoryVisible(false)}
+         visible={versionTreeVisible}
+         onClose={() => setVersionTreeVisible(false)}
       />
 
       <CommentContent
@@ -974,5 +986,6 @@ export default connect(({ detail, user, xflow, loading }) => ({
   currentUser: user.currentUser,
   roleList: detail.roleList,
   versionList: detail.versionList,
+  versionTree: detail.versionTree,
   loading,
 }))(Detail);

+ 19 - 0
src/pages/PurchaseAdmin/PurchaseList/Detail/models/detail.js

@@ -28,6 +28,8 @@ import {
   queryBomComment,
   approve,
   queryAuthority,
+  queryVersionsTree,
+  queryAuditExcel,
 } from '@/services/boom';
 import { queryRole } from '@/services/SysAdmin';
 import { setCurrentUser } from '@/utils/authority';
@@ -68,6 +70,8 @@ export default {
     fileList: [],
     roleList: [],
     authority: [],
+    versionTree:[],
+    auditExcel:[],
   },
 
   effects: {
@@ -487,6 +491,21 @@ export default {
         });
       }
     },
+    *queryVersionsTree({ payload }, { call, put }) {
+      const response = yield call(queryVersionsTree, payload);
+      if (response) {
+        yield put({
+          type: 'save',
+          payload: { versionTree: response.data },
+        });
+      }
+    },
+    *queryAuditExcel({ payload,  callback  }, { call, put }) {
+      const response = yield call(queryAuditExcel, payload);
+      if (response) {
+        callback && callback(response.data?.all);
+      }
+    },
   },
 
   reducers: {

+ 164 - 17
src/pages/PurchaseAdmin/PurchaseList/Flow/FlowDetail.json

@@ -294,7 +294,7 @@
       },
       "isCustom": true,
       "parentKey": "1",
-      "x": 213,
+      "x": 356,
       "y": -324,
       "zIndex": 10
     },
@@ -327,7 +327,7 @@
       },
       "isCustom": true,
       "parentKey": "1",
-      "x": 198,
+      "x": 446,
       "y": -150,
       "zIndex": 10
     },
@@ -360,7 +360,7 @@
       },
       "isCustom": true,
       "parentKey": "1",
-      "x": 386,
+      "x": 621,
       "y": -150,
       "zIndex": 10
     },
@@ -393,7 +393,7 @@
       },
       "isCustom": true,
       "parentKey": "1",
-      "x": 198,
+      "x": 446,
       "y": 26,
       "zIndex": 10
     },
@@ -426,7 +426,7 @@
       },
       "isCustom": true,
       "parentKey": "1",
-      "x": 42,
+      "x": 308,
       "y": -170,
       "zIndex": 10
     },
@@ -528,6 +528,105 @@
       "x": -425,
       "y": -115,
       "zIndex": 10
+    },
+    {
+      "id": "node-186a9d31-0bd3-4b36-b61f-6b5380c824db",
+      "renderKey": "custom-circle",
+      "name": "custom-circle",
+      "label": "审批节点",
+      "width": 90,
+      "height": 90,
+      "ports": {
+        "items": [
+          {
+            "group": "top",
+            "id": "c6ec15a8-2db4-4ca8-ad81-fd1783b4ca0f"
+          },
+          {
+            "group": "right",
+            "id": "e134d65d-a197-4116-ad74-f47dbbb727d1"
+          },
+          {
+            "group": "bottom",
+            "id": "2c633cdf-7bb5-49ea-a4dc-e3d8c837e513"
+          },
+          {
+            "group": "left",
+            "id": "6d880b9d-7d7e-4357-94dd-caf7d73b5f80"
+          }
+        ]
+      },
+      "isCustom": true,
+      "parentKey": "custom",
+      "x": 27,
+      "y": -224,
+      "zIndex": 10
+    },
+    {
+      "id": "node-c5171e2d-1cd8-4019-83dc-9f2ed0cab6e8",
+      "renderKey": "custom-circle",
+      "name": "custom-circle",
+      "label": "审批节点",
+      "width": 90,
+      "height": 90,
+      "ports": {
+        "items": [
+          {
+            "group": "top",
+            "id": "7b9fcd52-4fca-47c7-aaae-e3b117c0c234"
+          },
+          {
+            "group": "right",
+            "id": "6316d87e-2eb3-4ff6-bd8e-0cfd11bff4ce"
+          },
+          {
+            "group": "bottom",
+            "id": "38113945-040f-4374-aca8-38e2e81d71a8"
+          },
+          {
+            "group": "left",
+            "id": "8637b869-7924-416a-b938-30a7ca932901"
+          }
+        ]
+      },
+      "isCustom": true,
+      "parentKey": "custom",
+      "x": 27,
+      "y": -115,
+      "zIndex": 10
+    },
+    {
+      "id": "node-2b3fc359-de49-4f9d-adb5-4eb70b6ba862",
+      "renderKey": "custom-circle",
+      "name": "custom-circle",
+      "label": "审批节点",
+      "width": 90,
+      "height": 90,
+      "ports": {
+        "items": [
+          {
+            "group": "top",
+            "id": "d9b27b16-08ab-4e0d-84dc-fdec64c0a129"
+          },
+          {
+            "group": "right",
+            "id": "1ab6b2a4-dccd-41e9-83c6-d1642c9ad844"
+          },
+          {
+            "group": "bottom",
+            "id": "b763caac-37c1-4659-ae0e-c7b7c760fec1"
+          },
+          {
+            "group": "left",
+            "id": "2408c946-a670-48b5-a676-d882946b8e36"
+          }
+        ]
+      },
+      "isCustom": true,
+      "parentKey": "custom",
+      "x": 173,
+      "y": -170,
+      "zIndex": 10
     }
   ],
   "edges": [
@@ -579,18 +678,6 @@
       },
       "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":\"5 5\",\"strokeWidth\":1}}"
     },
-    {
-      "id": "5764f3ce:ce88d7e2-3fb8d302:22d16375",
-      "source": {
-        "cell": "5764f3ce",
-        "port": "ce88d7e2"
-      },
-      "target": {
-        "cell": "3fb8d302",
-        "port": "22d16375"
-      },
-      "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":\"5 5\",\"strokeWidth\":1}}"
-    },
     {
       "id": "3fb8d302:205f1437-a48131e0:bac7962b",
       "source": {
@@ -746,6 +833,66 @@
         "port": "c29d7b43"
       },
       "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":\"5 5\",\"strokeWidth\":1}}"
+    },
+    {
+      "id": "5764f3ce:ce88d7e2-node-186a9d31-0bd3-4b36-b61f-6b5380c824db:6d880b9d-7d7e-4357-94dd-caf7d73b5f80",
+      "source": {
+        "cell": "5764f3ce",
+        "port": "ce88d7e2"
+      },
+      "target": {
+        "cell": "node-186a9d31-0bd3-4b36-b61f-6b5380c824db",
+        "port": "6d880b9d-7d7e-4357-94dd-caf7d73b5f80"
+      },
+      "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":\"5 5\",\"strokeWidth\":1}}"
+    },
+    {
+      "id": "5764f3ce:ce88d7e2-node-c5171e2d-1cd8-4019-83dc-9f2ed0cab6e8:8637b869-7924-416a-b938-30a7ca932901",
+      "source": {
+        "cell": "5764f3ce",
+        "port": "ce88d7e2"
+      },
+      "target": {
+        "cell": "node-c5171e2d-1cd8-4019-83dc-9f2ed0cab6e8",
+        "port": "8637b869-7924-416a-b938-30a7ca932901"
+      },
+      "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":\"5 5\",\"strokeWidth\":1}}"
+    },
+    {
+      "id": "node-186a9d31-0bd3-4b36-b61f-6b5380c824db:e134d65d-a197-4116-ad74-f47dbbb727d1-node-2b3fc359-de49-4f9d-adb5-4eb70b6ba862:2408c946-a670-48b5-a676-d882946b8e36",
+      "source": {
+        "cell": "node-186a9d31-0bd3-4b36-b61f-6b5380c824db",
+        "port": "e134d65d-a197-4116-ad74-f47dbbb727d1"
+      },
+      "target": {
+        "cell": "node-2b3fc359-de49-4f9d-adb5-4eb70b6ba862",
+        "port": "2408c946-a670-48b5-a676-d882946b8e36"
+      },
+      "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":\"5 5\",\"strokeWidth\":1}}"
+    },
+    {
+      "id": "node-c5171e2d-1cd8-4019-83dc-9f2ed0cab6e8:6316d87e-2eb3-4ff6-bd8e-0cfd11bff4ce-node-2b3fc359-de49-4f9d-adb5-4eb70b6ba862:2408c946-a670-48b5-a676-d882946b8e36",
+      "source": {
+        "cell": "node-c5171e2d-1cd8-4019-83dc-9f2ed0cab6e8",
+        "port": "6316d87e-2eb3-4ff6-bd8e-0cfd11bff4ce"
+      },
+      "target": {
+        "cell": "node-2b3fc359-de49-4f9d-adb5-4eb70b6ba862",
+        "port": "2408c946-a670-48b5-a676-d882946b8e36"
+      },
+      "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":\"5 5\",\"strokeWidth\":1}}"
+    },
+    {
+      "id": "node-2b3fc359-de49-4f9d-adb5-4eb70b6ba862:1ab6b2a4-dccd-41e9-83c6-d1642c9ad844-3fb8d302:22d16375",
+      "source": {
+        "cell": "node-2b3fc359-de49-4f9d-adb5-4eb70b6ba862",
+        "port": "1ab6b2a4-dccd-41e9-83c6-d1642c9ad844"
+      },
+      "target": {
+        "cell": "3fb8d302",
+        "port": "22d16375"
+      },
+      "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":\"5 5\",\"strokeWidth\":1}}"
     }
   ]
 }

+ 10 - 0
src/services/boom.js

@@ -1,4 +1,5 @@
 import request from '@/utils/request';
+import { async } from '@antv/x6/lib/registry/marker/async';
 import { stringify } from 'qs';
 
 /**
@@ -90,6 +91,15 @@ export async function queryHistoryList(params) {
 export async function queryBoomFlowList(params) {
   return request(`/purchase/bom/flows?${stringify(params)}`);
 }
+//请求历史版本
+export async function queryVersionsTree(params){
+  console.log("============================", stringify(params))
+  return request(`/api/v1/purchase/record/version/tree?${stringify(params)}`);
+}
+//查询业务节点的审核记录
+export async function queryAuditExcel(params){
+  return request(`/api/v1/purchase/audit/excel?${stringify(params)}`);
+}
 /**
  * 查看项目流程列表
  * project_id