|
@@ -30,7 +30,7 @@
|
|
|
<FlowStatusTag :status="0" />
|
|
|
</div>
|
|
|
<div class="initiator-info">
|
|
|
- <FlowNodeAvatar id="1" />
|
|
|
+ <FlowNodeAvatar :name="currentTaskRow.createBy" />
|
|
|
<div class="begin-time">{{ currentTaskRow.createTime }} 提交</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -50,7 +50,6 @@
|
|
|
<template #dot>
|
|
|
<FlowTypeDot :status="active.taskState" :type="active.taskType" />
|
|
|
</template>
|
|
|
-
|
|
|
<div v-show="active.type === 0" class="timeline-box flex-1">
|
|
|
<span style="font-size: 16px; color: #86909c; display: block; margin-bottom: 3px">评论</span>
|
|
|
<div class="flex flex-align-center">
|
|
@@ -87,8 +86,7 @@
|
|
|
3、认领任务显示认领按钮
|
|
|
4、我收到的任务显示评论
|
|
|
-->
|
|
|
- <div v-if="!([2, 5].indexOf(currentTaskRow.instanceState) !== -1)"
|
|
|
- class="flow-actions" >
|
|
|
+ <div v-if="currentTaskRow.instanceState === 0" class="flow-actions">
|
|
|
<el-button :icon="ChatLineSquare" @click="openComment('reviewVisible', 'review')">评论</el-button>
|
|
|
<template v-if="currentTaskType !== 'myReceived' || currentTaskType !== 'approved'">
|
|
|
<el-button
|
|
@@ -192,6 +190,7 @@ import LoseSignDialog from './loseSignDialog'
|
|
|
import RollbackDialog from './rollbackDialog'
|
|
|
import viewForm from '@/utils/form'
|
|
|
import { storeToRefs } from 'pinia'
|
|
|
+import {ElMessage, ElMessageBox} from "element-plus";
|
|
|
|
|
|
defineProps({
|
|
|
/**
|
|
@@ -352,12 +351,6 @@ const getTaskDetail = () => {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
-/** 认领任务 **/
|
|
|
-const claimTaskEv = async () => {
|
|
|
- const res = await processClaimTaskApi(currentTaskRow.value.taskId)
|
|
|
- console.log(res, 'res====')
|
|
|
-}
|
|
|
-
|
|
|
/**
|
|
|
* 详情页面操作按钮回调
|
|
|
*/
|
|
@@ -373,6 +366,28 @@ const closeDetailEv = () => {
|
|
|
taskProcessInfo.setCurrentTaskRow({})
|
|
|
}
|
|
|
|
|
|
+/** 认领任务 **/
|
|
|
+const claimTaskEv = async () => {
|
|
|
+ ElMessageBox.confirm('确定认领当前审批流程?', '提示', {
|
|
|
+ confirmButtonText: '确认',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning',
|
|
|
+ buttonSize: 'default'
|
|
|
+ })
|
|
|
+ .then(async () => {
|
|
|
+ const { data } = await processClaimTaskApi(currentTaskRow.value.taskId)
|
|
|
+ ElMessage({
|
|
|
+ message: data ? '执行成功' : '执行失败',
|
|
|
+ type: data ? 'success' : 'error'
|
|
|
+ })
|
|
|
+ if (!data) return
|
|
|
+ closeDetailEv()
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ console.log('取消')
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* 监听同级子组件的instanceId的值变化 这里可能也有实例Id
|
|
|
* 1、监听instanceId的值变化,如果值有变化,则重新获取审批详情
|
|
@@ -393,7 +408,7 @@ watch(
|
|
|
.flow-detail-content {
|
|
|
height: 100%;
|
|
|
overflow: hidden;
|
|
|
- background: #fff;
|
|
|
+ background: var(--el-bg-color);
|
|
|
border-radius: 6px;
|
|
|
flex: auto;
|
|
|
.flow-detail-container {
|
|
@@ -416,13 +431,13 @@ watch(
|
|
|
.flow-header-box {
|
|
|
font-weight: 400;
|
|
|
font-size: 13px;
|
|
|
- border-bottom: 1px solid #e5e6ec;
|
|
|
+ border-bottom: 1px solid var(--el-border-color);
|
|
|
padding: 0 20px;
|
|
|
height: 39px;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: space-between;
|
|
|
- color: #86909c;
|
|
|
+ color: var(--el-color-info);
|
|
|
.action-area {
|
|
|
display: flex;
|
|
|
gap: 4px;
|
|
@@ -459,7 +474,7 @@ watch(
|
|
|
font-size: 24px;
|
|
|
.title {
|
|
|
font-family: PingFangSC-Semibold, PingFang SC;
|
|
|
- color: #1d2129;
|
|
|
+ color: var(--el-text-color-primary);
|
|
|
}
|
|
|
}
|
|
|
.initiator-info {
|
|
@@ -469,7 +484,7 @@ watch(
|
|
|
.begin-time {
|
|
|
margin-left: 16px;
|
|
|
font-weight: 350;
|
|
|
- color: #86909c;
|
|
|
+ color: var(--el-text-color-placeholder);
|
|
|
font-size: 13px;
|
|
|
-webkit-user-select: none;
|
|
|
user-select: none;
|
|
@@ -477,7 +492,7 @@ watch(
|
|
|
}
|
|
|
}
|
|
|
.area-divider {
|
|
|
- border-bottom: 1px solid rgba(229, 230, 235, 1);
|
|
|
+ border-bottom: 1px solid var(--el-border-color);
|
|
|
margin: 20px 0;
|
|
|
//position: relative;
|
|
|
}
|
|
@@ -495,7 +510,7 @@ watch(
|
|
|
justify-content: flex-end;
|
|
|
height: 52px;
|
|
|
//border-top: 1px solid var(--color-neutral-3);
|
|
|
- border-top: 1px solid #e5e6ec;
|
|
|
+ border-top: 1px solid var(--el-border-color-light);
|
|
|
padding: 0 20px;
|
|
|
}
|
|
|
}
|
|
@@ -505,7 +520,7 @@ watch(
|
|
|
margin-top: 4px;
|
|
|
padding: 8px;
|
|
|
border-radius: 4px;
|
|
|
- background-color: #f8f8fa;
|
|
|
+ background-color: var(--el-bg-color-page);
|
|
|
}
|
|
|
|
|
|
.timeline-box {
|