Browse Source

样式规范条件分支面板

CzRger 3 months ago
parent
commit
ecb9934a63

+ 2 - 2
src/views/workflow/chart/index.vue

@@ -94,11 +94,11 @@ const initChart = () => {
       type: 'doubleMesh',
       args: [
         {
-          color: '#eee', // 主网格线颜色
+          color: 'rgba(238,238,238,0.5)', // 主网格线颜色
           thickness: 1, // 主网格线宽度
         },
         {
-          color: '#ddd', // 次网格线颜色
+          color: 'rgba(221,221,221,0.5)', // 次网格线颜色
           thickness: 1, // 次网格线宽度
           factor: 4, // 主次网格线间隔
         },

+ 0 - 1
src/views/workflow/instance/component/vars/vars-popover.vue

@@ -58,7 +58,6 @@ const state: any = reactive({
 watch(() => props.node, (n) => {
   if (n) {
     const all = WorkflowStore.getInVars(n)
-    console.log(all)
     state.options = props.filter.type ? all.map(v => {
       v.options = v.options.filter(s => s.type === props.filter.type && `${s.nodeId}_${s.key}` !== `${props.filter.nodeId}_${props.filter.key}`)
       return v

+ 129 - 15
src/views/workflow/mockJson.ts

@@ -17,22 +17,32 @@ export const data1 = {
             "label": "参数1",
             "key": "key1",
             "type": "String",
-            "length": "10"
+            "length": "10",
+            "nodeId": "3ba412bb-3772-4f61-85de-095f4017858c",
+            "nodeTitle": "开始"
           },
           {
             "label": "参数2",
             "key": "key2",
-            "type": "Number"
+            "type": "Number",
+            "nodeId": "3ba412bb-3772-4f61-85de-095f4017858c",
+            "nodeTitle": "开始"
           }
         ],
         "sysVars": [
           {
+            "label": "查询内容",
             "key": "sys.query",
-            "type": "String"
+            "type": "String",
+            "nodeId": "3ba412bb-3772-4f61-85de-095f4017858c",
+            "nodeTitle": "开始"
           },
           {
+            "label": "用户ID",
             "key": "sys.user_id",
-            "type": "String"
+            "type": "String",
+            "nodeId": "3ba412bb-3772-4f61-85de-095f4017858c",
+            "nodeTitle": "开始"
           }
         ]
       }
@@ -47,31 +57,135 @@ export const data1 = {
         "ports": [
           {
             "id": "ce2c26aa-9b40-4e32-858e-38fa4b09718d",
-            mode: 'and',
-            cases: []
+            "mode": "and",
+            "cases": [
+              {
+                "id": "0b97f5b7-137f-4a36-a8b5-0f2b7dfe164f",
+                "source": {
+                  "label": "参数1",
+                  "key": "key1",
+                  "type": "String",
+                  "length": "10",
+                  "nodeId": "3ba412bb-3772-4f61-85de-095f4017858c",
+                  "nodeTitle": "开始"
+                },
+                "method": "includes",
+                "type": "constant",
+                "target": "问问"
+              },
+              {
+                "id": "621cbc3f-3080-4387-af21-b67bf4d1cbde",
+                "source": {
+                  "label": "查询内容",
+                  "key": "sys.query",
+                  "type": "String",
+                  "nodeId": "3ba412bb-3772-4f61-85de-095f4017858c",
+                  "nodeTitle": "开始"
+                },
+                "method": "end with",
+                "type": "constant",
+                "target": "112"
+              }
+            ]
           },
           {
             "id": "a4d6eebf-3327-4e73-8ddf-4d3d822ecfa4",
-            mode: 'and',
-            cases: []
+            "mode": "and",
+            "cases": []
           },
           {
             "id": "7d21639f-866a-46df-9ec2-04016527ccd0",
-            mode: 'and',
-            cases: []
+            "mode": "and",
+            "cases": [
+              {
+                "id": "9e94e8ff-a900-4bec-b15f-155ae432e41a",
+                "source": {
+                  "label": "参数2",
+                  "key": "key2",
+                  "type": "Number",
+                  "nodeId": "3ba412bb-3772-4f61-85de-095f4017858c",
+                  "nodeTitle": "开始"
+                },
+                "method": "≥",
+                "type": "constant",
+                "target": 33
+              }
+            ]
           },
           {
             "id": "2ae1788e-b022-44ea-a2d4-98f8eee7cafb",
-            mode: 'and',
-            cases: []
+            "mode": "and",
+            "cases": [
+              {
+                "id": "fbf67741-1f75-4122-a3e0-e61328b2ffd3",
+                "source": {
+                  "label": "参数1",
+                  "key": "key1",
+                  "type": "String",
+                  "length": "10",
+                  "nodeId": "3ba412bb-3772-4f61-85de-095f4017858c",
+                  "nodeTitle": "开始"
+                },
+                "method": "includes",
+                "type": "variable",
+                "target": {
+                  "label": "查询内容",
+                  "key": "sys.query",
+                  "type": "String",
+                  "nodeId": "3ba412bb-3772-4f61-85de-095f4017858c",
+                  "nodeTitle": "开始"
+                }
+              },
+              {
+                "id": "41bbd0d8-c6db-4ca8-a384-4a8ab002843c",
+                "source": {
+                  "label": "参数1",
+                  "key": "key1",
+                  "type": "String",
+                  "length": "10",
+                  "nodeId": "3ba412bb-3772-4f61-85de-095f4017858c",
+                  "nodeTitle": "开始"
+                },
+                "method": "includes",
+                "type": "constant",
+                "target": "55"
+              },
+              {
+                "id": "f4369ce3-6be7-4496-816e-3e264ce36463",
+                "source": {
+                  "label": "参数2",
+                  "key": "key2",
+                  "type": "Number",
+                  "nodeId": "3ba412bb-3772-4f61-85de-095f4017858c",
+                  "nodeTitle": "开始"
+                },
+                "method": "=",
+                "type": "constant",
+                "target": 66
+              },
+              {
+                "id": "a250b933-41f3-45d4-8c4d-5f25869080ac",
+                "source": {
+                  "label": "参数1",
+                  "key": "key1",
+                  "type": "String",
+                  "length": "10",
+                  "nodeId": "3ba412bb-3772-4f61-85de-095f4017858c",
+                  "nodeTitle": "开始"
+                },
+                "method": "includes",
+                "type": "constant",
+                "target": "77"
+              }
+            ]
           },
           {
             "id": "d67172bc-ace5-43a0-8d30-ce53b7ce6762",
-            mode: 'and',
-            cases: []
+            "mode": "and",
+            "cases": []
           },
           {
-            "id": "7171167d-873b-4621-9ce1-dd45f9f4c9c3",
+            "id": "7171167d-873b-4621-9ce1-dd45f9f4c9c3"
           }
         ],
         "p1": "条件分支1的的参数1",