From 5286ad1cd6945bd55ab01c21bf81e46da8e81108 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 22 Mar 2024 08:26:26 +0800 Subject: [PATCH] =?UTF-8?q?BPM=EF=BC=9A=E6=96=B0=E5=A2=9E=E3=80=90?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E5=AE=9E=E4=BE=8B=E3=80=91=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=EF=BC=8C=E7=94=A8=E4=BA=8E=E5=85=A8=E9=83=A8=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E5=AE=9E=E4=BE=8B=E7=9A=84=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/bpm/processInstance/index.ts | 18 +- src/views/bpm/oa/leave/index.vue | 2 +- src/views/bpm/processInstance/index.vue | 47 ++-- .../bpm/processInstance/manager/index.vue | 255 ++++++++++++++++++ 4 files changed, 300 insertions(+), 22 deletions(-) create mode 100644 src/views/bpm/processInstance/manager/index.vue diff --git a/src/api/bpm/processInstance/index.ts b/src/api/bpm/processInstance/index.ts index d5d0c05c..81640625 100644 --- a/src/api/bpm/processInstance/index.ts +++ b/src/api/bpm/processInstance/index.ts @@ -31,20 +31,32 @@ export type ProcessInstanceCopyVO = { reason: string } -export const getMyProcessInstancePage = async (params) => { +export const getProcessInstanceMyPage = async (params: any) => { return await request.get({ url: '/bpm/process-instance/my-page', params }) } +export const getProcessInstanceManagerPage = async (params: any) => { + return await request.get({ url: '/bpm/process-instance/manager-page', params }) +} + export const createProcessInstance = async (data) => { return await request.post({ url: '/bpm/process-instance/create', data: data }) } -export const cancelProcessInstance = async (id: number, reason: string) => { +export const cancelProcessInstanceByStartUser = async (id: number, reason: string) => { const data = { id: id, reason: reason } - return await request.delete({ url: '/bpm/process-instance/cancel', data: data }) + return await request.delete({ url: '/bpm/process-instance/cancel-by-start-user', data: data }) +} + +export const cancelProcessInstanceByAdmin = async (id: number, reason: string) => { + const data = { + id: id, + reason: reason + } + return await request.delete({ url: '/bpm/process-instance/cancel-by-admin', data: data }) } export const getProcessInstance = async (id: string) => { diff --git a/src/views/bpm/oa/leave/index.vue b/src/views/bpm/oa/leave/index.vue index 4af7ad3c..fe96a498 100644 --- a/src/views/bpm/oa/leave/index.vue +++ b/src/views/bpm/oa/leave/index.vue @@ -226,7 +226,7 @@ const cancelLeave = async (row) => { inputErrorMessage: '取消原因不能为空' }) // 发起取消 - await ProcessInstanceApi.cancelProcessInstance(row.id, value) + await ProcessInstanceApi.cancelProcessInstanceByStartUser(row.id, value) message.success('取消成功') // 刷新列表 await getList() diff --git a/src/views/bpm/processInstance/index.vue b/src/views/bpm/processInstance/index.vue index 504a4801..950f34f0 100644 --- a/src/views/bpm/processInstance/index.vue +++ b/src/views/bpm/processInstance/index.vue @@ -58,7 +58,7 @@ /> - + - - - - - - - + + + - + + + + + + + +