chore: 完善请假申请
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
23
apps/web-antd/src/api/workflow/task/model.d.ts
vendored
23
apps/web-antd/src/api/workflow/task/model.d.ts
vendored
@@ -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>;
|
||||
}
|
||||
|
Reference in New Issue
Block a user