From 15e6209aa3859703e0c738a231a7f6e1b1f5c504 Mon Sep 17 00:00:00 2001 From: dap <15891557205@163.com> Date: Tue, 17 Dec 2024 16:09:13 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E8=AF=B7=E5=81=87=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E4=B8=8D=E5=90=8C=E7=8A=B6=E6=80=81=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/api/workflow/instance/index.ts | 5 +--- .../src/views/workflow/leave/index.vue | 25 +++++++++++++++++++ 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/apps/web-antd/src/api/workflow/instance/index.ts b/apps/web-antd/src/api/workflow/instance/index.ts index 1bba5911..16d72620 100644 --- a/apps/web-antd/src/api/workflow/instance/index.ts +++ b/apps/web-antd/src/api/workflow/instance/index.ts @@ -47,10 +47,7 @@ export function deleteByInstanceIds(instanceIds: IDS) { * 撤销流程 * @param data */ -export function cancelProcessApply(data: { - businessId: string; - message?: string; -}) { +export function cancelProcessApply(data: { businessId: ID; message?: string }) { return requestClient.putWithMsg( '/workflow/instance/cancelProcessApply', data, diff --git a/apps/web-antd/src/views/workflow/leave/index.vue b/apps/web-antd/src/views/workflow/leave/index.vue index de9c2eaf..252dc00e 100644 --- a/apps/web-antd/src/views/workflow/leave/index.vue +++ b/apps/web-antd/src/views/workflow/leave/index.vue @@ -13,6 +13,7 @@ import { vxeCheckboxChecked, type VxeGridProps, } from '#/adapter/vxe-table'; +import { cancelProcessApply } from '#/api/workflow/instance'; import { commonDownloadExcel } from '#/utils/file/download'; import userSelectModal from '../components/user-select-modal.vue'; @@ -80,6 +81,14 @@ async function handleDelete(row: Required) { await tableApi.query(); } +async function handleRevoke(row: Required) { + await cancelProcessApply({ + businessId: row.id, + message: '申请人撤销流程!', + }); + await tableApi.query(); +} + function handleMultiDelete() { const rows = tableApi.grid.getCheckboxRecords(); const ids = rows.map((row: Required) => row.id); @@ -146,6 +155,7 @@ function handleTest() {