12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- import request from '@/config/axios'
- export type ProcessDefinitionVO = {
- id: string
- version: number
- deploymentTIme: string
- suspensionState: number
- formType?: 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
- }
- export const getModelList = async (name: string | undefined) => {
- return await request.get({ url: '/bpm/model/list', params: { name } })
- }
- export const getModel = async (id: string) => {
- 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 updateModelSortBatch = async (ids: number[]) => {
- return await request.put({
- url: `/bpm/model/update-sort-batch`,
- params: {
- ids: ids.join(',')
- }
- })
- }
- export const updateModelBpmn = async (data: ModelVO) => {
- return await request.put({ url: '/bpm/model/update-bpmn', data: data })
- }
- // 任务状态修改
- export const updateModelState = async (id: number, state: number) => {
- 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 })
- }
- export const cleanModel = async (id: number) => {
- return await request.delete({ url: '/bpm/model/clean?id=' + id })
- }
- /**
- * 查询当前流程实例下是否存在正在进行中的单据
- * @param processDefinitionId 流程定义id
- * @returns true/false
- */
- export const getProcessInstance = async (processDefinitionId: string) => {
- return await request.get({
- url: '/bpm/task/manager-list?processDefinitionId=' + processDefinitionId
- })
- }
|