mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-11-01 02:38:43 +08:00 
			
		
		
		
	feat: 部分bpm页面
This commit is contained in:
		| @@ -2,20 +2,20 @@ import { useAxios } from '@/hooks/web/useAxios' | ||||
| import { ModelVO } from './types' | ||||
| const request = useAxios() | ||||
|  | ||||
| export const getModelPage = async (params) => { | ||||
| export const getModelPageApi = async (params) => { | ||||
|   return await request.get({ url: '/bpm/model/page', params }) | ||||
| } | ||||
|  | ||||
| export const getModel = async (id: number) => { | ||||
| export const getModelApi = async (id: number) => { | ||||
|   return await request.get({ url: '/bpm/model/get?id=' + id }) | ||||
| } | ||||
|  | ||||
| export const updateModel = async (data: ModelVO) => { | ||||
| export const updateModelApi = async (data: ModelVO) => { | ||||
|   return await request.put({ url: '/bpm/model/update', data: data }) | ||||
| } | ||||
|  | ||||
| // 任务状态修改 | ||||
| export const updateModelState = async (id: number, state: string) => { | ||||
| export const updateModelStateApi = async (id: number, state: number) => { | ||||
|   const data = { | ||||
|     id: id, | ||||
|     state: state | ||||
| @@ -23,14 +23,14 @@ export const updateModelState = async (id: number, state: string) => { | ||||
|   return await request.put({ url: '/bpm/model/update-state', data: data }) | ||||
| } | ||||
|  | ||||
| export const createModel = async (data: ModelVO) => { | ||||
| export const createModelApi = async (data: ModelVO) => { | ||||
|   return await request.post({ url: '/bpm/model/create', data: data }) | ||||
| } | ||||
|  | ||||
| export const deleteModel = async (id: number) => { | ||||
| export const deleteModelApi = async (id: number) => { | ||||
|   return await request.delete({ url: '/bpm/model/delete?id=' + id }) | ||||
| } | ||||
|  | ||||
| export const deployModel = async (id: number) => { | ||||
| export const deployModelApi = async (id: number) => { | ||||
|   return await request.post({ url: '/bpm/model/deploy?id=' + id }) | ||||
| } | ||||
|   | ||||
| @@ -1,3 +1,10 @@ | ||||
| export type ProcessDefinitionVO = { | ||||
|   id: string | ||||
|   version: number | ||||
|   deploymentTIme: string | ||||
|   suspensionState: number | ||||
| } | ||||
|  | ||||
| export type ModelVO = { | ||||
|   id: number | ||||
|   formName: string | ||||
| @@ -9,6 +16,7 @@ export type ModelVO = { | ||||
|   formId: number | ||||
|   formCustomCreatePath: string | ||||
|   formCustomViewPath: string | ||||
|   processDefinition: ProcessDefinitionVO | ||||
|   status: number | ||||
|   remark: string | ||||
|   createTime: string | ||||
|   | ||||
| @@ -2,15 +2,15 @@ import { useAxios } from '@/hooks/web/useAxios' | ||||
| import { ProcessInstanceVO } from './types' | ||||
| const request = useAxios() | ||||
|  | ||||
| export const getMyProcessInstancePage = async (params) => { | ||||
| export const getMyProcessInstancePageApi = async (params) => { | ||||
|   return await request.get({ url: '/bpm/process-instance/my-page', params }) | ||||
| } | ||||
|  | ||||
| export const createProcessInstance = async (data: ProcessInstanceVO) => { | ||||
| export const createProcessInstanceApi = async (data: ProcessInstanceVO) => { | ||||
|   return await request.post({ url: '/bpm/process-instance/create', data: data }) | ||||
| } | ||||
|  | ||||
| export const cancelProcessInstance = async (id: number, reason: string) => { | ||||
| export const cancelProcessInstanceApi = async (id: number, reason: string) => { | ||||
|   const data = { | ||||
|     id: id, | ||||
|     reason: reason | ||||
| @@ -18,6 +18,6 @@ export const cancelProcessInstance = async (id: number, reason: string) => { | ||||
|   return await request.delete({ url: '/bpm/process-instance/cancel', data: data }) | ||||
| } | ||||
|  | ||||
| export const getProcessInstance = async (id: number) => { | ||||
| export const getProcessInstanceApi = async (id: number) => { | ||||
|   return await request.get({ url: '/bpm/process-instance/get?id=' + id }) | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 xingyu
					xingyu