Renxy 2 years ago
parent
commit
d04ea27b60

+ 5 - 4
src/components/Flow/config-toolbar.ts

@@ -194,14 +194,14 @@ namespace NSToolbarConfig {
           TOOLBAR_ITEMS.SAVE_GRAPH_DATA,
           {
             saveGraphDataService: (meta, graphData) => {
-              let data = JSON.parse(JSON.stringify(graphData))
+              let data = JSON.parse(JSON.stringify(graphData));
               data.nodes = data.nodes.map(item => {
                 // delete item.incomingEdges;
                 // delete item.originData;
                 // delete item.outgoingEdges;
                 // delete item.ports.groups
-                let ports = {...item.ports}
-                delete ports.groups
+                let ports = { ...item.ports };
+                delete ports.groups;
                 return {
                   id: item.id,
                   renderKey: item.renderKey,
@@ -215,6 +215,7 @@ namespace NSToolbarConfig {
                   x: item.x,
                   y: item.y,
                   zIndex: item.zIndex,
+                  flowID: item.flow_id,
                   count: item.count,
                 };
               });
@@ -231,7 +232,7 @@ namespace NSToolbarConfig {
                   id: item.id,
                   source: item.source,
                   target: item.target,
-                  attr: JSON.stringify(item.attrs)
+                  attr: JSON.stringify(item.attrs),
                 };
               });
               console.log(data);

+ 122 - 461
src/pages/PurchaseAdmin/PurchaseList/Flow/FlowDetail.json

@@ -10,22 +10,10 @@
       "height": 50,
       "ports": {
         "items": [
-          {
-            "group": "top",
-            "id": "293a90b5"
-          },
-          {
-            "group": "right",
-            "id": "92334433"
-          },
-          {
-            "group": "bottom",
-            "id": "c2ab5849"
-          },
-          {
-            "group": "left",
-            "id": "6079a903"
-          }
+          { "group": "top", "id": "293a90b5" },
+          { "group": "right", "id": "92334433" },
+          { "group": "bottom", "id": "c2ab5849" },
+          { "group": "left", "id": "6079a903" }
         ]
       },
       "isCustom": true,
@@ -38,27 +26,15 @@
       "id": "975bf288",
       "renderKey": "custom-circle",
       "name": "custom-circle",
-      "label": "三级审批",
+      "label": "方案总审",
       "width": 90,
       "height": 90,
       "ports": {
         "items": [
-          {
-            "group": "top",
-            "id": "a61170c3"
-          },
-          {
-            "group": "right",
-            "id": "821f59c0"
-          },
-          {
-            "group": "bottom",
-            "id": "17360bc4"
-          },
-          {
-            "group": "left",
-            "id": "15d1b217"
-          }
+          { "group": "top", "id": "a61170c3" },
+          { "group": "right", "id": "821f59c0" },
+          { "group": "bottom", "id": "17360bc4" },
+          { "group": "left", "id": "15d1b217" }
         ]
       },
       "isCustom": true,
@@ -76,22 +52,10 @@
       "height": 50,
       "ports": {
         "items": [
-          {
-            "group": "top",
-            "id": "4b4d9fa6"
-          },
-          {
-            "group": "right",
-            "id": "ce88d7e2"
-          },
-          {
-            "group": "bottom",
-            "id": "e69d8709"
-          },
-          {
-            "group": "left",
-            "id": "c29d7b43"
-          }
+          { "group": "top", "id": "4b4d9fa6" },
+          { "group": "right", "id": "ce88d7e2" },
+          { "group": "bottom", "id": "e69d8709" },
+          { "group": "left", "id": "c29d7b43" }
         ]
       },
       "isCustom": true,
@@ -104,27 +68,15 @@
       "id": "5359e23c",
       "renderKey": "custom-circle",
       "name": "custom-circle",
-      "label": "三级审批",
+      "label": "三级审批2",
       "width": 90,
       "height": 90,
       "ports": {
         "items": [
-          {
-            "group": "top",
-            "id": "331cd291"
-          },
-          {
-            "group": "right",
-            "id": "ff6724ee"
-          },
-          {
-            "group": "bottom",
-            "id": "16b4df46"
-          },
-          {
-            "group": "left",
-            "id": "34c9dbc6"
-          }
+          { "group": "top", "id": "331cd291" },
+          { "group": "right", "id": "ff6724ee" },
+          { "group": "bottom", "id": "16b4df46" },
+          { "group": "left", "id": "34c9dbc6" }
         ]
       },
       "isCustom": true,
@@ -142,22 +94,10 @@
       "height": 50,
       "ports": {
         "items": [
-          {
-            "group": "top",
-            "id": "f71ce55b"
-          },
-          {
-            "group": "right",
-            "id": "e67dc19c"
-          },
-          {
-            "group": "bottom",
-            "id": "a06aba2c"
-          },
-          {
-            "group": "left",
-            "id": "b578cc26"
-          }
+          { "group": "top", "id": "f71ce55b" },
+          { "group": "right", "id": "e67dc19c" },
+          { "group": "bottom", "id": "a06aba2c" },
+          { "group": "left", "id": "b578cc26" }
         ]
       },
       "isCustom": true,
@@ -175,22 +115,10 @@
       "height": 50,
       "ports": {
         "items": [
-          {
-            "group": "top",
-            "id": "0fc44196"
-          },
-          {
-            "group": "right",
-            "id": "d2030f1b"
-          },
-          {
-            "group": "bottom",
-            "id": "188c9b68"
-          },
-          {
-            "group": "left",
-            "id": "4e9ce7ad"
-          }
+          { "group": "top", "id": "0fc44196" },
+          { "group": "right", "id": "d2030f1b" },
+          { "group": "bottom", "id": "188c9b68" },
+          { "group": "left", "id": "4e9ce7ad" }
         ]
       },
       "isCustom": true,
@@ -208,22 +136,10 @@
       "height": 50,
       "ports": {
         "items": [
-          {
-            "group": "top",
-            "id": "b58731c5"
-          },
-          {
-            "group": "right",
-            "id": "b3dfbc16"
-          },
-          {
-            "group": "bottom",
-            "id": "89c0bc16"
-          },
-          {
-            "group": "left",
-            "id": "a3adcac9"
-          }
+          { "group": "top", "id": "b58731c5" },
+          { "group": "right", "id": "b3dfbc16" },
+          { "group": "bottom", "id": "89c0bc16" },
+          { "group": "left", "id": "a3adcac9" }
         ]
       },
       "isCustom": true,
@@ -241,22 +157,10 @@
       "height": 50,
       "ports": {
         "items": [
-          {
-            "group": "top",
-            "id": "7f8dc65b"
-          },
-          {
-            "group": "right",
-            "id": "9a699e3f"
-          },
-          {
-            "group": "bottom",
-            "id": "d348b56a"
-          },
-          {
-            "group": "left",
-            "id": "47317157"
-          }
+          { "group": "top", "id": "7f8dc65b" },
+          { "group": "right", "id": "9a699e3f" },
+          { "group": "bottom", "id": "d348b56a" },
+          { "group": "left", "id": "47317157" }
         ]
       },
       "isCustom": true,
@@ -274,22 +178,10 @@
       "height": 90,
       "ports": {
         "items": [
-          {
-            "group": "top",
-            "id": "cf1c4df0"
-          },
-          {
-            "group": "right",
-            "id": "1eb352b0"
-          },
-          {
-            "group": "bottom",
-            "id": "83b59198"
-          },
-          {
-            "group": "left",
-            "id": "94f485b5"
-          }
+          { "group": "top", "id": "cf1c4df0" },
+          { "group": "right", "id": "1eb352b0" },
+          { "group": "bottom", "id": "83b59198" },
+          { "group": "left", "id": "94f485b5" }
         ]
       },
       "isCustom": true,
@@ -307,22 +199,10 @@
       "height": 50,
       "ports": {
         "items": [
-          {
-            "group": "top",
-            "id": "3ca1320c"
-          },
-          {
-            "group": "right",
-            "id": "4dee75d9"
-          },
-          {
-            "group": "bottom",
-            "id": "0f72f2ba"
-          },
-          {
-            "group": "left",
-            "id": "bac7962b"
-          }
+          { "group": "top", "id": "3ca1320c" },
+          { "group": "right", "id": "4dee75d9" },
+          { "group": "bottom", "id": "0f72f2ba" },
+          { "group": "left", "id": "bac7962b" }
         ]
       },
       "isCustom": true,
@@ -340,22 +220,10 @@
       "height": 50,
       "ports": {
         "items": [
-          {
-            "group": "top",
-            "id": "04c81e99"
-          },
-          {
-            "group": "right",
-            "id": "0d594eef"
-          },
-          {
-            "group": "bottom",
-            "id": "17ff5fe6"
-          },
-          {
-            "group": "left",
-            "id": "73307680"
-          }
+          { "group": "top", "id": "04c81e99" },
+          { "group": "right", "id": "0d594eef" },
+          { "group": "bottom", "id": "17ff5fe6" },
+          { "group": "left", "id": "73307680" }
         ]
       },
       "isCustom": true,
@@ -373,22 +241,10 @@
       "height": 50,
       "ports": {
         "items": [
-          {
-            "group": "top",
-            "id": "2aae2a71"
-          },
-          {
-            "group": "right",
-            "id": "e3a42bda"
-          },
-          {
-            "group": "bottom",
-            "id": "0f06668a"
-          },
-          {
-            "group": "left",
-            "id": "8e0bff55"
-          }
+          { "group": "top", "id": "2aae2a71" },
+          { "group": "right", "id": "e3a42bda" },
+          { "group": "bottom", "id": "0f06668a" },
+          { "group": "left", "id": "8e0bff55" }
         ]
       },
       "isCustom": true,
@@ -401,27 +257,15 @@
       "id": "3fb8d302",
       "renderKey": "custom-circle",
       "name": "custom-circle",
-      "label": "三级审批4",
+      "label": "事业部",
       "width": 90,
       "height": 90,
       "ports": {
         "items": [
-          {
-            "group": "top",
-            "id": "8ab6c3f6"
-          },
-          {
-            "group": "right",
-            "id": "205f1437"
-          },
-          {
-            "group": "bottom",
-            "id": "761ad2b5"
-          },
-          {
-            "group": "left",
-            "id": "22d16375"
-          }
+          { "group": "top", "id": "8ab6c3f6" },
+          { "group": "right", "id": "205f1437" },
+          { "group": "bottom", "id": "761ad2b5" },
+          { "group": "left", "id": "22d16375" }
         ]
       },
       "isCustom": true,
@@ -434,27 +278,15 @@
       "id": "399bddb7",
       "renderKey": "custom-circle",
       "name": "custom-circle",
-      "label": "三级审批",
+      "label": "三级审批1",
       "width": 90,
       "height": 90,
       "ports": {
         "items": [
-          {
-            "group": "top",
-            "id": "99f69f24"
-          },
-          {
-            "group": "right",
-            "id": "0bccd839"
-          },
-          {
-            "group": "bottom",
-            "id": "42c0d925"
-          },
-          {
-            "group": "left",
-            "id": "58f52f2c"
-          }
+          { "group": "top", "id": "99f69f24" },
+          { "group": "right", "id": "0bccd839" },
+          { "group": "bottom", "id": "42c0d925" },
+          { "group": "left", "id": "58f52f2c" }
         ]
       },
       "isCustom": true,
@@ -467,27 +299,15 @@
       "id": "2427bf29",
       "renderKey": "custom-circle",
       "name": "custom-circle",
-      "label": "三级审批1",
+      "label": "工艺分部经理",
       "width": 90,
       "height": 90,
       "ports": {
         "items": [
-          {
-            "group": "top",
-            "id": "e5a149c4"
-          },
-          {
-            "group": "right",
-            "id": "e1a1ecea"
-          },
-          {
-            "group": "bottom",
-            "id": "6e131e6a"
-          },
-          {
-            "group": "left",
-            "id": "6bbf9ae4"
-          }
+          { "group": "top", "id": "e5a149c4" },
+          { "group": "right", "id": "e1a1ecea" },
+          { "group": "bottom", "id": "6e131e6a" },
+          { "group": "left", "id": "6bbf9ae4" }
         ]
       },
       "isCustom": true,
@@ -500,27 +320,15 @@
       "id": "be25fe75",
       "renderKey": "custom-circle",
       "name": "custom-circle",
-      "label": "三级审批2",
+      "label": "电气分部经理",
       "width": 90,
       "height": 90,
       "ports": {
         "items": [
-          {
-            "group": "top",
-            "id": "13e4b9ea"
-          },
-          {
-            "group": "right",
-            "id": "ce651308"
-          },
-          {
-            "group": "bottom",
-            "id": "9a0b8942"
-          },
-          {
-            "group": "left",
-            "id": "a705e7ed"
-          }
+          { "group": "top", "id": "13e4b9ea" },
+          { "group": "right", "id": "ce651308" },
+          { "group": "bottom", "id": "9a0b8942" },
+          { "group": "left", "id": "a705e7ed" }
         ]
       },
       "isCustom": true,
@@ -533,27 +341,15 @@
       "id": "node-186a9d31-0bd3-4b36-b61f-6b5380c824db",
       "renderKey": "custom-circle",
       "name": "custom-circle",
-      "label": "审批节点1",
+      "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"
-          }
+          { "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,
@@ -566,27 +362,15 @@
       "id": "node-c5171e2d-1cd8-4019-83dc-9f2ed0cab6e8",
       "renderKey": "custom-circle",
       "name": "custom-circle",
-      "label": "审批节点2",
+      "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"
-          }
+          { "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,
@@ -599,27 +383,15 @@
       "id": "node-2b3fc359-de49-4f9d-adb5-4eb70b6ba862",
       "renderKey": "custom-circle",
       "name": "custom-circle",
-      "label": "审批节点3",
+      "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"
-          }
+          { "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,
@@ -632,214 +404,109 @@
   "edges": [
     {
       "id": "975bf288:a61170c3-8c1f18d0:89c0bc16",
-      "source": {
-        "cell": "975bf288",
-        "port": "a61170c3"
-      },
-      "target": {
-        "cell": "8c1f18d0",
-        "port": "89c0bc16"
-      },
+      "source": { "cell": "975bf288", "port": "a61170c3" },
+      "target": { "cell": "8c1f18d0", "port": "89c0bc16" },
       "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":[0,0],\"strokeWidth\":1}}"
     },
     {
       "id": "8c1f18d0:a3adcac9-41561012:293a90b5",
-      "source": {
-        "cell": "8c1f18d0",
-        "port": "a3adcac9"
-      },
-      "target": {
-        "cell": "41561012",
-        "port": "293a90b5"
-      },
+      "source": { "cell": "8c1f18d0", "port": "a3adcac9" },
+      "target": { "cell": "41561012", "port": "293a90b5" },
       "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":[0,0],\"strokeWidth\":1}}"
     },
     {
       "id": "5764f3ce:4b4d9fa6-1aed14d1:d348b56a",
-      "source": {
-        "cell": "5764f3ce",
-        "port": "4b4d9fa6"
-      },
-      "target": {
-        "cell": "1aed14d1",
-        "port": "d348b56a"
-      },
+      "source": { "cell": "5764f3ce", "port": "4b4d9fa6" },
+      "target": { "cell": "1aed14d1", "port": "d348b56a" },
       "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":\"5 5\",\"strokeWidth\":1}}"
     },
     {
       "id": "1aed14d1:9a699e3f-4651130e:94f485b5",
-      "source": {
-        "cell": "1aed14d1",
-        "port": "9a699e3f"
-      },
-      "target": {
-        "cell": "4651130e",
-        "port": "94f485b5"
-      },
+      "source": { "cell": "1aed14d1", "port": "9a699e3f" },
+      "target": { "cell": "4651130e", "port": "94f485b5" },
       "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":[0,0],\"strokeWidth\":1}}"
     },
     {
       "id": "3fb8d302:205f1437-a48131e0:bac7962b",
-      "source": {
-        "cell": "3fb8d302",
-        "port": "205f1437"
-      },
-      "target": {
-        "cell": "a48131e0",
-        "port": "bac7962b"
-      },
+      "source": { "cell": "3fb8d302", "port": "205f1437" },
+      "target": { "cell": "a48131e0", "port": "bac7962b" },
       "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":[0,0],\"strokeWidth\":1}}"
     },
     {
       "id": "a48131e0:4dee75d9-b57b57c8:73307680",
-      "source": {
-        "cell": "a48131e0",
-        "port": "4dee75d9"
-      },
-      "target": {
-        "cell": "b57b57c8",
-        "port": "73307680"
-      },
+      "source": { "cell": "a48131e0", "port": "4dee75d9" },
+      "target": { "cell": "b57b57c8", "port": "73307680" },
       "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":\"5 5\",\"strokeWidth\":1}}"
     },
     {
       "id": "a48131e0:0f72f2ba-3631eae9:2aae2a71",
-      "source": {
-        "cell": "a48131e0",
-        "port": "0f72f2ba"
-      },
-      "target": {
-        "cell": "3631eae9",
-        "port": "2aae2a71"
-      },
+      "source": { "cell": "a48131e0", "port": "0f72f2ba" },
+      "target": { "cell": "3631eae9", "port": "2aae2a71" },
       "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":[0,0],\"strokeWidth\":1}}"
     },
     {
       "id": "3631eae9:8e0bff55-399bddb7:0bccd839",
-      "source": {
-        "cell": "3631eae9",
-        "port": "8e0bff55"
-      },
-      "target": {
-        "cell": "399bddb7",
-        "port": "0bccd839"
-      },
+      "source": { "cell": "3631eae9", "port": "8e0bff55" },
+      "target": { "cell": "399bddb7", "port": "0bccd839" },
       "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":[0,0],\"strokeWidth\":1}}"
     },
     {
       "id": "399bddb7:58f52f2c-c28a18d3:e67dc19c",
-      "source": {
-        "cell": "399bddb7",
-        "port": "58f52f2c"
-      },
-      "target": {
-        "cell": "c28a18d3",
-        "port": "e67dc19c"
-      },
+      "source": { "cell": "399bddb7", "port": "58f52f2c" },
+      "target": { "cell": "c28a18d3", "port": "e67dc19c" },
       "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":[0,0],\"strokeWidth\":1}}"
     },
     {
       "id": "c28a18d3:b578cc26-5359e23c:ff6724ee",
-      "source": {
-        "cell": "c28a18d3",
-        "port": "b578cc26"
-      },
-      "target": {
-        "cell": "5359e23c",
-        "port": "ff6724ee"
-      },
+      "source": { "cell": "c28a18d3", "port": "b578cc26" },
+      "target": { "cell": "5359e23c", "port": "ff6724ee" },
       "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":[0,0],\"strokeWidth\":1}}"
     },
     {
       "id": "5359e23c:34c9dbc6-5216c5dc:d2030f1b",
-      "source": {
-        "cell": "5359e23c",
-        "port": "34c9dbc6"
-      },
-      "target": {
-        "cell": "5216c5dc",
-        "port": "d2030f1b"
-      },
+      "source": { "cell": "5359e23c", "port": "34c9dbc6" },
+      "target": { "cell": "5216c5dc", "port": "d2030f1b" },
       "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":[0,0],\"strokeWidth\":1}}"
     },
     {
       "id": "b57b57c8:04c81e99-4651130e:1eb352b0",
-      "source": {
-        "cell": "b57b57c8",
-        "port": "04c81e99"
-      },
-      "target": {
-        "cell": "4651130e",
-        "port": "1eb352b0"
-      },
+      "source": { "cell": "b57b57c8", "port": "04c81e99" },
+      "target": { "cell": "4651130e", "port": "1eb352b0" },
       "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":[0,0],\"strokeWidth\":1}}"
     },
     {
       "id": "41561012:92334433-2427bf29:6bbf9ae4",
-      "source": {
-        "cell": "41561012",
-        "port": "92334433"
-      },
-      "target": {
-        "cell": "2427bf29",
-        "port": "6bbf9ae4"
-      },
+      "source": { "cell": "41561012", "port": "92334433" },
+      "target": { "cell": "2427bf29", "port": "6bbf9ae4" },
       "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":[0,0],\"strokeWidth\":1}}"
     },
     {
       "id": "41561012:92334433-be25fe75:a705e7ed",
-      "source": {
-        "cell": "41561012",
-        "port": "92334433"
-      },
-      "target": {
-        "cell": "be25fe75",
-        "port": "a705e7ed"
-      },
+      "source": { "cell": "41561012", "port": "92334433" },
+      "target": { "cell": "be25fe75", "port": "a705e7ed" },
       "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":[0,0],\"strokeWidth\":1}}"
     },
     {
       "id": "2427bf29:e1a1ecea-975bf288:15d1b217",
-      "source": {
-        "cell": "2427bf29",
-        "port": "e1a1ecea"
-      },
-      "target": {
-        "cell": "975bf288",
-        "port": "15d1b217"
-      },
+      "source": { "cell": "2427bf29", "port": "e1a1ecea" },
+      "target": { "cell": "975bf288", "port": "15d1b217" },
       "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":[0,0],\"strokeWidth\":1}}"
     },
     {
       "id": "be25fe75:ce651308-975bf288:15d1b217",
-      "source": {
-        "cell": "be25fe75",
-        "port": "ce651308"
-      },
-      "target": {
-        "cell": "975bf288",
-        "port": "15d1b217"
-      },
+      "source": { "cell": "be25fe75", "port": "ce651308" },
+      "target": { "cell": "975bf288", "port": "15d1b217" },
       "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":[0,0],\"strokeWidth\":1}}"
     },
     {
       "id": "975bf288:821f59c0-5764f3ce:c29d7b43",
-      "source": {
-        "cell": "975bf288",
-        "port": "821f59c0"
-      },
-      "target": {
-        "cell": "5764f3ce",
-        "port": "c29d7b43"
-      },
+      "source": { "cell": "975bf288", "port": "821f59c0" },
+      "target": { "cell": "5764f3ce", "port": "c29d7b43" },
       "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":[0,0],\"strokeWidth\":1}}"
     },
     {
       "id": "5764f3ce:ce88d7e2-node-186a9d31-0bd3-4b36-b61f-6b5380c824db:6d880b9d-7d7e-4357-94dd-caf7d73b5f80",
-      "source": {
-        "cell": "5764f3ce",
-        "port": "ce88d7e2"
-      },
+      "source": { "cell": "5764f3ce", "port": "ce88d7e2" },
       "target": {
         "cell": "node-186a9d31-0bd3-4b36-b61f-6b5380c824db",
         "port": "6d880b9d-7d7e-4357-94dd-caf7d73b5f80"
@@ -848,10 +515,7 @@
     },
     {
       "id": "5764f3ce:ce88d7e2-node-c5171e2d-1cd8-4019-83dc-9f2ed0cab6e8:8637b869-7924-416a-b938-30a7ca932901",
-      "source": {
-        "cell": "5764f3ce",
-        "port": "ce88d7e2"
-      },
+      "source": { "cell": "5764f3ce", "port": "ce88d7e2" },
       "target": {
         "cell": "node-c5171e2d-1cd8-4019-83dc-9f2ed0cab6e8",
         "port": "8637b869-7924-416a-b938-30a7ca932901"
@@ -888,10 +552,7 @@
         "cell": "node-2b3fc359-de49-4f9d-adb5-4eb70b6ba862",
         "port": "1ab6b2a4-dccd-41e9-83c6-d1642c9ad844"
       },
-      "target": {
-        "cell": "3fb8d302",
-        "port": "22d16375"
-      },
+      "target": { "cell": "3fb8d302", "port": "22d16375" },
       "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":[0,0],\"strokeWidth\":1}}"
     }
   ]

+ 7 - 4
src/pages/PurchaseAdmin/PurchaseList/Flow/List.js

@@ -8,7 +8,7 @@ import Link from 'umi/link';
 const { Option } = Select;
 
 function List(props) {
-  const { userList, list, dispatch, projectList } = props;
+  const { userList, list, dispatch, projectList, permission } = props;
   const [visible, setVisible] = useState(false);
   const columns = [
     {
@@ -62,9 +62,11 @@ function List(props) {
         <Button type="primary" style={{ marginRight: 20 }} onClick={() => setVisible(true)}>
           新增工作流
         </Button>
-        <Link to="/home/audit-list">
-          <Button type="primary">审批流管理</Button>
-        </Link>
+        {permission['func-01-point-bom-flow'] && (
+          <Link to="/home/audit-list">
+            <Button type="primary">审批流管理</Button>
+          </Link>
+        )}
       </div>
 
       <Table rowKey="Id" dataSource={list} columns={columns} />
@@ -80,6 +82,7 @@ function List(props) {
 }
 export default connect(({ user, flow, loading }) => ({
   userList: user.list,
+  permission: user.currentUser.Permission,
   list: flow.flowList,
   projectList: flow.projectList,
   loading: loading.models.purchaseList2,

+ 3 - 5
src/pages/PurchaseAdmin/PurchaseList/Index.js

@@ -97,11 +97,9 @@ function LayoutDetail(props) {
               <Menu.Item key="/home">
                 <Link to="/home">采购清单</Link>
               </Menu.Item>
-              {checkReport(4) && (
-                <Menu.Item key="/home/flow-list">
-                  <Link to="/home/flow-list">流程图</Link>
-                </Menu.Item>
-              )}
+              <Menu.Item key="/home/flow-list">
+                <Link to="/home/flow-list">流程图</Link>
+              </Menu.Item>
             </Menu>
           </div>
           <RightContent />