parent
c4e6163437
commit
dbcefcca9b
@ -69,8 +69,8 @@ export const taskAddSign = async (data) => {
|
|||||||
/**
|
/**
|
||||||
* 获取减签任务列表
|
* 获取减签任务列表
|
||||||
*/
|
*/
|
||||||
export const getSubSignTaskList = async (id: string) => {
|
export const getChildrenTaskList = async (id: string) => {
|
||||||
return await request.get({ url: '/bpm/task/get-sub-sign?taskId=' + id })
|
return await request.get({ url: '/bpm/task/get-children-task-list?taskId=' + id })
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<el-drawer v-model="drawerVisible" title="子任务" size="70%">
|
<el-drawer v-model="drawerVisible" title="子任务" size="70%">
|
||||||
<template #header>
|
<template #header>
|
||||||
<h4>【{{ baseTask.name }} 】审批人:{{ baseTask.assigneeUser?.nickname }}</h4>
|
<h4>【{{ baseTask.name }} 】审批人:{{ baseTask.assigneeUser?.nickname }}</h4>
|
||||||
<el-button style="margin-left: 5px" type="danger" plain @click="handleSubSign(baseTask)">
|
<el-button style="margin-left: 5px" v-if="showSubSignButton(baseTask)" type="danger" plain @click="handleSubSign(baseTask)">
|
||||||
<Icon icon="ep:remove" />
|
<Icon icon="ep:remove" />
|
||||||
减签
|
减签
|
||||||
</el-button>
|
</el-button>
|
||||||
@ -32,7 +32,7 @@
|
|||||||
<el-table-column label="操作" prop="operation">
|
<el-table-column label="操作" prop="operation">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
v-if="!isEmpty(scope.row.children)"
|
v-if="showSubSignButton(scope.row)"
|
||||||
type="danger"
|
type="danger"
|
||||||
plain
|
plain
|
||||||
@click="handleSubSign(scope.row)"
|
@click="handleSubSign(scope.row)"
|
||||||
@ -83,4 +83,17 @@ const taskSubSignDialogForm = ref()
|
|||||||
const handleSubSign = (item) => {
|
const handleSubSign = (item) => {
|
||||||
taskSubSignDialogForm.value.open(item.id)
|
taskSubSignDialogForm.value.open(item.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 显示减签按钮
|
||||||
|
* @param task
|
||||||
|
*/
|
||||||
|
const showSubSignButton = (task:any) => {
|
||||||
|
if(!isEmpty(task.children)){
|
||||||
|
//有子任务,且子任务有任意一个是 待处理 和 待前置任务完成 则显示减签按钮
|
||||||
|
const subTask = task.children.find((item) => item.result === 1 || item.result === 9)
|
||||||
|
return !isEmpty(subTask)
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -44,7 +44,7 @@ const formRef = ref() // 表单 Ref
|
|||||||
const subTaskList = ref([])
|
const subTaskList = ref([])
|
||||||
/** 打开弹窗 */
|
/** 打开弹窗 */
|
||||||
const open = async (id: string) => {
|
const open = async (id: string) => {
|
||||||
subTaskList.value = await TaskApi.getSubSignTaskList(id)
|
subTaskList.value = await TaskApi.getChildrenTaskList(id)
|
||||||
if (isEmpty(subTaskList.value)) {
|
if (isEmpty(subTaskList.value)) {
|
||||||
message.warning('当前没有可减签的任务')
|
message.warning('当前没有可减签的任务')
|
||||||
return false
|
return false
|
||||||
|
Loading…
Reference in New Issue
Block a user