提交 | 用户 | 时间
|
820397
|
1 |
import request from '@/config/axios' |
H |
2 |
import { ProcessDefinitionVO } from '@/api/bpm/model' |
|
3 |
|
|
4 |
export type Task = { |
|
5 |
id: string |
|
6 |
name: string |
|
7 |
} |
|
8 |
|
|
9 |
export type ProcessInstanceVO = { |
|
10 |
id: number |
|
11 |
name: string |
|
12 |
processDefinitionId: string |
|
13 |
category: string |
|
14 |
result: number |
|
15 |
tasks: Task[] |
|
16 |
fields: string[] |
|
17 |
status: number |
|
18 |
remark: string |
|
19 |
businessKey: string |
|
20 |
createTime: string |
|
21 |
endTime: string |
|
22 |
processDefinition?: ProcessDefinitionVO |
|
23 |
} |
|
24 |
|
|
25 |
export const getProcessInstanceMyPage = async (params: any) => { |
|
26 |
return await request.get({ url: '/bpm/process-instance/my-page', params }) |
|
27 |
} |
|
28 |
|
|
29 |
export const getProcessInstanceManagerPage = async (params: any) => { |
|
30 |
return await request.get({ url: '/bpm/process-instance/manager-page', params }) |
|
31 |
} |
|
32 |
|
|
33 |
export const createProcessInstance = async (data) => { |
|
34 |
return await request.post({ url: '/bpm/process-instance/create', data: data }) |
|
35 |
} |
|
36 |
|
|
37 |
export const cancelProcessInstanceByStartUser = async (id: number, reason: string) => { |
|
38 |
const data = { |
|
39 |
id: id, |
|
40 |
reason: reason |
|
41 |
} |
|
42 |
return await request.delete({ url: '/bpm/process-instance/cancel-by-start-user', data: data }) |
|
43 |
} |
|
44 |
|
|
45 |
export const cancelProcessInstanceByAdmin = async (id: number, reason: string) => { |
|
46 |
const data = { |
|
47 |
id: id, |
|
48 |
reason: reason |
|
49 |
} |
|
50 |
return await request.delete({ url: '/bpm/process-instance/cancel-by-admin', data: data }) |
|
51 |
} |
|
52 |
|
|
53 |
export const getProcessInstance = async (id: string) => { |
|
54 |
return await request.get({ url: '/bpm/process-instance/get?id=' + id }) |
|
55 |
} |
|
56 |
|
|
57 |
export const getProcessInstanceCopyPage = async (params: any) => { |
|
58 |
return await request.get({ url: '/bpm/process-instance/copy/page', params }) |
|
59 |
} |