feat: bpm api

This commit is contained in:
xingyu
2022-07-28 12:18:38 +08:00
parent 88fc7ed39b
commit ee6317e906
20 changed files with 827 additions and 15 deletions

View File

@@ -0,0 +1,36 @@
import { useAxios } from '@/hooks/web/useAxios'
import { ModelVO } from './types'
const request = useAxios()
export const getModelPage = async (params) => {
return await request.get({ url: '/bpm/model/page', params })
}
export const getModel = async (id: number) => {
return await request.get({ url: '/bpm/model/get?id=' + id })
}
export const updateModel = async (data: ModelVO) => {
return await request.put({ url: '/bpm/model/update', data: data })
}
// 任务状态修改
export const updateModelState = async (id: number, state: string) => {
const data = {
id: id,
state: state
}
return await request.put({ url: '/bpm/model/update-state', data: data })
}
export const createModel = async (data: ModelVO) => {
return await request.post({ url: '/bpm/model/create', data: data })
}
export const deleteModel = async (id: number) => {
return await request.delete({ url: '/bpm/model/delete?id=' + id })
}
export const deployModel = async (id: number) => {
return await request.post({ url: '/bpm/model/deploy?id=' + id })
}

View File

@@ -0,0 +1,15 @@
export type ModelVO = {
id: number
formName: string
key: string
name: string
description: string
category: string
formType: number
formId: number
formCustomCreatePath: string
formCustomViewPath: string
status: number
remark: string
createTime: string
}