From 58ccf94378b48ecee892ac5fe1794be1bf59dcc7 Mon Sep 17 00:00:00 2001 From: cxx Date: Wed, 8 May 2024 17:22:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A3=80=E9=AA=8C=E8=8A=82=E7=82=B9=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=AE=8C=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/view/component/flow/editNode.html | 2 +- app/view/component/flow/processFlow.html | 37 ++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/app/view/component/flow/editNode.html b/app/view/component/flow/editNode.html index 4784494..0f8ec5f 100644 --- a/app/view/component/flow/editNode.html +++ b/app/view/component/flow/editNode.html @@ -432,7 +432,7 @@ this.node = node.properties; }, async clearUser(){ - this.node.user = [] + this.$set(this.node, 'user', null) await this.$emit('reflesh-workflow') }, addCondition(){ diff --git a/app/view/component/flow/processFlow.html b/app/view/component/flow/processFlow.html index 012f59d..10f19c4 100644 --- a/app/view/component/flow/processFlow.html +++ b/app/view/component/flow/processFlow.html @@ -903,6 +903,43 @@ Vue.component("process-flow", { } } + // 检查条件节点是否选了条件 检查审核/抄送节点是否选了类型 + for (var index = 0; index < nodeList.length; index++) { + const element = nodeList[index]; + + if(['conditionTask'].includes(element.properties.type)){ + if(!element.properties.priority){ + this.isPassValidate = false + this.disPassValidateText += `${element.properties.label}节点没有设置优先级!` + }else{ + if(element.properties.priority != -1 && element.properties.conditionList.length <= 0){ + this.isPassValidate = false + this.disPassValidateText += `${element.properties.label}节点没有设置条件组!` + } + } + }else if(['approvalTask'].includes(element.properties.type)){ + if(!element.properties.approvalType || !element.properties.approverType){ + this.isPassValidate = false + this.disPassValidateText += `${element.properties.label}节点没有完善信息!` + }else if(element.properties.approverType != '申请人自选'){ + if(!(element.properties.user && element.properties.user?.length > 0)){ + this.isPassValidate = false + this.disPassValidateText += `${element.properties.label}节点没有完善信息!` + } + } + }else if(['noticeTask'].includes(element.properties.type)){ + if(!element.properties.noticerType){ + this.isPassValidate = false + this.disPassValidateText += `${element.properties.label}节点没有完善信息!` + }else if(element.properties.noticerType != '申请人自选'){ + if(!(element.properties.user && element.properties.user?.length > 0)){ + this.isPassValidate = false + this.disPassValidateText += `${element.properties.label}节点没有完善信息!` + } + } + } + } + if(!this.isPassValidate){ // await window.vtoast.fail(this.disPassValidateText); this.isSnackerShown = true