检验节点信息完整
This commit is contained in:
1 parent
ac2e0d753c
commit
58ccf94378
2 files changed
+38
-1
No files matched your search
@@ -432,7 +432,7 @@
|
|||||||
this.node = node.properties;
|
this.node = node.properties;
|
||||||
},
|
},
|
||||||
async clearUser(){
|
async clearUser(){
|
||||||
this.node.user = []
|
this.$set(this.node, 'user', null)
|
||||||
await this.$emit('reflesh-workflow')
|
await this.$emit('reflesh-workflow')
|
||||||
},
|
},
|
||||||
addCondition(){
|
addCondition(){
|
||||||
|
|||||||
@@ -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){
|
if(!this.isPassValidate){
|
||||||
// await window.vtoast.fail(this.disPassValidateText);
|
// await window.vtoast.fail(this.disPassValidateText);
|
||||||
this.isSnackerShown = true
|
this.isSnackerShown = true
|
||||||
|
|||||||
Reference in new issue
Block a user