mirror of
https://gitee.com/hhyykk/ipms-sjy-ui.git
synced 2025-07-17 04:15:07 +08:00
初始化项目,自 v1.7.1 版本开始
This commit is contained in:
40
src/api/bpm/processInstance/index.ts
Normal file
40
src/api/bpm/processInstance/index.ts
Normal file
@ -0,0 +1,40 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export type Task = {
|
||||
id: string
|
||||
name: string
|
||||
}
|
||||
export type ProcessInstanceVO = {
|
||||
id: number
|
||||
name: string
|
||||
processDefinitionId: string
|
||||
category: string
|
||||
result: number
|
||||
tasks: Task[]
|
||||
fields: string[]
|
||||
status: number
|
||||
remark: string
|
||||
businessKey: string
|
||||
createTime: string
|
||||
endTime: string
|
||||
}
|
||||
|
||||
export const getMyProcessInstancePageApi = async (params) => {
|
||||
return await request.get({ url: '/bpm/process-instance/my-page', params })
|
||||
}
|
||||
|
||||
export const createProcessInstanceApi = async (data) => {
|
||||
return await request.post({ url: '/bpm/process-instance/create', data: data })
|
||||
}
|
||||
|
||||
export const cancelProcessInstanceApi = async (id: number, reason: string) => {
|
||||
const data = {
|
||||
id: id,
|
||||
reason: reason
|
||||
}
|
||||
return await request.delete({ url: '/bpm/process-instance/cancel', data: data })
|
||||
}
|
||||
|
||||
export const getProcessInstanceApi = async (id: number) => {
|
||||
return await request.get({ url: '/bpm/process-instance/get?id=' + id })
|
||||
}
|
Reference in New Issue
Block a user