提交 | 用户 | 时间
|
820397
|
1 |
import request from '@/config/axios' |
H |
2 |
|
|
3 |
export type ProcessDefinitionVO = { |
|
4 |
id: string |
|
5 |
version: number |
|
6 |
deploymentTIme: string |
|
7 |
suspensionState: number |
|
8 |
formType?: number |
|
9 |
} |
|
10 |
|
|
11 |
export type ModelVO = { |
|
12 |
id: number |
|
13 |
formName: string |
|
14 |
key: string |
|
15 |
name: string |
|
16 |
description: string |
|
17 |
category: string |
|
18 |
formType: number |
|
19 |
formId: number |
|
20 |
formCustomCreatePath: string |
|
21 |
formCustomViewPath: string |
|
22 |
processDefinition: ProcessDefinitionVO |
|
23 |
status: number |
|
24 |
remark: string |
|
25 |
createTime: string |
|
26 |
bpmnXml: string |
|
27 |
} |
|
28 |
|
3e359e
|
29 |
export const getModelList = async (name: string | undefined) => { |
H |
30 |
return await request.get({ url: '/bpm/model/list', params: { name } }) |
820397
|
31 |
} |
H |
32 |
|
3e359e
|
33 |
export const getModel = async (id: string) => { |
820397
|
34 |
return await request.get({ url: '/bpm/model/get?id=' + id }) |
H |
35 |
} |
|
36 |
|
|
37 |
export const updateModel = async (data: ModelVO) => { |
|
38 |
return await request.put({ url: '/bpm/model/update', data: data }) |
|
39 |
} |
|
40 |
|
3e359e
|
41 |
// 批量修改流程分类的排序 |
H |
42 |
export const updateModelSortBatch = async (ids: number[]) => { |
|
43 |
return await request.put({ |
|
44 |
url: `/bpm/model/update-sort-batch`, |
|
45 |
params: { |
|
46 |
ids: ids.join(',') |
|
47 |
} |
|
48 |
}) |
|
49 |
} |
|
50 |
|
|
51 |
export const updateModelBpmn = async (data: ModelVO) => { |
|
52 |
return await request.put({ url: '/bpm/model/update-bpmn', data: data }) |
|
53 |
} |
|
54 |
|
820397
|
55 |
// 任务状态修改 |
H |
56 |
export const updateModelState = async (id: number, state: number) => { |
|
57 |
const data = { |
|
58 |
id: id, |
|
59 |
state: state |
|
60 |
} |
|
61 |
return await request.put({ url: '/bpm/model/update-state', data: data }) |
|
62 |
} |
|
63 |
|
|
64 |
export const createModel = async (data: ModelVO) => { |
|
65 |
return await request.post({ url: '/bpm/model/create', data: data }) |
|
66 |
} |
|
67 |
|
|
68 |
export const deleteModel = async (id: number) => { |
|
69 |
return await request.delete({ url: '/bpm/model/delete?id=' + id }) |
|
70 |
} |
|
71 |
|
|
72 |
export const deployModel = async (id: number) => { |
|
73 |
return await request.post({ url: '/bpm/model/deploy?id=' + id }) |
|
74 |
} |