提交 | 用户 | 时间
|
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 |
|
|
29 |
export const getModelPage = async (params) => { |
|
30 |
return await request.get({ url: '/bpm/model/page', params }) |
|
31 |
} |
|
32 |
|
|
33 |
export const getModel = async (id: number) => { |
|
34 |
return await request.get({ url: '/bpm/model/get?id=' + id }) |
|
35 |
} |
|
36 |
|
|
37 |
export const updateModel = async (data: ModelVO) => { |
|
38 |
return await request.put({ url: '/bpm/model/update', data: data }) |
|
39 |
} |
|
40 |
|
|
41 |
// 任务状态修改 |
|
42 |
export const updateModelState = async (id: number, state: number) => { |
|
43 |
const data = { |
|
44 |
id: id, |
|
45 |
state: state |
|
46 |
} |
|
47 |
return await request.put({ url: '/bpm/model/update-state', data: data }) |
|
48 |
} |
|
49 |
|
|
50 |
export const createModel = async (data: ModelVO) => { |
|
51 |
return await request.post({ url: '/bpm/model/create', data: data }) |
|
52 |
} |
|
53 |
|
|
54 |
export const deleteModel = async (id: number) => { |
|
55 |
return await request.delete({ url: '/bpm/model/delete?id=' + id }) |
|
56 |
} |
|
57 |
|
|
58 |
export const deployModel = async (id: number) => { |
|
59 |
return await request.post({ url: '/bpm/model/deploy?id=' + id }) |
|
60 |
} |