From 3357b5f0f0919f7a52cd32a6d6de0acb14e0daaf Mon Sep 17 00:00:00 2001 From: dengzedong <dengzedong@email> Date: 星期二, 17 十二月 2024 17:29:01 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/api/bpm/task/index.ts | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 51 insertions(+), 4 deletions(-) diff --git a/src/api/bpm/task/index.ts b/src/api/bpm/task/index.ts index f3cda9f..d4c1038 100644 --- a/src/api/bpm/task/index.ts +++ b/src/api/bpm/task/index.ts @@ -1,7 +1,44 @@ import request from '@/config/axios' -export type TaskVO = { - id: number +/** + * 任务状态枚举 + */ +export enum TaskStatusEnum { + /** + * 未开始 + */ + NOT_START = -1, + + /** + * 待审批 + */ + WAIT = 0, + /** + * 审批中 + */ + RUNNING = 1, + /** + * 审批通过 + */ + APPROVE = 2, + + /** + * 审批不通过 + */ + REJECT = 3, + + /** + * 已取消 + */ + CANCEL = 4, + /** + * 已退回 + */ + RETURN = 5, + /** + * 审批通过中 + */ + APPROVING = 7 } export const getTaskTodoPage = async (params: any) => { @@ -30,12 +67,12 @@ }) } -// 获取所有可回退的节点 +// 获取所有可退回的节点 export const getTaskListByReturn = async (id: string) => { return await request.get({ url: '/bpm/task/list-by-return', params: { id } }) } -// 回退 +// 退回 export const returnTask = async (data: any) => { return await request.put({ url: '/bpm/task/return', data }) } @@ -60,6 +97,16 @@ return await request.delete({ url: '/bpm/task/delete-sign', data }) } +// 抄送 +export const copyTask = async (data: any) => { + return await request.put({ url: '/bpm/task/copy', data }) +} + +// 获取我的待办任务 +export const myTodoTask = async (processInstanceId: string) => { + return await request.get({ url: '/bpm/task/my-todo?processInstanceId=' + processInstanceId }) +} + // 获取减签任务列表 export const getChildrenTaskList = async (id: string) => { return await request.get({ url: '/bpm/task/list-by-parent-task-id?parentTaskId=' + id }) -- Gitblit v1.9.3