|
@@ -71,6 +71,8 @@
|
|
|
<el-button :icon="ChatLineSquare" @click="openComment('reviewVisible')">评论</el-button>
|
|
|
<el-button :icon="Check" type="success" @click="openComment('consentOrRefuseVisible', 'agree')">同意</el-button>
|
|
|
<el-button :icon="Close" type="danger" @click="openComment('consentOrRefuseVisible', 'reject')">拒绝</el-button>
|
|
|
+ <el-button :icon="Close" @click="withDrawTaskEv">撤回</el-button>
|
|
|
+ <el-button :icon="Close" @click="claimTaskEv">认领</el-button>
|
|
|
<el-dropdown style="margin-left: 12px">
|
|
|
<el-button :icon="More">更多</el-button>
|
|
|
<template #dropdown>
|
|
@@ -137,7 +139,7 @@ import FlowStatusTag from '@/components/Flow/FlowStatusTag.vue'
|
|
|
import FlowNodeAvatar from '@/components/Flow/FlowNodeAvatar.vue'
|
|
|
import FlowTypeDot from '@/components/Flow/FlowTypeDot.vue'
|
|
|
import { ChatLineSquare, Check, Close, Switch, DArrowLeft, Plus, Minus, More } from '@element-plus/icons-vue'
|
|
|
-import { processApprovalInfoApi, processTaskApprovalInfo } from '@/api/flow/processTask'
|
|
|
+import { processApprovalInfoApi, processTaskApprovalInfo, processClaimTaskApi, processWithDrawTaskApi } from '@/api/flow/processTask'
|
|
|
import { formatTimestamp } from '@/utils/datetime'
|
|
|
import ReviewDialog from './reviewDialog'
|
|
|
import AddSignDialog from './addSignDialog'
|
|
@@ -194,8 +196,6 @@ const closeDetailEv = () => {
|
|
|
* @param type 评论 拒绝 同意等
|
|
|
*/
|
|
|
const openComment = (type, item) => {
|
|
|
-
|
|
|
-
|
|
|
switch (type) {
|
|
|
case 'reviewVisible':
|
|
|
reviewVisible.value = !reviewVisible.value
|
|
@@ -297,6 +297,18 @@ const getTaskDetail = () => {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+/** 认领任务 **/
|
|
|
+const claimTaskEv = async () => {
|
|
|
+ const res = await processClaimTaskApi(currentTaskRow.value.taskId)
|
|
|
+ console.log(res, 'res====')
|
|
|
+}
|
|
|
+
|
|
|
+/** 撤回审批 **/
|
|
|
+const withDrawTaskEv = async () => {
|
|
|
+ const res = await processWithDrawTaskApi(currentTaskRow.value.taskId)
|
|
|
+ console.log(res)
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* 监听同级子组件的taskId的值变化
|
|
|
* 1、监听taskId的值变化,如果值有变化,则重新获取审批详情
|