chore: 完善请假申请

This commit is contained in:
dap
2024-12-16 21:01:30 +08:00
parent 3d7f3aef58
commit e52ec4f9b9
9 changed files with 299 additions and 24 deletions

View File

@@ -1,4 +1,8 @@
import type { TaskInfo } from './model';
import type {
CompleteTaskReqData,
StartWorkFlowReqData,
TaskInfo,
} from './model';
import type { ID, IDS, PageQuery, PageResult } from '#/api/common';
@@ -8,15 +12,18 @@ import { requestClient } from '#/api/request';
* 启动任务
* @param data
*/
export function startWorkFlow(data: any) {
return requestClient.postWithMsg<void>('/workflow/task/startWorkFlow', data);
export function startWorkFlow(data: StartWorkFlowReqData) {
return requestClient.post<{
processInstanceId: string;
taskId: string;
}>('/workflow/task/startWorkFlow', data);
}
/**
* 办理任务
* @param data
*/
export function completeTask(data: any) {
export function completeTask(data: CompleteTaskReqData) {
return requestClient.postWithMsg<void>('/workflow/task/completeTask', data);
}

View File

@@ -27,3 +27,26 @@ export interface TaskInfo {
createBy: string;
createByName: string;
}
export interface CompleteTaskReqData {
messageType: string[];
flowCopyList: { userId: string; userName: string }[];
taskId: ID;
taskVariables: Record<string, any>;
variables: any;
}
export interface StartWorkFlowReqData {
/**
* 业务ID
*/
businessKey: ID;
/**
* flowCode
*/
flowCode: string;
/**
* 流程变量
*/
variables: Record<string, any>;
}