Files
lc_frontend/src/api/bpm/processInstance/index.ts

75 lines
1.8 KiB
TypeScript
Raw Normal View History

2025-10-17 10:31:13 +08:00
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 type ProcessInstanceCCVO = {
type: number,
taskName: string,
taskKey: string,
processInstanceName: string,
processInstanceKey: string,
startUserId: string,
options: string [],
2025-10-17 10:31:13 +08:00
reason: string
}
export const getMyProcessInstancePage = async (params) => {
return await request.get({url: '/bpm/process-instance/my-page', params})
2025-10-17 10:31:13 +08:00
}
export const createProcessInstance = async (data) => {
return await request.post({url: '/bpm/process-instance/create', data: data})
2025-10-17 10:31:13 +08:00
}
export const cancelProcessInstance = async (id: number, reason: string) => {
const data = {
id: id,
reason: reason
}
return await request.delete({url: '/bpm/process-instance/cancel', data: data})
2025-10-17 10:31:13 +08:00
}
export const getProcessInstance = async (id: number) => {
return await request.get({url: '/bpm/process-instance/get?id=' + id})
2025-10-17 10:31:13 +08:00
}
/**
*
* @param data
* @returns
*/
export const createProcessInstanceCC = async (data) => {
return await request.post({url: '/bpm/process-instance/cc/create', data: data})
2025-10-17 10:31:13 +08:00
}
/**
*
* @param params
* @returns
2025-10-17 10:31:13 +08:00
*/
export const getProcessInstanceCCPage = async (params) => {
return await request.get({url: '/bpm/process-instance/cc/my-page', params})
}
export const handleProcessInstanceCC = async (processInstanceId: string) => {
return await request.post({url: '/bpm/process-instance/cc/process-current-user-copy/' + processInstanceId})
}