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 @@ /> - + - - - - - - - + + + - + + + + + + + +