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() {