Ver Fonte

优化审批接口

hubin há 1 ano atrás
pai
commit
83182bb355

+ 4 - 4
src/api/flow/process.ts

@@ -9,7 +9,7 @@ const api = {
 	clone: '/v1/process/clone', // 复制流程
 	updateProcessState: 'v1/process/update-state', // 更新流程状态
 	detailProcess: '/v1/process/get', // 流程详情
-	starProcessList: '/v1/process/list-start', // 发起审批流程列表
+	launchProcessList: '/v1/process/list-launch' // 发起审批流程列表
 }
 
 function progressCreateApi(data: any): AxiosPromise {
@@ -34,9 +34,9 @@ function progressListCategoryApi(data: any): AxiosPromise {
 	})
 }
 
-function starProcessListApi(data: any): AxiosPromise {
+function launchProcessListApi(data: any): AxiosPromise {
 	return request({
-		url: api.starProcessList,
+		url: api.launchProcessList,
 		method: 'post',
 		data
 	})
@@ -69,5 +69,5 @@ export default {
 	progressCloneApi,
 	processUpdateStateApi,
 	processDetailApi,
-	starProcessListApi
+	launchProcessListApi
 }

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

@@ -50,7 +50,7 @@ const handleChange = val => {
 
 // 列表
 const listEv = async () => {
-	const res = await model.starProcessListApi()
+	const res = await model.launchProcessListApi()
 	startList.value = res || []
 	activeNames.value = res.length ? [res[0].categoryName] : ['']
 }

+ 13 - 0
src/views/approve/myReceived/index.vue

@@ -122,6 +122,19 @@ const columns = [
 		label: '发起时间',
 		minWidth: 126
 	},
+	{
+		prop: 'endTime',
+		label: '结束时间',
+		minWidth: 126
+	},
+	{
+		prop: 'duration',
+		label: '处理耗时',
+		minWidth: 100,
+		slots: {
+			default: 'durationSlot'
+		}
+	},
 	{
 		prop: 'expireTime',
 		label: '期望完成时间',

+ 31 - 16
src/views/approve/pendingClaim/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">
@@ -90,25 +90,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',