From e29b1a9298f0ae8e8cdd9e57d18cb7b48e9253ef Mon Sep 17 00:00:00 2001
From: gssong <1742057357@qq.com>
Date: Sat, 1 Jul 2023 13:38:26 +0800
Subject: [PATCH] =?UTF-8?q?add=20=E6=B7=BB=E5=8A=A0=E4=BB=BB=E5=8A=A1?=
=?UTF-8?q?=E5=BD=92=E8=BF=98=E8=AE=A4=E9=A2=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/workflow/task/index.ts | 24 ++++++++++
src/views/workflow/processInstance/index.vue | 4 +-
src/views/workflow/task/index.vue | 49 ++++++++++++++++----
3 files changed, 65 insertions(+), 12 deletions(-)
diff --git a/src/api/workflow/task/index.ts b/src/api/workflow/task/index.ts
index 2c31a23..88973ba 100644
--- a/src/api/workflow/task/index.ts
+++ b/src/api/workflow/task/index.ts
@@ -52,4 +52,28 @@ export const completeTask = (data: object) => {
});
};
+/**
+ * 认领任务
+ * @param taskId
+ * @returns {*}
+ */
+export const claim = (taskId: string) => {
+ return request({
+ url: '/workflow/task/claim/' + taskId,
+ method: 'post'
+ });
+};
+
+/**
+ * 归还任务
+ * @param taskId
+ * @returns {*}
+ */
+export const returnTask = (taskId: string) => {
+ return request({
+ url: '/workflow/task/returnTask/' + taskId,
+ method: 'post'
+ });
+};
+
diff --git a/src/views/workflow/processInstance/index.vue b/src/views/workflow/processInstance/index.vue
index b2493a7..0edde02 100644
--- a/src/views/workflow/processInstance/index.vue
+++ b/src/views/workflow/processInstance/index.vue
@@ -111,7 +111,7 @@
:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
- @pagination="getProcessInstanceRunningList"
+ @pagination="handleQuery"
/>
@@ -219,7 +219,6 @@ const handleApprovalRecord = (row: any) => {
};
/** 搜索按钮操作 */
const handleQuery = () => {
- queryParams.value.pageNum = 1;
if ('running' === tab.value) {
getProcessInstanceRunningList();
} else {
@@ -274,6 +273,7 @@ const handleDelete = async (row: any) => {
proxy?.$modal.msgSuccess('删除成功');
};
const changeTab = async (data: string) => {
+ queryParams.value.pageNum = 1;
if ('running' === data) {
getProcessInstanceRunningList();
} else {
diff --git a/src/views/workflow/task/index.vue b/src/views/workflow/task/index.vue
index 8f51c88..7882ecd 100644
--- a/src/views/workflow/task/index.vue
+++ b/src/views/workflow/task/index.vue
@@ -38,15 +38,24 @@
-
-
-
- {{scope.row.businessStatusName}}
+
+
+
+
+ {{ item }}
+
+
+
+
+
+ {{ scope.row.assigneeName }}
+
-
+
- 已完成
+ {{scope.row.businessStatusName}}
+ 已完成
@@ -56,9 +65,15 @@
审批记录
-
+
办理
+
+ 归还
+
+
+ 认领
+
@@ -68,7 +83,7 @@
:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
- @pagination="getWaitingList"
+ @pagination="handleQuery"
/>
@@ -77,7 +92,7 @@