diff --git a/src/api/workflow/processInstance/index.ts b/src/api/workflow/processInstance/index.ts index ec9c675..cd8a7e5 100644 --- a/src/api/workflow/processInstance/index.ts +++ b/src/api/workflow/processInstance/index.ts @@ -38,53 +38,6 @@ export const getFlowImage = (businessKey: string | number) => { }); }; -/** - * 通过业务id获取历史流程图运行中,历史等节点 - */ -export const getHistoryList = (businessKey: string): AxiosPromise> => { - return request({ - url: `/workflow/processInstance/getHistoryList/${businessKey}` + '?t' + Math.random(), - method: 'get' - }); -}; - -/** - * 作废 - * @param data 参数 - * @returns - */ -export const deleteRunInstance = (data: object) => { - return request({ - url: `/workflow/processInstance/deleteRunInstance`, - method: 'post', - data: data - }); -}; - -/** - * 运行中的实例 删除程实例,删除历史记录,删除业务与流程关联信息 - * @param businessKey 业务id - * @returns - */ -export const deleteRunAndHisInstance = (businessKey: string | string[]) => { - return request({ - url: `/workflow/processInstance/deleteRunAndHisInstance/${businessKey}`, - method: 'delete' - }); -}; - -/** - * 已完成的实例 删除程实例,删除历史记录,删除业务与流程关联信息 - * @param businessKey 业务id - * @returns - */ -export const deleteFinishAndHisInstance = (businessKey: string | string[]) => { - return request({ - url: `/workflow/processInstance/deleteFinishAndHisInstance/${businessKey}`, - method: 'delete' - }); -}; - /** * 分页查询当前登录人单据 * @param query @@ -122,14 +75,23 @@ export const getInstanceVariable = (instanceId: string) => { method: 'get' }); }; + +/** + * 删除 + * @param instanceIds 流程实例id + * @returns + */ +export const deleteByInstanceIds = (instanceIds: Array | string | number) => { + return request({ + url: `/workflow/processInstance/deleteByInstanceIds/${instanceIds}`, + method: 'delete' + }); +}; + export default { getPageByRunning, getPageByFinish, getFlowImage, - getHistoryList, - deleteRunInstance, - deleteRunAndHisInstance, - deleteFinishAndHisInstance, getPageByCurrent, cancelProcessApply }; diff --git a/src/api/workflow/processInstance/types.ts b/src/api/workflow/processInstance/types.ts index 3f0ac69..33eadff 100644 --- a/src/api/workflow/processInstance/types.ts +++ b/src/api/workflow/processInstance/types.ts @@ -1,14 +1,15 @@ import { FlowTaskVO } from '@/api/workflow/task/types'; -export interface ProcessInstanceQuery extends PageQuery { +export interface FlowInstanceQuery extends PageQuery { categoryCode?: string; flowCode?: string; + flowName?: string; createBy?: string; businessId?: string; } -export interface ProcessInstanceVO extends BaseEntity { - id: string; +export interface FlowInstanceVO extends BaseEntity { + id: string | number; definitionId: string; flowName: string; flowCode: string; diff --git a/src/api/workflow/task/index.ts b/src/api/workflow/task/index.ts index 0aac90a..25441a4 100644 --- a/src/api/workflow/task/index.ts +++ b/src/api/workflow/task/index.ts @@ -93,30 +93,6 @@ export const completeTask = (data: object) => { }); }; -/** - * 认领任务 - * @param taskId - * @returns {*} - */ -export const claim = (taskId: string): any => { - return request({ - url: '/workflow/task/claim/' + taskId, - method: 'post' - }); -}; - -/** - * 归还任务 - * @param taskId - * @returns {*} - */ -export const returnTask = (taskId: string): any => { - return request({ - url: '/workflow/task/returnTask/' + taskId, - method: 'post' - }); -}; - /** * 任务驳回 * @param data @@ -142,32 +118,6 @@ export const getTaskById = (taskId: string) => { }); }; -/** - * 加签 - * @param data - * @returns - */ -export const addMultiInstanceExecution = (data: any) => { - return request({ - url: '/workflow/task/addMultiInstanceExecution', - method: 'post', - data: data - }); -}; - -/** - * 减签 - * @param data - * @returns - */ -export const deleteMultiInstanceExecution = (data: any) => { - return request({ - url: '/workflow/task/deleteMultiInstanceExecution', - method: 'post', - data: data - }); -}; - /** * 修改任务办理人 * @param taskIds @@ -182,18 +132,6 @@ export const updateAssignee = (taskIdList: Array, userId: string) => { }); }; -/** - * 转办任务 - * @returns - */ -export const transferTask = (data: any) => { - return request({ - url: `/workflow/task/transferTask`, - method: 'post', - data: data - }); -}; - /** * 终止任务 * @returns @@ -281,7 +219,7 @@ export const taskOperation = (data: TaskOperationBo, operation: string) => { * @param taskId 任务id * @returns */ -export const getUserListTaskId = (taskId: string) => { +export const getUserListTaskId = (taskId: string | number) => { return request({ url: `/workflow/task/getUserListTaskId/${taskId}`, method: 'get' diff --git a/src/api/workflow/task/types.ts b/src/api/workflow/task/types.ts index 612cddb..ee869c4 100644 --- a/src/api/workflow/task/types.ts +++ b/src/api/workflow/task/types.ts @@ -27,6 +27,7 @@ export interface FlowTaskVO { flowStatus: string; nodeType: number; nodeRatio: string | number; + version?: string; wfNodeConfigVo?: NodeConfigVO; wfDefinitionConfigVo?: DefinitionConfigVO; } @@ -42,7 +43,7 @@ export interface TaskOperationBo { //加签/减签人的用户ID列表(必填,针对加签/减签操作) userIds?: string[]; //任务ID(必填) - taskId: string; + taskId: string | number; //意见或备注信息(可选) message?: string; } diff --git a/src/components/Process/approvalRecord.vue b/src/components/Process/approvalRecord.vue index 22dd00a..6d5d0c1 100644 --- a/src/components/Process/approvalRecord.vue +++ b/src/components/Process/approvalRecord.vue @@ -23,7 +23,14 @@ - +