pms/web/src/view/workflow/workflowUse/workflowUse.vue

33 lines
883 B
Vue
Raw Normal View History

2020-11-12 18:21:03 +08:00
<template>
<div class="workflow-use">
<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{
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
this.node = res.data.workflow.nodes[0]
this.done = true
2020-11-12 18:21:03 +08:00
}
}
},
beforeCreate(){
this.$options.components.WorkflowInfo = ()=>import("@/"+this.node.view)
2020-11-12 18:21:03 +08:00
}
}
</script>