File tree Expand file tree Collapse file tree 3 files changed +18
-5
lines changed
views/bpm/processInstance/detail Expand file tree Collapse file tree 3 files changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -69,8 +69,8 @@ export const taskAddSign = async (data) => {
69
69
/**
70
70
* 获取减签任务列表
71
71
*/
72
- export const getSubSignTaskList = async ( id : string ) => {
73
- return await request . get ( { url : '/bpm/task/get-sub-sign ?taskId=' + id } )
72
+ export const getChildrenTaskList = async ( id : string ) => {
73
+ return await request . get ( { url : '/bpm/task/get-children-task-list ?taskId=' + id } )
74
74
}
75
75
76
76
/**
Original file line number Diff line number Diff line change 2
2
<el-drawer v-model =" drawerVisible" title =" 子任务" size =" 70%" >
3
3
<template #header >
4
4
<h4 >【{{ baseTask.name }} 】审批人:{{ baseTask.assigneeUser?.nickname }}</h4 >
5
- <el-button style =" margin-left : 5px " type =" danger" plain @click =" handleSubSign(baseTask)" >
5
+ <el-button style =" margin-left : 5px " v-if = " showSubSignButton(baseTask) " type =" danger" plain @click =" handleSubSign(baseTask)" >
6
6
<Icon icon =" ep:remove" />
7
7
减签
8
8
</el-button >
32
32
<el-table-column label =" 操作" prop =" operation" >
33
33
<template #default =" scope " >
34
34
<el-button
35
- v-if =" !isEmpty (scope.row.children )"
35
+ v-if =" showSubSignButton (scope.row)"
36
36
type =" danger"
37
37
plain
38
38
@click =" handleSubSign(scope.row)"
@@ -83,4 +83,17 @@ const taskSubSignDialogForm = ref()
83
83
const handleSubSign = (item ) => {
84
84
taskSubSignDialogForm .value .open (item .id )
85
85
}
86
+
87
+ /**
88
+ * 显示减签按钮
89
+ * @param task
90
+ */
91
+ const showSubSignButton = (task : any ) => {
92
+ if (! isEmpty (task .children )){
93
+ // 有子任务,且子任务有任意一个是 待处理 和 待前置任务完成 则显示减签按钮
94
+ const subTask = task .children .find ((item ) => item .result === 1 || item .result === 9 )
95
+ return ! isEmpty (subTask )
96
+ }
97
+ return false
98
+ }
86
99
</script >
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ const formRef = ref() // 表单 Ref
44
44
const subTaskList = ref ([])
45
45
/** 打开弹窗 */
46
46
const open = async (id : string ) => {
47
- subTaskList .value = await TaskApi .getSubSignTaskList (id )
47
+ subTaskList .value = await TaskApi .getChildrenTaskList (id )
48
48
if (isEmpty (subTaskList .value )) {
49
49
message .warning (' 当前没有可减签的任务' )
50
50
return false
You can’t perform that action at this time.
0 commit comments