申请时判断审批流是否正确
This commit is contained in:
1 parent
44a6d3dc56
commit
4570db06ac
2 files changed
+12
-5
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user