2023-02-11 00:44:00 +08:00
|
|
|
import request from '@/config/axios'
|
|
|
|
|
|
|
|
export type ProcessDefinitionVO = {
|
|
|
|
id: string
|
|
|
|
version: number
|
|
|
|
deploymentTIme: string
|
|
|
|
suspensionState: number
|
2024-07-20 20:05:42 +08:00
|
|
|
formType?: number
|
2023-02-11 00:44:00 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
export type ModelVO = {
|
|
|
|
id: number
|
|
|
|
formName: string
|
|
|
|
key: string
|
|
|
|
name: string
|
|
|
|
description: string
|
|
|
|
category: string
|
|
|
|
formType: number
|
|
|
|
formId: number
|
|
|
|
formCustomCreatePath: string
|
|
|
|
formCustomViewPath: string
|
|
|
|
processDefinition: ProcessDefinitionVO
|
|
|
|
status: number
|
|
|
|
remark: string
|
|
|
|
createTime: string
|
|
|
|
bpmnXml: string
|
|
|
|
}
|
|
|
|
|
2024-11-02 16:36:54 +08:00
|
|
|
export const getModelList = async (name: string | undefined) => {
|
|
|
|
return await request.get({ url: '/bpm/model/list', params: { name } })
|
2023-02-11 00:44:00 +08:00
|
|
|
}
|
|
|
|
|
2024-04-27 00:35:18 +08:00
|
|
|
export const getModel = async (id: string) => {
|
2023-02-11 00:44:00 +08:00
|
|
|
return await request.get({ url: '/bpm/model/get?id=' + id })
|
|
|
|
}
|
2024-02-01 13:38:14 +08:00
|
|
|
|
2023-03-26 00:16:28 +08:00
|
|
|
export const updateModel = async (data: ModelVO) => {
|
2023-02-11 00:44:00 +08:00
|
|
|
return await request.put({ url: '/bpm/model/update', data: data })
|
|
|
|
}
|
|
|
|
|
2024-08-26 18:38:24 +08:00
|
|
|
export const updateModelBpmn = async (data: ModelVO) => {
|
|
|
|
return await request.put({ url: '/bpm/model/update-bpmn', data: data })
|
|
|
|
}
|
|
|
|
|
2023-02-11 00:44:00 +08:00
|
|
|
// 任务状态修改
|
2023-03-26 00:46:32 +08:00
|
|
|
export const updateModelState = async (id: number, state: number) => {
|
2023-02-11 00:44:00 +08:00
|
|
|
const data = {
|
|
|
|
id: id,
|
|
|
|
state: state
|
|
|
|
}
|
|
|
|
return await request.put({ url: '/bpm/model/update-state', data: data })
|
|
|
|
}
|
|
|
|
|
2023-03-26 00:16:28 +08:00
|
|
|
export const createModel = async (data: ModelVO) => {
|
2023-02-11 00:44:00 +08:00
|
|
|
return await request.post({ url: '/bpm/model/create', data: data })
|
|
|
|
}
|
|
|
|
|
2023-03-26 00:46:32 +08:00
|
|
|
export const deleteModel = async (id: number) => {
|
2023-02-11 00:44:00 +08:00
|
|
|
return await request.delete({ url: '/bpm/model/delete?id=' + id })
|
|
|
|
}
|
|
|
|
|
2023-03-26 00:46:32 +08:00
|
|
|
export const deployModel = async (id: number) => {
|
2023-02-11 00:44:00 +08:00
|
|
|
return await request.post({ url: '/bpm/model/deploy?id=' + id })
|
|
|
|
}
|