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: {