From 4570db06ac1a886769dfd5995f8d536bfc7989c3 Mon Sep 17 00:00:00 2001 From: cxx Date: Thu, 9 May 2024 10:48:17 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=B3=E8=AF=B7=E6=97=B6=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E5=AE=A1=E6=89=B9=E6=B5=81=E6=98=AF=E5=90=A6=E6=AD=A3=E7=A1=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/view/component/createTaskDrawer.html | 14 ++++++++++---- app/view/component/workflowEditorDrawer.html | 3 ++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/app/view/component/createTaskDrawer.html b/app/view/component/createTaskDrawer.html index ee9a75c..b3e7915 100644 --- a/app/view/component/createTaskDrawer.html +++ b/app/view/component/createTaskDrawer.html @@ -400,10 +400,10 @@ Vue.component("create-task-drawer", { } // 先找到开始节点 - var beginNode = workflow.nodeList?.find(n => n.properties.type == 'start') - if(!beginNode){ - window.vtoast.fail('[calcWorkflow] 审批流不存在开始节点,请联系管理员!') - throw new Error('[calcWorkflow] 审批流不存在开始节点,请联系管理员!') + var beginNode = workflow.nodeList?.filter(n => n.properties.type == 'start') + if(beginNode.length != 1){ + window.vtoast.fail('审批流出错,请联系管理员!') + throw new Error('[calcWorkflow] 审批流出错,请联系管理员!') } // 再找开始节点的下一个节点 @@ -411,6 +411,7 @@ Vue.component("create-task-drawer", { newWorkflow.nodeList.push(beginNode) do{ const { node, prevline } = this.calcNode(workflow, nextNode) + newWorkflow.nodeList.push(node) newWorkflow.lineList.push(prevline) nextNode = node @@ -448,6 +449,11 @@ Vue.component("create-task-drawer", { } } } + + if(!nextNode){ + window.vtoast.fail('审批流出错,请联系管理员!') + throw new Error('[calcNode] 审批流出错,请联系管理员!') + } prevLine = lineList.filter(line => line.sourceNodeId == node.id && line.targetNodeId == nextNode.id) return { diff --git a/app/view/component/workflowEditorDrawer.html b/app/view/component/workflowEditorDrawer.html index c63fe04..4fb51a7 100644 --- a/app/view/component/workflowEditorDrawer.html +++ b/app/view/component/workflowEditorDrawer.html @@ -55,7 +55,7 @@
- +
@@ -128,6 +128,7 @@ Vue.component("workflow-editor-drawer", { watch:{ step(newVal, oldVal){ this.$refs.processFlow.doUiAction('closeEditNode') + this.formObj.workflowConfig = this.$refs.processFlow.getBusinessData(); } }, computed: {