init:first commit of plus-ui
This commit is contained in:
76
src/api/workflow/category/index.ts
Normal file
76
src/api/workflow/category/index.ts
Normal file
@ -0,0 +1,76 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { CategoryVO, CategoryForm, CategoryQuery, CategoryTreeVO } from '@/api/workflow/category/types';
|
||||
|
||||
/**
|
||||
* 查询流程分类列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listCategory = (query?: CategoryQuery): AxiosPromise<CategoryVO[]> => {
|
||||
return request({
|
||||
url: '/workflow/category/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询流程分类详细
|
||||
* @param categoryId
|
||||
*/
|
||||
export const getCategory = (categoryId: string | number): AxiosPromise<CategoryVO> => {
|
||||
return request({
|
||||
url: '/workflow/category/' + categoryId,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增流程分类
|
||||
* @param data
|
||||
*/
|
||||
export const addCategory = (data: CategoryForm) => {
|
||||
return request({
|
||||
url: '/workflow/category',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改流程分类
|
||||
* @param data
|
||||
*/
|
||||
export const updateCategory = (data: CategoryForm) => {
|
||||
return request({
|
||||
url: '/workflow/category',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除流程分类
|
||||
* @param categoryId
|
||||
*/
|
||||
export const delCategory = (categoryId: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/workflow/category/' + categoryId,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取流程分类树列表
|
||||
* @param query 流程实例id
|
||||
* @returns
|
||||
*/
|
||||
export const categoryTree = (query?: CategoryForm): AxiosPromise<CategoryTreeVO[]> => {
|
||||
return request({
|
||||
url: `/workflow/category/categoryTree`,
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
72
src/api/workflow/category/types.ts
Normal file
72
src/api/workflow/category/types.ts
Normal file
@ -0,0 +1,72 @@
|
||||
export interface CategoryTreeVO {
|
||||
id: number | string;
|
||||
label: string;
|
||||
parentId: number | string;
|
||||
weight: number;
|
||||
children: CategoryTreeVO[];
|
||||
}
|
||||
export interface CategoryVO {
|
||||
|
||||
/**
|
||||
* 流程分类ID
|
||||
*/
|
||||
categoryId: string | number;
|
||||
|
||||
/**
|
||||
* 父级id
|
||||
*/
|
||||
parentId: string | number;
|
||||
|
||||
/**
|
||||
* 流程分类名称
|
||||
*/
|
||||
categoryName: string;
|
||||
|
||||
/**
|
||||
* 显示顺序
|
||||
*/
|
||||
orderNum: number;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime: string;
|
||||
|
||||
/**
|
||||
* 子对象
|
||||
*/
|
||||
children: CategoryVO[];
|
||||
}
|
||||
|
||||
export interface CategoryForm extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 流程分类ID
|
||||
*/
|
||||
categoryId?: string | number;
|
||||
|
||||
/**
|
||||
* 流程分类名称
|
||||
*/
|
||||
categoryName?: string;
|
||||
|
||||
/**
|
||||
* 父流程分类id
|
||||
*/
|
||||
parentId?: string | number;
|
||||
|
||||
/**
|
||||
* 显示顺序
|
||||
*/
|
||||
orderNum?: number;
|
||||
|
||||
}
|
||||
|
||||
export interface CategoryQuery {
|
||||
|
||||
/**
|
||||
* 流程分类名称
|
||||
*/
|
||||
categoryName?: string;
|
||||
|
||||
}
|
170
src/api/workflow/definition/index.ts
Normal file
170
src/api/workflow/definition/index.ts
Normal file
@ -0,0 +1,170 @@
|
||||
import request from '@/utils/request';
|
||||
import { FlowDefinitionQuery, definitionXmlVO, FlowDefinitionForm, FlowDefinitionVo } from '@/api/workflow/definition/types';
|
||||
import { AxiosPromise } from 'axios';
|
||||
|
||||
/**
|
||||
* 获取流程定义列表
|
||||
* @param query 流程实例id
|
||||
* @returns
|
||||
*/
|
||||
export const listDefinition = (query: FlowDefinitionQuery): AxiosPromise<FlowDefinitionVo[]> => {
|
||||
return request({
|
||||
url: `/workflow/definition/list`,
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询未发布的流程定义列表
|
||||
* @param query 流程实例id
|
||||
* @returns
|
||||
*/
|
||||
export const unPublishList = (query: FlowDefinitionQuery): AxiosPromise<FlowDefinitionVo[]> => {
|
||||
return request({
|
||||
url: `/workflow/definition/unPublishList`,
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 通过流程定义id获取xml
|
||||
* @param definitionId 流程定义id
|
||||
* @returns
|
||||
*/
|
||||
export const definitionXml = (definitionId: string): AxiosPromise<definitionXmlVO> => {
|
||||
return request({
|
||||
url: `/workflow/definition/definitionXml/${definitionId}`,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除流程定义
|
||||
* @param id 流程定义id
|
||||
* @returns
|
||||
*/
|
||||
export const deleteDefinition = (id: string | string[]) => {
|
||||
return request({
|
||||
url: `/workflow/definition/${id}`,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 挂起/激活
|
||||
* @param definitionId 流程定义id
|
||||
* @param activityStatus 状态
|
||||
* @returns
|
||||
*/
|
||||
export const active = (definitionId: string, activityStatus: boolean) => {
|
||||
return request({
|
||||
url: `/workflow/definition/active/${definitionId}`,
|
||||
method: 'put',
|
||||
params: {
|
||||
active: activityStatus
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 通过zip或xml部署流程定义
|
||||
* @returns
|
||||
*/
|
||||
export function importDef(data: any) {
|
||||
return request({
|
||||
url: '/workflow/definition/importDef',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {
|
||||
repeatSubmit: false
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 发布流程定义
|
||||
* @param id 流程定义id
|
||||
* @returns
|
||||
*/
|
||||
export const publish = (id: string) => {
|
||||
return request({
|
||||
url: `/workflow/definition/publish/${id}`,
|
||||
method: 'put'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 取消发布流程定义
|
||||
* @param id 流程定义id
|
||||
* @returns
|
||||
*/
|
||||
export const unPublish = (id: string) => {
|
||||
return request({
|
||||
url: `/workflow/definition/unPublish/${id}`,
|
||||
method: 'put'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取流程定义xml字符串
|
||||
* @param id 流程定义id
|
||||
* @returns
|
||||
*/
|
||||
export const xmlString = (id: string) => {
|
||||
return request({
|
||||
url: `/workflow/definition/xmlString/${id}`,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增
|
||||
* @param data 参数
|
||||
* @returns
|
||||
*/
|
||||
export const add = (data: FlowDefinitionForm) => {
|
||||
return request({
|
||||
url: `/workflow/definition`,
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* @param data 参数
|
||||
* @returns
|
||||
*/
|
||||
export const edit = (data: FlowDefinitionForm) => {
|
||||
return request({
|
||||
url: `/workflow/definition`,
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询详情
|
||||
* @param id 参数
|
||||
* @returns
|
||||
*/
|
||||
export const getInfo = (id: number | string) => {
|
||||
return request({
|
||||
url: `/workflow/definition/${id}`,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 复制流程定义
|
||||
* @param id 流程定义id
|
||||
* @returns
|
||||
*/
|
||||
export const copy = (id: string) => {
|
||||
return request({
|
||||
url: `/workflow/definition/copy/${id}`,
|
||||
method: 'post'
|
||||
});
|
||||
};
|
31
src/api/workflow/definition/types.ts
Normal file
31
src/api/workflow/definition/types.ts
Normal file
@ -0,0 +1,31 @@
|
||||
export interface FlowDefinitionQuery extends PageQuery {
|
||||
flowCode?: string;
|
||||
flowName?: string;
|
||||
category: string | number;
|
||||
isPublish?: number;
|
||||
}
|
||||
|
||||
export interface FlowDefinitionVo {
|
||||
id: string;
|
||||
flowName: string;
|
||||
flowCode: string;
|
||||
formPath: string;
|
||||
version: string;
|
||||
isPublish: number;
|
||||
activityStatus: number;
|
||||
createTime: Date;
|
||||
updateTime: Date;
|
||||
}
|
||||
|
||||
export interface FlowDefinitionForm {
|
||||
id: string;
|
||||
flowName: string;
|
||||
flowCode: string;
|
||||
category: string;
|
||||
formPath: string;
|
||||
}
|
||||
|
||||
export interface definitionXmlVO {
|
||||
xml: string[];
|
||||
xmlStr: string;
|
||||
}
|
101
src/api/workflow/instance/index.ts
Normal file
101
src/api/workflow/instance/index.ts
Normal file
@ -0,0 +1,101 @@
|
||||
import request from '@/utils/request';
|
||||
import { FlowInstanceQuery, FlowInstanceVO } from '@/api/workflow/instance/types';
|
||||
import { AxiosPromise } from 'axios';
|
||||
|
||||
/**
|
||||
* 查询运行中实例列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
export const pageByRunning = (query: FlowInstanceQuery): AxiosPromise<FlowInstanceVO[]> => {
|
||||
return request({
|
||||
url: '/workflow/instance/pageByRunning',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询已完成实例列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
export const pageByFinish = (query: FlowInstanceQuery): AxiosPromise<FlowInstanceVO[]> => {
|
||||
return request({
|
||||
url: '/workflow/instance/pageByFinish',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 通过业务id获取历史流程图
|
||||
*/
|
||||
export const flowImage = (businessId: string | number) => {
|
||||
return request({
|
||||
url: `/workflow/instance/flowImage/${businessId}` + '?t' + Math.random(),
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 分页查询当前登录人单据
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
export const pageByCurrent = (query: FlowInstanceQuery): AxiosPromise<FlowInstanceVO[]> => {
|
||||
return request({
|
||||
url: '/workflow/instance/pageByCurrent',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 撤销流程
|
||||
* @param data 参数
|
||||
* @returns
|
||||
*/
|
||||
export const cancelProcessApply = (data: any) => {
|
||||
return request({
|
||||
url: `/workflow/instance/cancelProcessApply`,
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取流程变量
|
||||
* @param instanceId 实例id
|
||||
* @returns
|
||||
*/
|
||||
export const instanceVariable = (instanceId: string | number) => {
|
||||
return request({
|
||||
url: `/workflow/instance/instanceVariable/${instanceId}`,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param instanceIds 流程实例id
|
||||
* @returns
|
||||
*/
|
||||
export const deleteByInstanceIds = (instanceIds: Array<string | number> | string | number) => {
|
||||
return request({
|
||||
url: `/workflow/instance/deleteByInstanceIds/${instanceIds}`,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
/**
|
||||
* 作废流程
|
||||
* @param data 参数
|
||||
* @returns
|
||||
*/
|
||||
export const invalid = (data: any) => {
|
||||
return request({
|
||||
url: `/workflow/instance/invalid`,
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
26
src/api/workflow/instance/types.ts
Normal file
26
src/api/workflow/instance/types.ts
Normal file
@ -0,0 +1,26 @@
|
||||
import { FlowTaskVO } from '@/api/workflow/task/types';
|
||||
|
||||
export interface FlowInstanceQuery extends PageQuery {
|
||||
category?: string | number;
|
||||
nodeName?: string;
|
||||
flowCode?: string;
|
||||
flowName?: string;
|
||||
createByIds?: string[] | number[];
|
||||
businessId?: string;
|
||||
}
|
||||
|
||||
export interface FlowInstanceVO extends BaseEntity {
|
||||
id: string | number;
|
||||
definitionId: string;
|
||||
flowName: string;
|
||||
flowCode: string;
|
||||
version: string;
|
||||
businessId: string;
|
||||
activityStatus: number;
|
||||
tenantId: string;
|
||||
createTime: string;
|
||||
createBy: string;
|
||||
flowStatus: string;
|
||||
flowStatusName: string;
|
||||
flowTaskList: FlowTaskVO[];
|
||||
}
|
63
src/api/workflow/leave/index.ts
Normal file
63
src/api/workflow/leave/index.ts
Normal file
@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { LeaveVO, LeaveQuery, LeaveForm } from '@/api/workflow/leave/types';
|
||||
|
||||
/**
|
||||
* 查询请假列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listLeave = (query?: LeaveQuery): AxiosPromise<LeaveVO[]> => {
|
||||
return request({
|
||||
url: '/workflow/leave/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询请假详细
|
||||
* @param id
|
||||
*/
|
||||
export const getLeave = (id: string | number): AxiosPromise<LeaveVO> => {
|
||||
return request({
|
||||
url: '/workflow/leave/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增请假
|
||||
* @param data
|
||||
*/
|
||||
export const addLeave = (data: LeaveForm): AxiosPromise<LeaveVO> => {
|
||||
return request({
|
||||
url: '/workflow/leave',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改请假
|
||||
* @param data
|
||||
*/
|
||||
export const updateLeave = (data: LeaveForm): AxiosPromise<LeaveVO> => {
|
||||
return request({
|
||||
url: '/workflow/leave',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除请假
|
||||
* @param id
|
||||
*/
|
||||
export const delLeave = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/workflow/leave/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
24
src/api/workflow/leave/types.ts
Normal file
24
src/api/workflow/leave/types.ts
Normal file
@ -0,0 +1,24 @@
|
||||
export interface LeaveVO {
|
||||
id: string | number;
|
||||
leaveType: string;
|
||||
startDate: string;
|
||||
endDate: string;
|
||||
leaveDays: number;
|
||||
remark: string;
|
||||
status?: string;
|
||||
}
|
||||
|
||||
export interface LeaveForm extends BaseEntity {
|
||||
id?: string | number;
|
||||
leaveType?: string;
|
||||
startDate?: string;
|
||||
endDate?: string;
|
||||
leaveDays?: number;
|
||||
remark?: string;
|
||||
status?: string;
|
||||
}
|
||||
|
||||
export interface LeaveQuery extends PageQuery {
|
||||
startLeaveDays?: number;
|
||||
endLeaveDays?: number;
|
||||
}
|
180
src/api/workflow/task/index.ts
Normal file
180
src/api/workflow/task/index.ts
Normal file
@ -0,0 +1,180 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { TaskQuery, FlowTaskVO, TaskOperationBo } from '@/api/workflow/task/types';
|
||||
|
||||
/**
|
||||
* 查询待办列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
export const pageByTaskWait = (query: TaskQuery): AxiosPromise<FlowTaskVO[]> => {
|
||||
return request({
|
||||
url: '/workflow/task/pageByTaskWait',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询已办列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
export const pageByTaskFinish = (query: TaskQuery): AxiosPromise<FlowTaskVO[]> => {
|
||||
return request({
|
||||
url: '/workflow/task/pageByTaskFinish',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询当前用户的抄送列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
export const pageByTaskCopy = (query: TaskQuery): AxiosPromise<FlowTaskVO[]> => {
|
||||
return request({
|
||||
url: '/workflow/task/pageByTaskCopy',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 当前租户所有待办任务
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
export const pageByAllTaskWait = (query: TaskQuery): AxiosPromise<FlowTaskVO[]> => {
|
||||
return request({
|
||||
url: '/workflow/task/pageByAllTaskWait',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 当前租户所有已办任务
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
export const pageByAllTaskFinish = (query: TaskQuery): AxiosPromise<FlowTaskVO[]> => {
|
||||
return request({
|
||||
url: '/workflow/task/pageByAllTaskFinish',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 启动流程
|
||||
* @param data
|
||||
* @returns {*}
|
||||
*/
|
||||
export const startWorkFlow = (data: object): any => {
|
||||
return request({
|
||||
url: '/workflow/task/startWorkFlow',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 办理流程
|
||||
* @param data
|
||||
* @returns {*}
|
||||
*/
|
||||
export const completeTask = (data: object) => {
|
||||
return request({
|
||||
url: '/workflow/task/completeTask',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 任务驳回
|
||||
* @param data
|
||||
* @returns {*}
|
||||
*/
|
||||
export const backProcess = (data: any): any => {
|
||||
return request({
|
||||
url: '/workflow/task/backProcess',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取当前任务
|
||||
* @param taskId
|
||||
* @returns
|
||||
*/
|
||||
export const getTask = (taskId: string) => {
|
||||
return request({
|
||||
url: '/workflow/task/getTask/' + taskId,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改任务办理人
|
||||
* @param taskIdList
|
||||
* @param userId
|
||||
* @returns
|
||||
*/
|
||||
export const updateAssignee = (taskIdList: Array<string>, userId: string) => {
|
||||
return request({
|
||||
url: `/workflow/task/updateAssignee/${userId}`,
|
||||
method: 'put',
|
||||
data: taskIdList
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 终止任务
|
||||
* @returns
|
||||
*/
|
||||
export const terminationTask = (data: any) => {
|
||||
return request({
|
||||
url: `/workflow/task/terminationTask`,
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取可驳回得任务节点
|
||||
* @returns
|
||||
*/
|
||||
export const getBackTaskNode = (definitionId: string, nodeCode: string) => {
|
||||
return request({
|
||||
url: `/workflow/task/getBackTaskNode/${definitionId}/${nodeCode}`,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 任务操作 操作类型,委派 delegateTask、转办 transferTask、加签 addSignature、减签 reductionSignature
|
||||
* @returns
|
||||
*/
|
||||
export const taskOperation = (data: TaskOperationBo, operation: string) => {
|
||||
return request({
|
||||
url: `/workflow/task/taskOperation/${operation}`,
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取当前任务办理人
|
||||
* @param taskId 任务id
|
||||
* @returns
|
||||
*/
|
||||
export const currentTaskAllUser = (taskId: string | number) => {
|
||||
return request({
|
||||
url: `/workflow/task/currentTaskAllUser/${taskId}`,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
48
src/api/workflow/task/types.ts
Normal file
48
src/api/workflow/task/types.ts
Normal file
@ -0,0 +1,48 @@
|
||||
export interface TaskQuery extends PageQuery {
|
||||
nodeName?: string;
|
||||
flowCode?: string;
|
||||
flowName?: string;
|
||||
createByIds?: string[] | number[];
|
||||
}
|
||||
|
||||
export interface ParticipantVo {
|
||||
groupIds?: string[] | number[];
|
||||
candidate: string[] | number[];
|
||||
candidateName: string[];
|
||||
claim: boolean;
|
||||
}
|
||||
export interface FlowTaskVO {
|
||||
id: string | number;
|
||||
createTime?: Date;
|
||||
updateTime?: Date;
|
||||
tenantId?: string;
|
||||
definitionId?: string;
|
||||
instanceId: string;
|
||||
flowName: string;
|
||||
businessId: string;
|
||||
nodeCode: string;
|
||||
nodeName: string;
|
||||
flowCode: string;
|
||||
flowStatus: string;
|
||||
formCustom: string;
|
||||
formPath: string;
|
||||
nodeType: number;
|
||||
nodeRatio: string | number;
|
||||
version?: string;
|
||||
}
|
||||
|
||||
export interface VariableVo {
|
||||
key: string;
|
||||
value: string;
|
||||
}
|
||||
|
||||
export interface TaskOperationBo {
|
||||
//委派/转办人的用户ID(必填,准对委派/转办人操作)
|
||||
userId?: string;
|
||||
//加签/减签人的用户ID列表(必填,针对加签/减签操作)
|
||||
userIds?: string[];
|
||||
//任务ID(必填)
|
||||
taskId: string | number;
|
||||
//意见或备注信息(可选)
|
||||
message?: string;
|
||||
}
|
15
src/api/workflow/workflowCommon/index.ts
Normal file
15
src/api/workflow/workflowCommon/index.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import { RouterJumpVo } from '@/api/workflow/workflowCommon/types';
|
||||
|
||||
export default {
|
||||
routerJump(routerJumpVo: RouterJumpVo, proxy) {
|
||||
proxy.$tab.closePage(proxy.$route);
|
||||
proxy.$router.push({
|
||||
path: routerJumpVo.formPath,
|
||||
query: {
|
||||
id: routerJumpVo.businessId,
|
||||
type: routerJumpVo.type,
|
||||
taskId: routerJumpVo.taskId
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
13
src/api/workflow/workflowCommon/types.ts
Normal file
13
src/api/workflow/workflowCommon/types.ts
Normal file
@ -0,0 +1,13 @@
|
||||
export interface RouterJumpVo {
|
||||
businessId: string;
|
||||
taskId: string | number;
|
||||
type: string;
|
||||
formCustom: string;
|
||||
formPath: string;
|
||||
}
|
||||
|
||||
export interface StartProcessBo {
|
||||
businessId: string | number;
|
||||
flowCode: string;
|
||||
variables: any;
|
||||
}
|
Reference in New Issue
Block a user