!88 合并flowable工作流功能
* merge 合并dev * add 添加抄送查询 * add 添加我的已办 * add 添加抄送 * add 添加附件下载 * update 优化类型 * Merge remote-tracking branch 'origin/future/flowable' into future/flowable * fix 修复 流程设计器打包部署报错问题 * add 添加审批附件上传 * update 修复固定值未在xml显示问题 * update 修复跳转条件回显Object问题 * update 优化面板文件名称 * update 调整key * remove 移除旧设计器,添加xml保存 * update 增加任务面板提示 * update 优化xml预览和svg预览 * update 优化xml预览和svg预览 * update 优化模型设计 * update 优化设计器 * update 优化设计器 * update 优化设计器 * update 删除旧设计器 * update 删除console.log * add 添加模型接口 * update 优化预览xml和svg样式被修改问题 * update 优化属性面板,增加展开动画 * update 去除开发模式 * update 优化任务栏样式 * update 优化图标渲染样式 * update 增加BpmnFactory类型 * update 增加BpmnFactory * update 移除users和group * update 移除无用类型 * update 优化页面类型 * update 去除多余属性 * update 完善流程线 * update 增加复杂网关 * update 完善流程 * update 完善网关 * update 优化网关汉化 * update 优化过期时间选择 * update 支持多实例 * update 增加类容提示 * update 支持选择组 * update 新增角色api * update 优化roleSelect 选中未确定,再次打开还保留选中的问题 * update 优化userSelect 选中未确定,再次打开还保留选中的问题 * update 优化userSelect 选中未确定,再次打开还保留选中的问题 * update 去掉modeler store多余属性 bpmnModel * update 优化属性面板,当面板未选中时默认展示流程面板 * update 优化TaskPanel类型,去掉roles属性 * update 优化用户api * update 优化用户选择器 * update 优化执行监听器 * update 优化任务监听器 * update 优化usePanel方法 * update 选人优化 * update 增加扩展节点信息 * update 增加usePanel默认方法 * update 去除处理事件 * update 扩展flowable userinfo属性 * update 全局modeler 改为非响应式 * update 增加hooks方法 * update 修改命名 * update 修改面板formData来源 * update 重写用户任务面板选择逻辑 * update 重写用户任务面板选择逻辑 * update 修改用户选择组件获取数据逻辑 * update 修改枚举类型 * update 修改默认配置列 * update 增加修改节点方法 * update 调整预览窗口大小 * update 优化用户选择组件 返回值 * update 优化用户选择组件 * update 新增通过ids 获取用户信息 * update 重写task面板选人 未完成 * update 升级用户选择 支持多选配置 * update 升级bpmnjs依赖版本 * update 增加useDialog类型 * update 调整全局样式 * update 代码高亮设置 * update 优化领用,归还加载 * update 增加选择角色 * update 新增角色选择组件 * update 新增过期时间选择组件 * update 调整任务面板样式 * update 调整全局dialog header 增加分割线 * update 代码高亮设置 * update 调整面板位置 * update 封装用户选择组件 * update 移除所有的节点描述 * update 删除分类 * update 调整面板位置 * update 修改命名,增加自定义渲染 * update 修改命名,增加自定义渲染 * update 增加 Element类型定义 * update 调整样式 * update 移除bpmn panel依赖,升级bpmn.js依赖到最新,修改汉化包 * update 调整类型声明文件 * update 调整类型声明文件 * update 优化面板工具 * update 优化面板工具 * Merge remote-tracking branch 'origin/future/flowable' into future/flowable * update 优化面板工具 * Merge branch 'future/flowable' of https://gitee.com/JavaLionLi/plus-ui… * add 添加修改办理人 * update 优化面板工具 * update 初始化流程数据 * Merge remote-tracking branch 'origin/future/flowable' into future/flowable * add 流程设计面板 * update 调整初始化xml * add 任务面板 * add 新增bpmn.js * update 优化request请求类判断请求头方式 * update 流程定义预览 优化 * update 流程定义预览 优化 * update 去掉console.log * update 优化工作流代码 * fix 修复待办任务 重置查询条件失效问题 * add 增加待办任务 接口类型,优化页面 * add 增加vite 启动预编译css * fix 修复i18n无感刷新问题 * Merge branch 'dev' into future/flowable * update 调整选择请假事件 * Merge branch 'dev' into future/flowable * 同步dev代码 * Merge branch 'dev' into future/flowable * 合并dev * remove 设计器无用代码 调整请假查询 * update 调整请假申请 * update 移动请假表单包结构,调整设计器选择引用表单请求错误 * remove 移除动态表单 * update 调整流程办理 * Merge branch 'dev' into future/flowable * Merge branch 'dev' into future/flowable * Merge branch 'dev' into future/flowable * Merge branch 'dev' into future/flowable * 合并 * update 调整请假申请流程提交 * update 修改业务单据流程提交 * update 调整业务单据流程提交 * 优化代码 * 优化工作流代码缩进 * 项目格式化配置修改 * 调整代码缩进 * Merge branch 'ts' into future/flowable * add 添加动态表单提交流程 * add 添加动态表单单据 * add 新增流程定义与表单关联 * update 调整点击左侧部门查询人员,部门刷新问题 * update 调整按钮图标 * 调整错别字 * update 调整流程定义图片预览 * add 添加流程实例迁移版本 * fix 修复我的单据无法提交问题 * Merge branch 'ts' into future/flowable * remove 还原代码后端解决 * update 流程设计器中分配发起人变量错误,先移除 * fix 修复设计器无法编辑问题 * update 调整设计器请求头 * Merge branch 'ts' into future/flowable * Merge branch 'ts' into future/flowable * add 添加流程定义历史列表 * update 审批记录v2改为v3 * update 调整请假必填项 * add 添加请假申请示例,添加流程定义文件部署 * update 移除流程表单 formConfig 属性,表单配置信息都放一起便于使用。 * add 添加任务加签,减签 * update 调整流程作废 * update 优化流程状态 * add 添加任务驳回 * add 添加查询当前租户所有待办,已办任务 * add 增加审批意见 * add 添加流程办理弹窗确认组件 * add 添加任务作废理由 * update 调整流程实例,流程定义检索 * add 添加我的单据页面 * add 添加任务归还认领 * add 添加流程实例,流程定义分类查询 * add 添加模型分类查询 * add 添加流程分类 * Merge remote-tracking branch 'origin/future/flowable' into future/flowable * add 添加流程表单管理页面 * add 集成vForm动态表单组件 * update xml调整超出滚动 * add 添加已办列表 * add 添加单据状态 * update 优化流程实例删除 * fix 修复流程实例查询挂起状态错误 * update 调整流程实例挂起激活状态 * add 添加流程实例列表 * update 调整流程定义弹窗提示 * add 添加流程定义列表,添加流程图,xml预览,添加简单流程启动,办理 * 调整审批记录悬浮逻辑 * 删除无用代码 * add 添加节点悬浮信息 * 调整流程预览 * 调整流程追踪 * add 添加审批记录 * add 模型设计的types * update 修改排版 * add lang=ts * update 修改ele的废弃api * fix调整审批记录图片不显示问题 * add 添加任务待办,流程图 * 调整设计器关闭 * add 添加待办 * remove 删除无用代码 * update types * 添加模型token验证 * 隐藏设计器验证按钮,隐藏表单,案例,应用程序等 * 添加模型部署 * 添加画图接口token,优化画图接口 * 添加工作流模型新增,修改,查询,删除,画图工具
This commit is contained in:
@ -12,6 +12,17 @@ export const listRole = (query: RoleQuery): AxiosPromise<RoleVO[]> => {
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 通过roleIds查询角色
|
||||
* @param roleIds
|
||||
*/
|
||||
export const optionSelect = (roleIds: (number | string)[]): AxiosPromise<RoleVO[]> => {
|
||||
return request({
|
||||
url: '/system/role/optionselect?roleIds=' + roleIds,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询角色详细
|
||||
*/
|
||||
@ -142,3 +153,8 @@ export const deptTreeSelect = (roleId: string | number): AxiosPromise<RoleDeptTr
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
export default {
|
||||
optionSelect,
|
||||
listRole
|
||||
};
|
||||
|
@ -17,6 +17,17 @@ export const listUser = (query: UserQuery): AxiosPromise<UserVO[]> => {
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 通过用户ids查询用户
|
||||
* @param userIds
|
||||
*/
|
||||
export const optionSelect = (userIds: (number | string)[]): AxiosPromise<UserVO[]> => {
|
||||
return request({
|
||||
url: '/system/user/optionselect?userIds=' + userIds,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取用户详情
|
||||
* @param userId
|
||||
@ -199,6 +210,7 @@ export const deptTreeSelect = (): AxiosPromise<DeptVO[]> => {
|
||||
export default {
|
||||
listUser,
|
||||
getUser,
|
||||
optionSelect,
|
||||
addUser,
|
||||
updateUser,
|
||||
delUser,
|
||||
|
63
src/api/workflow/category/index.ts
Normal file
63
src/api/workflow/category/index.ts
Normal file
@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { CategoryVO, CategoryForm, CategoryQuery } 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 id
|
||||
*/
|
||||
export const getCategory = (id: string | number): AxiosPromise<CategoryVO> => {
|
||||
return request({
|
||||
url: '/workflow/category/' + id,
|
||||
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 id
|
||||
*/
|
||||
export const delCategory = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/workflow/category/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
67
src/api/workflow/category/types.ts
Normal file
67
src/api/workflow/category/types.ts
Normal file
@ -0,0 +1,67 @@
|
||||
export interface CategoryVO {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
id: string;
|
||||
|
||||
/**
|
||||
* 分类名称
|
||||
*/
|
||||
categoryName: string;
|
||||
|
||||
/**
|
||||
* 分类编码
|
||||
*/
|
||||
categoryCode: string;
|
||||
|
||||
/**
|
||||
* 父级id
|
||||
*/
|
||||
parentId: string | number;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
sortNum: number;
|
||||
|
||||
children?: CategoryVO[];
|
||||
}
|
||||
|
||||
export interface CategoryForm extends BaseEntity {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 分类名称
|
||||
*/
|
||||
categoryName?: string;
|
||||
|
||||
/**
|
||||
* 分类编码
|
||||
*/
|
||||
categoryCode?: string;
|
||||
|
||||
/**
|
||||
* 父级id
|
||||
*/
|
||||
parentId?: string | number;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
sortNum?: number;
|
||||
}
|
||||
|
||||
export interface CategoryQuery extends PageQuery {
|
||||
/**
|
||||
* 分类名称
|
||||
*/
|
||||
categoryName?: string;
|
||||
|
||||
/**
|
||||
* 分类编码
|
||||
*/
|
||||
categoryCode?: string;
|
||||
}
|
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: '/demo/leave/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询请假详细
|
||||
* @param id
|
||||
*/
|
||||
export const getLeave = (id: string | number): AxiosPromise<LeaveVO> => {
|
||||
return request({
|
||||
url: '/demo/leave/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增请假
|
||||
* @param data
|
||||
*/
|
||||
export const addLeave = (data: LeaveForm): AxiosPromise<LeaveVO> => {
|
||||
return request({
|
||||
url: '/demo/leave',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改请假
|
||||
* @param data
|
||||
*/
|
||||
export const updateLeave = (data: LeaveForm): AxiosPromise<LeaveVO> => {
|
||||
return request({
|
||||
url: '/demo/leave',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除请假
|
||||
* @param id
|
||||
*/
|
||||
export const delLeave = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/demo/leave/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
22
src/api/workflow/leave/types.ts
Normal file
22
src/api/workflow/leave/types.ts
Normal file
@ -0,0 +1,22 @@
|
||||
export interface LeaveVO {
|
||||
id: string | number;
|
||||
leaveType: string;
|
||||
startDate: string;
|
||||
endDate: string;
|
||||
leaveDays: number;
|
||||
remark: string;
|
||||
}
|
||||
|
||||
export interface LeaveForm extends BaseEntity {
|
||||
id?: string | number;
|
||||
leaveType?: string;
|
||||
startDate?: string;
|
||||
endDate?: string;
|
||||
leaveDays?: number;
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
export interface LeaveQuery extends PageQuery {
|
||||
startLeaveDays?: number;
|
||||
endLeaveDays?: number;
|
||||
}
|
91
src/api/workflow/model/index.ts
Normal file
91
src/api/workflow/model/index.ts
Normal file
@ -0,0 +1,91 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { ModelForm, ModelQuery, ModelVO } from '@/api/workflow/model/types';
|
||||
|
||||
/**
|
||||
* 查询模型列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
export const listModel = (query: ModelQuery): AxiosPromise<ModelVO[]> => {
|
||||
return request({
|
||||
url: '/workflow/model/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询模型信息
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
export const getInfo = (id: string): AxiosPromise<ModelForm> => {
|
||||
return request({
|
||||
url: '/workflow/model/getInfo/'+id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增模型
|
||||
* @param data
|
||||
* @returns {*}
|
||||
*/
|
||||
export const addModel = (data: ModelForm): AxiosPromise<void> => {
|
||||
return request({
|
||||
url: '/workflow/model/save',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改模型信息
|
||||
* @param data
|
||||
* @returns {*}
|
||||
*/
|
||||
export function update(data: ModelForm): AxiosPromise<void> {
|
||||
return request({
|
||||
url: '/workflow/model/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改模型信息
|
||||
* @param data
|
||||
* @returns {*}
|
||||
*/
|
||||
export function editModelXml(data: ModelForm): AxiosPromise<void> {
|
||||
return request({
|
||||
url: '/workflow/model/editModelXml',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 按id删除模型
|
||||
* @returns {*}
|
||||
* @param id 模型id
|
||||
*/
|
||||
export function delModel(id: string | string[]): AxiosPromise<void> {
|
||||
return request({
|
||||
url: '/workflow/model/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 模型部署
|
||||
* @returns {*}
|
||||
* @param id 模型id
|
||||
*/
|
||||
export const modelDeploy = (id: string): AxiosPromise<void> => {
|
||||
return request({
|
||||
url: `/workflow/model/modelDeploy/${id}`,
|
||||
method: 'post'
|
||||
});
|
||||
};
|
66
src/api/workflow/model/types.ts
Normal file
66
src/api/workflow/model/types.ts
Normal file
@ -0,0 +1,66 @@
|
||||
export interface ModelForm {
|
||||
id: string,
|
||||
name: string;
|
||||
key: string;
|
||||
categoryCode: string;
|
||||
xml:string,
|
||||
svg:string,
|
||||
description: string;
|
||||
}
|
||||
|
||||
export interface ModelQuery extends PageQuery {
|
||||
name?: string;
|
||||
key?: string;
|
||||
categoryCode?: string;
|
||||
}
|
||||
|
||||
export interface OriginalPersistentState {
|
||||
metaInfo: string;
|
||||
editorSourceValueId: string;
|
||||
createTime: string;
|
||||
deploymentId?: string;
|
||||
name: string;
|
||||
tenantId: string;
|
||||
category?: string;
|
||||
version: number;
|
||||
editorSourceExtraValueId?: string;
|
||||
key: string;
|
||||
lastUpdateTime: string;
|
||||
}
|
||||
|
||||
export interface PersistentState {
|
||||
metaInfo: string;
|
||||
editorSourceValueId: string;
|
||||
createTime: string;
|
||||
deploymentId?: string;
|
||||
name: string;
|
||||
tenantId: string;
|
||||
category?: string;
|
||||
version: number;
|
||||
editorSourceExtraValueId?: string;
|
||||
key: string;
|
||||
lastUpdateTime: string;
|
||||
}
|
||||
|
||||
export interface ModelVO {
|
||||
id: string;
|
||||
revision: number;
|
||||
originalPersistentState: OriginalPersistentState;
|
||||
name: string;
|
||||
key: string;
|
||||
category?: string;
|
||||
createTime: string;
|
||||
lastUpdateTime: string;
|
||||
version: number;
|
||||
metaInfo: string;
|
||||
deploymentId?: string;
|
||||
editorSourceValueId: string;
|
||||
editorSourceExtraValueId?: string;
|
||||
tenantId: string;
|
||||
persistentState: PersistentState;
|
||||
revisionNext: number;
|
||||
idPrefix: string;
|
||||
inserted: boolean;
|
||||
updated: boolean;
|
||||
deleted: boolean;
|
||||
}
|
123
src/api/workflow/processDefinition/index.ts
Normal file
123
src/api/workflow/processDefinition/index.ts
Normal file
@ -0,0 +1,123 @@
|
||||
import request from '@/utils/request';
|
||||
import { ProcessDefinitionQuery, ProcessDefinitionVO, ProcessDefinitionXmlVO } from '@/api/workflow/processDefinition/types';
|
||||
import { AxiosPromise } from 'axios';
|
||||
const baseUrl = import.meta.env.VITE_APP_BASE_API;
|
||||
|
||||
/**
|
||||
* 获取流程定义列表
|
||||
* @param query 流程实例id
|
||||
* @returns
|
||||
*/
|
||||
export const listProcessDefinition = (query: ProcessDefinitionQuery): AxiosPromise<ProcessDefinitionVO[]> => {
|
||||
return request({
|
||||
url: `/workflow/processDefinition/list`,
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
/**
|
||||
* 按照流程定义key获取流程定义
|
||||
* @param processInstanceId 流程实例id
|
||||
* @returns
|
||||
*/
|
||||
export const getProcessDefinitionListByKey = (key: string) => {
|
||||
return request({
|
||||
url: `/workflow/processDefinition/getProcessDefinitionListByKey/${key}`,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 通过流程定义id获取流程图
|
||||
*/
|
||||
export const processDefinitionImage = (processDefinitionId: string): AxiosPromise<any> => {
|
||||
return request({
|
||||
url: `/workflow/processDefinition/processDefinitionImage/${processDefinitionId}` + '?t' + Math.random(),
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 通过流程定义id获取xml
|
||||
* @param processDefinitionId 流程定义id
|
||||
* @returns
|
||||
*/
|
||||
export const processDefinitionXml = (processDefinitionId: string): AxiosPromise<ProcessDefinitionXmlVO> => {
|
||||
return request({
|
||||
url: `/workflow/processDefinition/processDefinitionXml/${processDefinitionId}`,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除流程定义
|
||||
* @param processDefinitionId 流程定义id
|
||||
* @param deploymentId 部署id
|
||||
* @returns
|
||||
*/
|
||||
export const deleteProcessDefinition = (deploymentId: string, processDefinitionId: string) => {
|
||||
return request({
|
||||
url: `/workflow/processDefinition/${deploymentId}/${processDefinitionId}`,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 挂起/激活
|
||||
* @param processDefinitionId 流程定义id
|
||||
* @returns
|
||||
*/
|
||||
export const updateProcessDefState = (processDefinitionId: string) => {
|
||||
return request({
|
||||
url: `/workflow/processDefinition/updateProcessDefState/${processDefinitionId}`,
|
||||
method: 'put'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 流程定义转换为模型
|
||||
* @param processDefinitionId 流程定义id
|
||||
* @returns
|
||||
*/
|
||||
export const convertToModel = (processDefinitionId: string) => {
|
||||
return request({
|
||||
url: `/workflow/processDefinition/convertToModel/${processDefinitionId}`,
|
||||
method: 'put'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 通过zip或xml部署流程定义
|
||||
* @returns
|
||||
*/
|
||||
export function deployProcessFile(data: any) {
|
||||
return request({
|
||||
url: '/workflow/processDefinition/deployByFile',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 迁移流程
|
||||
* @param currentProcessDefinitionId
|
||||
* @param fromProcessDefinitionId
|
||||
* @returns
|
||||
*/
|
||||
export const migrationProcessDefinition = (currentProcessDefinitionId: string, fromProcessDefinitionId: string) => {
|
||||
return request({
|
||||
url: `/workflow/processDefinition/migrationProcessDefinition/${currentProcessDefinitionId}/${fromProcessDefinitionId}`,
|
||||
method: 'put'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询流程定义列表
|
||||
* @returns
|
||||
*/
|
||||
export const getProcessDefinitionList = () => {
|
||||
return request({
|
||||
url: `/workflow/processDefinition/getProcessDefinitionList`,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
22
src/api/workflow/processDefinition/types.ts
Normal file
22
src/api/workflow/processDefinition/types.ts
Normal file
@ -0,0 +1,22 @@
|
||||
export interface ProcessDefinitionQuery extends PageQuery {
|
||||
key?: string;
|
||||
name?: string;
|
||||
categoryCode?: string;
|
||||
}
|
||||
|
||||
export interface ProcessDefinitionVO extends BaseEntity {
|
||||
id: string;
|
||||
name: string;
|
||||
key: string;
|
||||
version: number;
|
||||
suspensionState: number;
|
||||
resourceName: string;
|
||||
diagramResourceName: string;
|
||||
deploymentId: string;
|
||||
deploymentTime: string;
|
||||
}
|
||||
|
||||
export interface ProcessDefinitionXmlVO {
|
||||
xml: string[];
|
||||
xmlStr: string;
|
||||
}
|
115
src/api/workflow/processInstance/index.ts
Normal file
115
src/api/workflow/processInstance/index.ts
Normal file
@ -0,0 +1,115 @@
|
||||
import request from '@/utils/request';
|
||||
import { ProcessInstanceQuery, ProcessInstanceVO } from '@/api/workflow/processInstance/types';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { string } from 'vue-types';
|
||||
const baseUrl = import.meta.env.VITE_APP_BASE_API;
|
||||
|
||||
/**
|
||||
* 查询运行中实例列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
export const getProcessInstanceRunningByPage = (query: ProcessInstanceQuery): AxiosPromise<ProcessInstanceVO[]> => {
|
||||
return request({
|
||||
url: '/workflow/processInstance/getProcessInstanceRunningByPage',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询已完成实例列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
export const getProcessInstanceFinishByPage = (query: ProcessInstanceQuery): AxiosPromise<ProcessInstanceVO[]> => {
|
||||
return request({
|
||||
url: '/workflow/processInstance/getProcessInstanceFinishByPage',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 通过流程实例id获取历史流程图
|
||||
*/
|
||||
export const getHistoryProcessImage = (processInstanceId: string) => {
|
||||
return request({
|
||||
url: `/workflow/processInstance/getHistoryProcessImage/${processInstanceId}` + '?t' + Math.random(),
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取审批记录
|
||||
* @param processInstanceId 流程实例id
|
||||
* @returns
|
||||
*/
|
||||
export const getHistoryRecord = (processInstanceId: string) => {
|
||||
return request({
|
||||
url: `/workflow/processInstance/getHistoryRecord/${processInstanceId}`,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 作废
|
||||
* @param data 参数
|
||||
* @returns
|
||||
*/
|
||||
export const deleteRuntimeProcessInst = (data: object) => {
|
||||
return request({
|
||||
url: `/workflow/processInstance/deleteRuntimeProcessInst`,
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 运行中的实例 删除程实例,删除历史记录,删除业务与流程关联信息
|
||||
* @param processInstanceId 流程实例id
|
||||
* @returns
|
||||
*/
|
||||
export const deleteRuntimeProcessAndHisInst = (processInstanceId: string | string[]) => {
|
||||
return request({
|
||||
url: `/workflow/processInstance/deleteRuntimeProcessAndHisInst/${processInstanceId}`,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 已完成的实例 删除程实例,删除历史记录,删除业务与流程关联信息
|
||||
* @param processInstanceId 流程实例id
|
||||
* @returns
|
||||
*/
|
||||
export const deleteFinishProcessAndHisInst = (processInstanceId: string | string[]) => {
|
||||
return request({
|
||||
url: `/workflow/processInstance/deleteFinishProcessAndHisInst/${processInstanceId}`,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 分页查询当前登录人单据
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
export const getCurrentSubmitByPage = (query: ProcessInstanceQuery): AxiosPromise<ProcessInstanceVO[]> => {
|
||||
return request({
|
||||
url: '/workflow/processInstance/getCurrentSubmitByPage',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 撤销流程
|
||||
* @param processInstanceId 流程实例id
|
||||
* @returns
|
||||
*/
|
||||
export const cancelProcessApply = (processInstanceId: string) => {
|
||||
return request({
|
||||
url: `/workflow/processInstance/cancelProcessApply/${processInstanceId}`,
|
||||
method: 'post'
|
||||
});
|
||||
};
|
27
src/api/workflow/processInstance/types.ts
Normal file
27
src/api/workflow/processInstance/types.ts
Normal file
@ -0,0 +1,27 @@
|
||||
import { TaskVO } from '@/api/workflow/task/types';
|
||||
|
||||
export interface ProcessInstanceQuery extends PageQuery {
|
||||
categoryCode?: string;
|
||||
name?: string;
|
||||
key?: string;
|
||||
startUserId?: string;
|
||||
businessKey?: string;
|
||||
}
|
||||
|
||||
export interface ProcessInstanceVO extends BaseEntity {
|
||||
id: string;
|
||||
processDefinitionId: string;
|
||||
processDefinitionName: string;
|
||||
processDefinitionKey: string;
|
||||
processDefinitionVersion: string;
|
||||
deploymentId: string;
|
||||
businessKey: string;
|
||||
isSuspended?: any;
|
||||
tenantId: string;
|
||||
startTime: string;
|
||||
endTime?: string;
|
||||
startUserId: string;
|
||||
businessStatus: string;
|
||||
businessStatusName: string;
|
||||
taskVoList: TaskVO[];
|
||||
}
|
181
src/api/workflow/task/index.ts
Normal file
181
src/api/workflow/task/index.ts
Normal file
@ -0,0 +1,181 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { TaskQuery, TaskVO } from '@/api/workflow/task/types';
|
||||
/**
|
||||
* 查询待办列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
export const getTaskWaitByPage = (query: TaskQuery): AxiosPromise<TaskVO[]> => {
|
||||
return request({
|
||||
url: '/workflow/task/getTaskWaitByPage',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询已办列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
export const getTaskFinishByPage = (query: TaskQuery): AxiosPromise<TaskVO[]> => {
|
||||
return request({
|
||||
url: '/workflow/task/getTaskFinishByPage',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询当前用户的抄送列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
export const getTaskCopyByPage = (query: TaskQuery): AxiosPromise<TaskVO[]> => {
|
||||
return request({
|
||||
url: '/workflow/task/getTaskCopyByPage',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 当前租户所有待办任务
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
export const getAllTaskWaitByPage = (query: TaskQuery): AxiosPromise<TaskVO[]> => {
|
||||
return request({
|
||||
url: '/workflow/task/getAllTaskWaitByPage',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 当前租户所有已办任务
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
export const getAllTaskFinishByPage = (query: TaskQuery): AxiosPromise<TaskVO[]> => {
|
||||
return request({
|
||||
url: '/workflow/task/getAllTaskFinishByPage',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 启动流程
|
||||
* @param data
|
||||
* @returns {*}
|
||||
*/
|
||||
export const startWorkFlow = (data: object) => {
|
||||
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 taskId
|
||||
* @returns {*}
|
||||
*/
|
||||
export const claim = (taskId: string) => {
|
||||
return request({
|
||||
url: '/workflow/task/claim/' + taskId,
|
||||
method: 'post'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 归还任务
|
||||
* @param taskId
|
||||
* @returns {*}
|
||||
*/
|
||||
export const returnTask = (taskId: string) => {
|
||||
return request({
|
||||
url: '/workflow/task/returnTask/' + taskId,
|
||||
method: 'post'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 任务驳回
|
||||
* @param taskId
|
||||
* @returns {*}
|
||||
*/
|
||||
export const backProcess = (data: object) => {
|
||||
return request({
|
||||
url: '/workflow/task/backProcess',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取流程状态
|
||||
* @param taskId
|
||||
* @returns
|
||||
*/
|
||||
export const getBusinessStatus = (taskId: string) => {
|
||||
return request({
|
||||
url: '/workflow/task/getBusinessStatus/' + taskId,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 加签
|
||||
* @param data
|
||||
* @returns
|
||||
*/
|
||||
export const addMultiInstanceExecution = (data: object) => {
|
||||
return request({
|
||||
url: '/workflow/task/addMultiInstanceExecution',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 减签
|
||||
* @param data
|
||||
* @returns
|
||||
*/
|
||||
export const deleteMultiInstanceExecution = (data: object) => {
|
||||
return request({
|
||||
url: '/workflow/task/deleteMultiInstanceExecution',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改任务办理人
|
||||
* @param taskIds
|
||||
* @param userId
|
||||
* @returns
|
||||
*/
|
||||
export const updateAssignee = (taskIds: Array<string>,userId: string) => {
|
||||
return request({
|
||||
url: `/workflow/task/updateAssignee/${taskIds}/${userId}`,
|
||||
method: 'put'
|
||||
});
|
||||
};
|
39
src/api/workflow/task/types.ts
Normal file
39
src/api/workflow/task/types.ts
Normal file
@ -0,0 +1,39 @@
|
||||
export interface TaskQuery extends PageQuery {
|
||||
name?: string;
|
||||
processDefinitionKey?: string;
|
||||
processDefinitionName?: string;
|
||||
}
|
||||
|
||||
export interface ParticipantVo {
|
||||
groupIds?: string[] | number[];
|
||||
candidate: string[] | number[];
|
||||
candidateName: string[];
|
||||
claim: boolean;
|
||||
}
|
||||
|
||||
export interface TaskVO extends BaseEntity {
|
||||
id: string;
|
||||
name: string;
|
||||
description?: string;
|
||||
priority: number;
|
||||
owner?: string;
|
||||
assignee?: string | number;
|
||||
assigneeName?: string;
|
||||
processInstanceId: string;
|
||||
executionId: string;
|
||||
taskDefinitionId?: any;
|
||||
processDefinitionId: string;
|
||||
endTime?: string;
|
||||
taskDefinitionKey: string;
|
||||
dueDate?: string;
|
||||
category?: any;
|
||||
parentTaskId?: any;
|
||||
tenantId: string;
|
||||
claimTime?: string;
|
||||
businessStatus: string;
|
||||
businessStatusName: string;
|
||||
processDefinitionName: string;
|
||||
processDefinitionKey: string;
|
||||
participantVo: ParticipantVo;
|
||||
multiInstance: boolean;
|
||||
}
|
53
src/api/workflow/workflowUser/index.ts
Normal file
53
src/api/workflow/workflowUser/index.ts
Normal file
@ -0,0 +1,53 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { UserVO } from '@/api/system/user/types';
|
||||
|
||||
/**
|
||||
* 分页查询工作流选择加签人员
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
export const getWorkflowAddMultiListByPage = (query: object) => {
|
||||
return request({
|
||||
url: '/workflow/user/getWorkflowAddMultiListByPage',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询工作流选择减签人员
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
export const getWorkflowDeleteMultiInstanceList = (taskId: string) => {
|
||||
return request({
|
||||
url: '/workflow/user/getWorkflowDeleteMultiInstanceList/' + taskId,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 按照用户id查询用户
|
||||
* @param userIdList
|
||||
* @returns {*}
|
||||
*/
|
||||
export const getUserListByIds = (userIdList: any[]): AxiosPromise<UserVO[]> => {
|
||||
return request({
|
||||
url: '/workflow/user/getUserListByIds/' + userIdList,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 分页查询用户
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
export const getUserListByPage = (query: object) => {
|
||||
return request({
|
||||
url: '/workflow/user/getUserListByPage',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
Reference in New Issue
Block a user