Browse Source

增加工作流步骤查看

main
pixel 4 years ago
parent
commit
f326752c3e
  1. 4
      web/src/components/gva-wfd/components/DetailPanel/ProcessDetail.vue
  2. 1
      web/src/view/exa_wf_leave/exa_wf_leaveFrom.vue
  3. 1
      web/src/view/workflow/workflowCreate/workflowCreate.vue
  4. 56
      web/src/view/workflow/workflowUse/workflowUse.vue

4
web/src/components/gva-wfd/components/DetailPanel/ProcessDetail.vue

@ -17,7 +17,7 @@
/> />
</div> </div>
<DefaultDetail :model="model" :onChange="onChange" :readOnly="readOnly" /> <DefaultDetail :model="model" :onChange="onChange" :readOnly="readOnly" />
<div class="panelRow">
<!-- <div class="panelRow">
<div>{{ i18n['process.category'] }}</div> <div>{{ i18n['process.category'] }}</div>
<el-select <el-select
style="width: 90%; font-size: 12px" style="width: 90%; font-size: 12px"
@ -35,7 +35,7 @@
:value="category.id" :value="category.id"
/> />
</el-select> </el-select>
</div>
</div> -->
<div class="panelRow"> <div class="panelRow">
<div>{{ i18n['process.name'] }}</div> <div>{{ i18n['process.name'] }}</div>

1
web/src/view/exa_wf_leave/exa_wf_leaveFrom.vue

@ -96,6 +96,7 @@ export default {
return false return false
} }
} }
return true
}, },
...mapGetters("user", ["userInfo"]) ...mapGetters("user", ["userInfo"])
}, },

1
web/src/view/workflow/workflowCreate/workflowCreate.vue

@ -140,6 +140,7 @@ export default {
}); });
} }
const authorityRes = await getAuthorityList({ page: 1, pageSize: 9999999 }); const authorityRes = await getAuthorityList({ page: 1, pageSize: 9999999 });
console.log(authorityRes)
if (authorityRes.code == 0) { if (authorityRes.code == 0) {
authorityRes.data.list.map(item => { authorityRes.data.list.map(item => {
this.authorities.push({ this.authorities.push({

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

@ -1,6 +1,23 @@
<template> <template>
<div class="workflow-use"> <div class="workflow-use">
<WorkflowInfo v-if="done" :wf="this.node" :business="business" :workflowMoveID="$route.query.workflowMoveID" />
<div style="padding:10px 20px">
<el-steps :active="moves.length-1" :process-status="processStatus" finish-status="finish" align-center>
<el-step v-for="(item, key) in moves" :key="key">
<div slot="title">{{ item.workflowNode.label }}</div>
<div slot="description">
<div>节点说明:{{ item.workflowNode.description }}</div>
<div>操作人:{{ item.promoter.nickName }}</div>
<div>操作参数:{{ item.param||'无参数' }}</div>
</div>
</el-step>
</el-steps>
</div>
<WorkflowInfo
v-if="done"
:wf="this.node"
:business="business"
:workflowMoveID="$route.query.workflowMoveID"
/>
</div> </div>
</template> </template>
<script> <script>
@ -11,7 +28,34 @@ export default {
return{ return{
done:false, done:false,
business:null, business:null,
node:null
node:null,
moves:[]
}
},
computed:{
processStatus(){
const node = this.moves[this.moves.length-1]
if(node&&node.workflowNode.clazz == "end"){
if(node.workflowNode.success){
return "success"
}else{
return "error"
}
}else{
return "process"
}
}
},
methods:{
createDone(){
let path = ""
if(this.node.view){
path = this.node.view
}else{
path = this.workflow.view
}
this.$options.components.WorkflowInfo = ()=>import("@/"+path)
this.done = true
} }
}, },
async created(){ async created(){
@ -22,19 +66,21 @@ export default {
if(res.code == 0){ if(res.code == 0){
this.workflow = res.data.workflow this.workflow = res.data.workflow
this.node = res.data.workflow.nodes[0] this.node = res.data.workflow.nodes[0]
this.done = true
this.createDone()
} }
}else if(workflowMoveID){ }else if(workflowMoveID){
const res = await getWorkflowMoveByID({id:workflowMoveID}) const res = await getWorkflowMoveByID({id:workflowMoveID})
if(res.code == 0){ if(res.code == 0){
this.business = res.data.business this.business = res.data.business
this.workflow = res.data.move.workflowProcess
this.node = res.data.move.workflowNode this.node = res.data.move.workflowNode
this.done = true
this.moves = res.data.moves
this.createDone()
} }
} }
}, },
beforeCreate(){ beforeCreate(){
this.$options.components.WorkflowInfo = ()=>import("@/"+this.node.view)
} }
} }
</script> </script>
Loading…
Cancel
Save