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. 60
      web/src/view/workflow/workflowUse/workflowUse.vue

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

@ -17,7 +17,7 @@
/>
</div>
<DefaultDetail :model="model" :onChange="onChange" :readOnly="readOnly" />
<div class="panelRow">
<!-- <div class="panelRow">
<div>{{ i18n['process.category'] }}</div>
<el-select
style="width: 90%; font-size: 12px"
@ -35,7 +35,7 @@
:value="category.id"
/>
</el-select>
</div>
</div> -->
<div class="panelRow">
<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 true
},
...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 });
console.log(authorityRes)
if (authorityRes.code == 0) {
authorityRes.data.list.map(item => {
this.authorities.push({

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

@ -1,7 +1,24 @@
<template>
<div class="workflow-use">
<WorkflowInfo v-if="done" :wf="this.node" :business="business" :workflowMoveID="$route.query.workflowMoveID" />
</div>
<div class="workflow-use">
<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>
</template>
<script>
import {findWorkflowStep,getWorkflowMoveByID} from "@/api/workflowProcess.js"
@ -11,7 +28,34 @@ export default {
return{
done:false,
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(){
@ -22,19 +66,21 @@ export default {
if(res.code == 0){
this.workflow = res.data.workflow
this.node = res.data.workflow.nodes[0]
this.done = true
this.createDone()
}
}else if(workflowMoveID){
const res = await getWorkflowMoveByID({id:workflowMoveID})
if(res.code == 0){
this.business = res.data.business
this.workflow = res.data.move.workflowProcess
this.node = res.data.move.workflowNode
this.done = true
this.moves = res.data.moves
this.createDone()
}
}
},
beforeCreate(){
this.$options.components.WorkflowInfo = ()=>import("@/"+this.node.view)
}
}
</script>
Loading…
Cancel
Save