申请时判断审批流是否正确
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')
|
var beginNode = workflow.nodeList?.filter(n => n.properties.type == 'start')
|
||||||
if(!beginNode){
|
if(beginNode.length != 1){
|
||||||
window.vtoast.fail('[calcWorkflow] 审批流不存在开始节点,请联系管理员!')
|
window.vtoast.fail('审批流出错,请联系管理员!')
|
||||||
throw new Error('[calcWorkflow] 审批流不存在开始节点,请联系管理员!')
|
throw new Error('[calcWorkflow] 审批流出错,请联系管理员!')
|
||||||
}
|
}
|
||||||
|
|
||||||
// 再找开始节点的下一个节点
|
// 再找开始节点的下一个节点
|
||||||
@@ -411,6 +411,7 @@ Vue.component("create-task-drawer", {
|
|||||||
newWorkflow.nodeList.push(beginNode)
|
newWorkflow.nodeList.push(beginNode)
|
||||||
do{
|
do{
|
||||||
const { node, prevline } = this.calcNode(workflow, nextNode)
|
const { node, prevline } = this.calcNode(workflow, nextNode)
|
||||||
|
|
||||||
newWorkflow.nodeList.push(node)
|
newWorkflow.nodeList.push(node)
|
||||||
newWorkflow.lineList.push(prevline)
|
newWorkflow.lineList.push(prevline)
|
||||||
nextNode = node
|
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)
|
prevLine = lineList.filter(line => line.sourceNodeId == node.id && line.targetNodeId == nextNode.id)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
<v-card-text class="pa-0">
|
<v-card-text class="pa-0">
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
<!-- <div class="text-subtitle-2 mb-2">表单设置</div> -->
|
<!-- <div class="text-subtitle-2 mb-2">表单设置</div> -->
|
||||||
<tpl-form-design ref="tplFormDesign" :form="formObj.workflowForm" v-if="!loading"></tpl-form-design>
|
<tpl-form-design ref="tplFormDesign" :form="formObj.workflowForm" :workflow="formObj.workflowConfig" v-if="!loading"></tpl-form-design>
|
||||||
</div>
|
</div>
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
</v-card>
|
</v-card>
|
||||||
@@ -128,6 +128,7 @@ Vue.component("workflow-editor-drawer", {
|
|||||||
watch:{
|
watch:{
|
||||||
step(newVal, oldVal){
|
step(newVal, oldVal){
|
||||||
this.$refs.processFlow.doUiAction('closeEditNode')
|
this.$refs.processFlow.doUiAction('closeEditNode')
|
||||||
|
this.formObj.workflowConfig = this.$refs.processFlow.getBusinessData();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|||||||
Reference in new issue
Block a user