Browse Source

优化代码

hubin 1 year ago
parent
commit
85b15d2c8a

+ 1 - 0
src/store/modules/flow.ts

@@ -10,6 +10,7 @@ const basicInfo: BasicInfoIndex = {
 	processIcon: 'approval', // 流程图标
 	categoryId: '', // 流程组分类ID
 	remark: '', // 备注说明
+	createTime: '', // 创建时间
 	useScope: 0, // 使用范围 0,全员 1,指定人员(业务关联) 2,均不可提交
 	processActorList: [
 		{

+ 1 - 1
src/views/approve/start/index.vue → src/views/approve/launch/index.vue

@@ -21,7 +21,7 @@
 											</div>
 										</div>
 										<div class="space-item">
-											<div>2023-09-03 17:00:00</div>
+											<div>{{ i_children.createTime }}</div>
 										</div>
 										<div class="space-item">
 											<div>{{ i_children.processKey }}</div>

+ 31 - 16
src/views/approve/pendingApproval/index.vue

@@ -17,13 +17,13 @@
 					<el-button type="primary">操作待审批</el-button>
 				</template>
 
-				<template #instanceStateSlot="scope">
-					<el-tag v-if="scope.row.instanceState === 0" size="small" effect="plain">审批中</el-tag>
-					<el-tag v-if="scope.row.instanceState === 1" size="small" type="info" effect="plain">审批通过</el-tag>
-					<el-tag v-if="scope.row.instanceState === 2" size="small" type="warning" effect="plain">审批拒绝</el-tag>
-					<el-tag v-if="scope.row.instanceState === 2" size="small" type="warning" effect="plain">撤销审批</el-tag>
-					<el-tag v-if="scope.row.instanceState === 2" size="small" type="warning" effect="plain">超时结束</el-tag>
-					<el-tag v-if="scope.row.instanceState === 2" size="small" type="warning" effect="plain">强制终止</el-tag>
+				<template #taskTypeSlot="scope">
+					<el-tag v-if="scope.row.taskType === 0" effect="plain">主办</el-tag>
+					<el-tag v-if="scope.row.taskType === 1" type="success" effect="plain">转办</el-tag>
+					<el-tag v-if="scope.row.taskType === 2" type="info" effect="plain">委派</el-tag>
+					<el-tag v-if="scope.row.taskType === 3 && scope.row.performType === 1" type="info" effect="plain">会签</el-tag>
+					<el-tag v-if="scope.row.taskType === 3 && scope.row.performType === 2" type="warning" effect="plain">或签</el-tag>
+					<el-tag v-if="scope.row.taskType === 3 && scope.row.performType === 2" type="danger" effect="plain">票签</el-tag>
 				</template>
 
 				<template #actionSlot="scope">
@@ -89,25 +89,40 @@ const columns = [
 	{
 		prop: 'processName',
 		label: '流程名称',
-		minWidth: 80
+		minWidth: 150
 	},
 	{
-		prop: 'instanceState',
-		label: '流程状态',
+		prop: 'launchBy',
+		label: '发起人',
+		minWidth: 100
+	},
+	{
+		prop: 'launchTime',
+		label: '发起时间',
+		minWidth: 150
+	},
+	{
+		prop: 'taskName',
+		label: '当前任务名称',
+		minWidth: 150
+	},
+	{
+		prop: 'taskType',
+		label: '任务类型',
 		minWidth: 100,
 		slots: {
-			default: 'instanceStateSlot'
+			default: 'taskTypeSlot'
 		}
 	},
 	{
-		prop: 'createBy',
-		label: '发布人',
-		minWidth: 100
+		prop: 'expireTime',
+		label: '期望任务完成时间',
+		minWidth: 150
 	},
 	{
 		prop: 'createTime',
-		label: '发布时间',
-		minWidth: 126
+		label: '任务开始时间',
+		minWidth: 150
 	},
 	{
 		prop: 'action',