数据动态查找以及动态赋值方法变更
This commit is contained in:
@@ -1,22 +1,22 @@
|
||||
<template>
|
||||
<div class="workflow-use">
|
||||
|
||||
<WorkflowInfo v-if="done" :wf="this.node"/>
|
||||
<WorkflowInfo v-if="done" :wf="this.node" :business="business"/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {findWorkflowStep} from "@/api/workflowProcess.js"
|
||||
import {findWorkflowStep,getWorkflowMoveByID} from "@/api/workflowProcess.js"
|
||||
export default {
|
||||
name:"WorklowUse",
|
||||
data(){
|
||||
return{
|
||||
done:false
|
||||
done:false,
|
||||
business:null,
|
||||
node:null
|
||||
}
|
||||
},
|
||||
async created(){
|
||||
const workflowId = this.$route.query.workflowId
|
||||
const actionId = this.$route.query.actionId
|
||||
const businessId = this.$route.query.businessId
|
||||
const wfmId = this.$route.query.wfmId
|
||||
if(workflowId){
|
||||
const res = await findWorkflowStep({id:workflowId})
|
||||
if(res.code == 0){
|
||||
@@ -24,6 +24,13 @@ export default {
|
||||
this.node = res.data.workflow.nodes[0]
|
||||
this.done = true
|
||||
}
|
||||
}else if(wfmId){
|
||||
const res = await getWorkflowMoveByID({id:wfmId})
|
||||
if(res.code == 0){
|
||||
this.business = res.data.business
|
||||
this.node = res.data.move.workflowNode
|
||||
this.done = true
|
||||
}
|
||||
}
|
||||
},
|
||||
beforeCreate(){
|
||||
|
Reference in New Issue
Block a user