Browse Source

Merge remote-tracking branch 'origin/master'

lanceJiang 1 year ago
parent
commit
d2a0c874f7

File diff suppressed because it is too large
+ 0 - 3
src/assets/images/flw02.svg


File diff suppressed because it is too large
+ 0 - 3
src/assets/images/flw03.svg


+ 9 - 1
src/components/Flow/FlowTypeDot.vue

@@ -11,7 +11,7 @@
 		</template>
 
 		<!-- 状态 -->
-		<div class="badge">
+		<!-- <div class="badge">
 			<template v-if="status === TaskStatusEnum.ACTIVE">
 				<svg-icon color="#2A5EFF" icon-class="active" />
 			</template>
@@ -24,6 +24,14 @@
 			<template v-else-if="status === TaskStatusEnum.REJECT">
 				<svg-icon icon-class="reject" />
 			</template>
+		</div> -->
+		<div class="badge">
+			<template v-if="type === 3">
+				<svg-icon icon-class="reject" />
+			</template>
+			<template v-else>
+				<svg-icon icon-class="approval" />
+			</template>
 		</div>
 	</div>
 </template>

+ 33 - 18
src/views/approve/components/approvedContent.vue

@@ -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 {

+ 1 - 1
src/views/approve/components/approvedItem.vue

@@ -84,7 +84,7 @@
 								<el-tag v-if="i.instanceState === 0">审批中</el-tag>
 								<el-tag v-if="i.instanceState === 1" type="success">审批通过</el-tag>
 								<el-tag v-if="i.instanceState === 2" type="danger">审批拒绝</el-tag>
-								<el-tag v-if="i.instanceState === 3">撤销审批</el-tag>
+								<el-tag v-if="i.instanceState === 3" type="warning">撤销审批</el-tag>
 								<el-tag v-if="i.instanceState === 4" type="danger">超时结束</el-tag>
 								<el-tag v-if="i.instanceState === 5" type="danger">强制终止</el-tag>
 							</template>

+ 3 - 0
src/views/approve/launch/ItemDrawer.vue

@@ -45,6 +45,9 @@
 						</div>
 					</template>
 				</el-timeline-item>
+				<el-timeline-item>
+					<div style="padding-bottom: 6px">结束</div>
+				</el-timeline-item>
 			</el-timeline>
 			<el-divider></el-divider>
 		</div>

Some files were not shown because too many files changed in this diff