2024-04-16 08:41:41 +08:00
|
|
|
import createAxios from '@/utils/request'
|
|
|
|
|
export type ProcessDefinitionVO = {
|
|
|
|
|
id: string
|
|
|
|
|
version: number
|
|
|
|
|
deploymentTIme: string
|
|
|
|
|
suspensionState: number
|
|
|
|
|
}
|
|
|
|
|
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
|
|
|
|
|
}
|
|
|
|
|
//登录获取token
|
|
|
|
|
export function getRouteMenu() {
|
|
|
|
|
return createAxios({
|
|
|
|
|
url: '/user-boot/function/getRouteMenu'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const getModelPage = async (params: any) => {
|
2024-04-17 09:44:50 +08:00
|
|
|
return await createAxios({ url: '/process-boot/bpm/model/page', params, method: 'get' })
|
2024-04-16 08:41:41 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const getModel = async (id: number) => {
|
2024-04-17 09:44:50 +08:00
|
|
|
return await createAxios({ url: '/process-boot/bpm/model/get?id=' + id, method: 'get' })
|
2024-04-16 08:41:41 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const updateModel = async (data: any) => {
|
2024-04-17 09:44:50 +08:00
|
|
|
return await createAxios({ url: '/process-boot/bpm/model/update', method: 'put', data: data })
|
2024-04-16 08:41:41 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 任务状态修改
|
|
|
|
|
export const updateModelState = async (id: number, state: number) => {
|
|
|
|
|
const data = {
|
|
|
|
|
id: id,
|
|
|
|
|
state: state
|
|
|
|
|
}
|
2024-04-17 09:44:50 +08:00
|
|
|
return await createAxios({ url: '/process-boot/bpm/model/update-state', method: 'put', data: data })
|
2024-04-16 08:41:41 +08:00
|
|
|
}
|
|
|
|
|
|
2024-04-17 09:44:50 +08:00
|
|
|
export const save = async data => {
|
|
|
|
|
return await createAxios({ url: '/process-boot/flowable/definition/save', method: 'POST', data: data })
|
2024-04-16 08:41:41 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const deleteModel = async (id: number) => {
|
2024-04-17 09:44:50 +08:00
|
|
|
return await createAxios({ url: '/process-boot/bpm/model/delete?id=' + id, method: 'DELETE' })
|
2024-04-16 08:41:41 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const deployModel = async (id: number) => {
|
2024-04-17 09:44:50 +08:00
|
|
|
return await createAxios({ url: '/process-boot/bpm/model/deploy?id=' + id, method: 'POST' })
|
2024-04-16 08:41:41 +08:00
|
|
|
}
|
|
|
|
|
export const readXml = async (id: number) => {
|
|
|
|
|
return await createAxios({ url: 'process-boot/flowable/definition/readXml?deployId=' + id, method: 'GET' })
|
|
|
|
|
}
|