Jelajahi Sumber

feat: 催办

luoyali 7 bulan lalu
induk
melakukan
e92af0a437

+ 11 - 2
src/api/flow/processTask.ts

@@ -18,7 +18,8 @@ const api = {
 	revokeProcess: '/v1/process-task/revoke', // 撤回任务
 	previousNodeName: '/v1/process-task/previous-nodes', // 以前节点名称列表
 	processTaskJump: '/v1/process-task/jump', // 跳到指定节点任务
-	countTask: '/v1/process-task/count-pending-approval' // 我的待办数量
+	countTask: '/v1/process-task/count-pending-approval', // 我的待办数量
+	urgeProcess: '/v1/process-task/urge' // 催办
 }
 
 // 待认领任务分页列表
@@ -170,6 +171,13 @@ export function countTaskApi(): AxiosPromise {
 	})
 }
 
+export function progressUrgeApi(data:any): AxiosPromise {
+	return request({
+		url: `${api.urgeProcess}/${data}`,
+		method: 'post'
+	})
+}
+
 export default {
 	processTaskPageMyApplicationApi,
 	processTaskPageApprovedApi,
@@ -184,5 +192,6 @@ export default {
 	processRevokeTaskApi,
 	processPreviousNodeNameApi,
 	processTaskJumpApi,
-	countTaskApi
+	countTaskApi,
+	progressUrgeApi
 }

+ 27 - 2
src/views/approve/components/approvedContent.vue

@@ -133,6 +133,12 @@
             4、我收到的任务显示评论
             -->
 				<div v-if="currentTaskRow.instanceState === 0" class="flow-actions">
+					<el-button
+							v-if="currentTaskType === 'myApplication' && allowRevocation && (currentTaskType !== 'myReceived' || currentTaskType !== 'approved')"
+							:icon="Bell"
+							@click="openUrgeModal"
+							>催办</el-button
+						>
 					<el-button :icon="ChatLineSquare" @click="openComment('reviewVisible', 'review')">评论</el-button>
 					<template v-if="currentTaskType !== 'myReceived' || currentTaskType !== 'approved'">
 						<el-button v-if="currentTaskType === 'pendingApproval'" :icon="Check" type="primary" @click="handleFormValid">同意</el-button>
@@ -235,8 +241,8 @@ import FlowStatusStamp from '@/components/Flow/FlowStatusStamp.vue'
 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, Printer } from '@element-plus/icons-vue'
-import { processTaskApprovalInfo, processClaimTaskApi } from '@/api/flow/processTask'
+import { ChatLineSquare, Check, Close, Switch, DArrowLeft, Plus, Minus, More, Printer, Bell } from '@element-plus/icons-vue'
+import { processTaskApprovalInfo, processClaimTaskApi, progressUrgeApi } from '@/api/flow/processTask'
 import { formatTimestamp } from '@/utils/datetime'
 import ReviewDialog from './reviewDialog'
 import AddSignDialog from './addSignDialog'
@@ -594,6 +600,25 @@ const claimTaskEv = async () => {
 		})
 }
 
+const openUrgeModal = () => {
+	const item = currentTaskRow.value
+  ElMessageBox.confirm(
+    `是否对流程${item.processName} 发起催办?`,
+    '提示',
+    {
+      confirmButtonText: '确认',
+      cancelButtonText: '取消',
+      type: 'warning',
+      buttonSize: 'default'
+    }
+  ).then(async () => {
+		await progressUrgeApi(currentTaskRow.value.instanceId)
+  }).catch(() => {
+    // Handle the cancel action if needed
+    console.log('取消')
+  })
+}
+
 /**
  * 监听同级子组件的instanceId的值变化 这里可能也有实例Id
  * 1、监听instanceId的值变化,如果值有变化,则重新获取审批详情

+ 1 - 1
src/views/login/components/passwordForm.vue

@@ -30,7 +30,7 @@
 		</el-form-item>
 
 		<el-form-item>
-			<el-button type="primary" style="width: 100%" :loading="loading" @click="giteeLogin">
+			<el-button type="primary" style="width: 100%" @click="giteeLogin">
 				<svg-icon style="font-size: 18px; margin-right: 10px" icon-class="flow-gitee" />
 				使用 Gitee 账号 Star 免密登录
 			</el-button>