2020-11-12 18:21:03 +08:00
|
|
|
<template>
|
|
|
|
<div class="workflow-use">
|
|
|
|
|
2020-11-17 16:41:43 +08:00
|
|
|
<WorkflowInfo v-if="done" :wf="this.node"/>
|
2020-11-12 18:21:03 +08:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
import {findWorkflowStep} from "@/api/workflowProcess.js"
|
|
|
|
export default {
|
|
|
|
name:"WorklowUse",
|
|
|
|
data(){
|
|
|
|
return{
|
2020-11-17 16:41:43 +08:00
|
|
|
done:false
|
2020-11-12 18:21:03 +08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
async created(){
|
|
|
|
const workflowId = this.$route.query.workflowId
|
|
|
|
const actionId = this.$route.query.actionId
|
|
|
|
const businessId = this.$route.query.businessId
|
|
|
|
if(workflowId){
|
|
|
|
const res = await findWorkflowStep({id:workflowId})
|
|
|
|
if(res.code == 0){
|
|
|
|
this.workflow = res.data.workflow
|
2020-11-17 16:41:43 +08:00
|
|
|
this.node = res.data.workflow.nodes[0]
|
|
|
|
this.done = true
|
2020-11-12 18:21:03 +08:00
|
|
|
}
|
|
|
|
}
|
2020-11-17 16:41:43 +08:00
|
|
|
},
|
|
|
|
beforeCreate(){
|
|
|
|
this.$options.components.WorkflowInfo = ()=>import("@/"+this.node.view)
|
2020-11-12 18:21:03 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|