提交 | 用户 | 时间
|
820397
|
1 |
import request from '@/config/axios' |
H |
2 |
|
3e359e
|
3 |
/** |
H |
4 |
* 任务状态枚举 |
|
5 |
*/ |
|
6 |
export enum TaskStatusEnum { |
|
7 |
/** |
|
8 |
* 未开始 |
|
9 |
*/ |
|
10 |
NOT_START = -1, |
|
11 |
|
|
12 |
/** |
|
13 |
* 待审批 |
|
14 |
*/ |
|
15 |
WAIT = 0, |
|
16 |
/** |
|
17 |
* 审批中 |
|
18 |
*/ |
|
19 |
RUNNING = 1, |
|
20 |
/** |
|
21 |
* 审批通过 |
|
22 |
*/ |
|
23 |
APPROVE = 2, |
|
24 |
|
|
25 |
/** |
|
26 |
* 审批不通过 |
|
27 |
*/ |
|
28 |
REJECT = 3, |
|
29 |
|
|
30 |
/** |
|
31 |
* 已取消 |
|
32 |
*/ |
|
33 |
CANCEL = 4, |
|
34 |
/** |
|
35 |
* 已退回 |
|
36 |
*/ |
|
37 |
RETURN = 5, |
|
38 |
/** |
|
39 |
* 审批通过中 |
|
40 |
*/ |
|
41 |
APPROVING = 7 |
820397
|
42 |
} |
H |
43 |
|
|
44 |
export const getTaskTodoPage = async (params: any) => { |
|
45 |
return await request.get({ url: '/bpm/task/todo-page', params }) |
|
46 |
} |
|
47 |
|
|
48 |
export const getTaskDonePage = async (params: any) => { |
|
49 |
return await request.get({ url: '/bpm/task/done-page', params }) |
|
50 |
} |
|
51 |
|
|
52 |
export const getTaskManagerPage = async (params: any) => { |
|
53 |
return await request.get({ url: '/bpm/task/manager-page', params }) |
|
54 |
} |
|
55 |
|
|
56 |
export const approveTask = async (data: any) => { |
|
57 |
return await request.put({ url: '/bpm/task/approve', data }) |
|
58 |
} |
|
59 |
|
|
60 |
export const rejectTask = async (data: any) => { |
|
61 |
return await request.put({ url: '/bpm/task/reject', data }) |
|
62 |
} |
|
63 |
|
|
64 |
export const getTaskListByProcessInstanceId = async (processInstanceId: string) => { |
|
65 |
return await request.get({ |
|
66 |
url: '/bpm/task/list-by-process-instance-id?processInstanceId=' + processInstanceId |
|
67 |
}) |
|
68 |
} |
|
69 |
|
3e359e
|
70 |
// 获取所有可退回的节点 |
820397
|
71 |
export const getTaskListByReturn = async (id: string) => { |
H |
72 |
return await request.get({ url: '/bpm/task/list-by-return', params: { id } }) |
|
73 |
} |
|
74 |
|
3e359e
|
75 |
// 退回 |
820397
|
76 |
export const returnTask = async (data: any) => { |
H |
77 |
return await request.put({ url: '/bpm/task/return', data }) |
|
78 |
} |
|
79 |
|
|
80 |
// 委派 |
|
81 |
export const delegateTask = async (data: any) => { |
|
82 |
return await request.put({ url: '/bpm/task/delegate', data }) |
|
83 |
} |
|
84 |
|
|
85 |
// 转派 |
|
86 |
export const transferTask = async (data: any) => { |
|
87 |
return await request.put({ url: '/bpm/task/transfer', data }) |
|
88 |
} |
|
89 |
|
|
90 |
// 加签 |
|
91 |
export const signCreateTask = async (data: any) => { |
|
92 |
return await request.put({ url: '/bpm/task/create-sign', data }) |
|
93 |
} |
|
94 |
|
|
95 |
// 减签 |
|
96 |
export const signDeleteTask = async (data: any) => { |
|
97 |
return await request.delete({ url: '/bpm/task/delete-sign', data }) |
|
98 |
} |
|
99 |
|
3e359e
|
100 |
// 抄送 |
H |
101 |
export const copyTask = async (data: any) => { |
|
102 |
return await request.put({ url: '/bpm/task/copy', data }) |
|
103 |
} |
|
104 |
|
|
105 |
// 获取我的待办任务 |
|
106 |
export const myTodoTask = async (processInstanceId: string) => { |
|
107 |
return await request.get({ url: '/bpm/task/my-todo?processInstanceId=' + processInstanceId }) |
|
108 |
} |
|
109 |
|
820397
|
110 |
// 获取减签任务列表 |
H |
111 |
export const getChildrenTaskList = async (id: string) => { |
|
112 |
return await request.get({ url: '/bpm/task/list-by-parent-task-id?parentTaskId=' + id }) |
|
113 |
} |