!172 合并 warmflow 功能分支

* update 优化 流程定义页面 点击复制之后跳转到未发布列表
* update 优化 流程定义页面 增加加载loading层
* fix: v-model处理有延迟 需要手动处理
* update 调整流程定义查询
* Merge remote-tracking branch 'origin/dev' into warm-flw-future
* update 调整可驳回的节点
* update: 调整文案
* update: 激活/挂起改为switch操作
* update 优化 代码删除无用输出
* update 统一抄送人使用昵称展示
* update 调整分类接口
* update 统一业务id参数
* update 删除默认顶节点
* !168 优化流程分类
* update 恢复误删除代码
* update 优化流程分类
* update 修复 路由跳转未改全
* [update]
* fix 修复一些问题
* update 重构流程分类表
* update 流程定义增加表单路径与编辑功能 修复一些其他bug
* fix 修复 一些问题
* update 变量统一命名
* add 增加示例
* Merge branch 'warm-flw-future' of https://gitee.com/JavaLionLi/plus-ui…
* update 调整办理人
* Merge remote-tracking branch 'origin/dev' into warm-flw-future
* add 增加示例
* update 调整审批记录 添加流程导出
* remove 删除无用代码
* remove 删除无用代码
* [update]
* [fix]
* 流程干预删除委托
* 增加附件
* 附件修改
* 申请人查询修改
* 1.修改查询条件
* !167 fix 修复 import路径修改不全问题
* fix 修复 import路径修改不全问题
* !166 update 清除 ProcessPreview 引用
* update 清除 ProcessPreview 引用
* remove 删除 bpmn.js 设计器
* remove 删除 bpmn.js 设计器
* remove 删除 bpmn.js 设计器
* remove 删除 bpmn.js 设计器
* fix 修复 前端路径修改不全问题
* update 优化接口请求路径
* add 添加作废
* add 添加流程干预
* update 调整加签,减签
* update 调整加签,减签
* add 增加流程查看
* update 调整委托,转办
* update 调整流程变量显示
* update 调整办理人修改
* update 调整流程实例状态页面
* update 调整已办页面
* add 添加流程撤销
* update 调整任务,流程实例 ,流程定义页面
* Merge branch 'dev' into warm-flw-future
* update 调整流程定义页面
* add 添加流程变量查看
* update 调整设计器路由名称
* update 调整办理人
* update 调整设计器uri
* update 调整设计器请求uri 调整待办状态
* update 调整办理 驳回 终止等状态
* add 添加模型新增
* add 添加warm-ui设计器,删除无用代码
* Merge remote-tracking branch 'origin/dev' into warm-flw-future
* add 添加流程设计
* update 调整驳回
* update 调整视图类型错误
* Merge branch 'warm-flw-future' of https://gitee.com/JavaLionLi/plus-ui…
* 添加已办,未办
* Merge remote-tracking branch 'origin/dev' into warm-flw-future
* update 调整流程实例,待办查询
* add 添加代办人,调整提交按钮校验
* update 调整流程定义查询
* add添加流程定义激活 挂起
* add 添加流程文件部署 调整流程发布
* update 优化 时间搜索组件统一
* Merge remote-tracking branch 'origin/dev' into warm-flw-future
* fix 修复 用户管理编辑安全权限错误问题
* Merge remote-tracking branch 'origin/dev' into warm-flw-future
* update 优化 类型报错问题
* update 优化 切换租户后刷新首页
* update 优化 实现表格行选中切换
* update 优化 使用 vueuse 重构 websocket 实现
* update 优化 使用 vueuse 重构 websocket 实现
* fix 修复 登出后重新登录 sse推送报错问题
* reset 回滚 代码修改 采用其他方案
* fix 修复 登出后重新登录 sse推送报错问题
* update 优化 删除无用代码
* update element-plus 2.7.5 => 2.7.8
* reset 回滚 错误修复
* update 优化 代码生成器编辑页禁用缓存 防止同步后页面不更新问题
* fix 修复 代码生成同步点击取消报错问题
* 初始化添加warm-flow
This commit is contained in:
疯狂的狮子Li
2025-01-13 06:11:00 +00:00
parent 100f44e197
commit e423d8afcf
78 changed files with 1955 additions and 8762 deletions

View File

@ -1,6 +1,6 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { CategoryVO, CategoryForm, CategoryQuery } from '@/api/workflow/category/types';
import { CategoryVO, CategoryForm, CategoryQuery, CategoryTreeVO } from '@/api/workflow/category/types';
/**
* 查询流程分类列表
@ -18,11 +18,11 @@ export const listCategory = (query?: CategoryQuery): AxiosPromise<CategoryVO[]>
/**
* 查询流程分类详细
* @param id
* @param categoryId
*/
export const getCategory = (id: string | number): AxiosPromise<CategoryVO> => {
export const getCategory = (categoryId: string | number): AxiosPromise<CategoryVO> => {
return request({
url: '/workflow/category/' + id,
url: '/workflow/category/' + categoryId,
method: 'get'
});
};
@ -53,11 +53,24 @@ export const updateCategory = (data: CategoryForm) => {
/**
* 删除流程分类
* @param id
* @param categoryId
*/
export const delCategory = (id: string | number | Array<string | number>) => {
export const delCategory = (categoryId: string | number | Array<string | number>) => {
return request({
url: '/workflow/category/' + id,
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
});
};

View File

@ -1,18 +1,16 @@
export interface CategoryTreeVO {
id: number | string;
label: string;
parentId: number | string;
weight: number;
children: CategoryTreeVO[];
}
export interface CategoryVO {
/**
* 主键
*/
id: string;
/**
* 分类名称
* 流程分类ID
*/
categoryName: string;
/**
* 分类编码
*/
categoryCode: string;
categoryId: string | number;
/**
* 父级id
@ -20,48 +18,55 @@ export interface CategoryVO {
parentId: string | number;
/**
* 排序
* 流程分类名称
*/
sortNum: number;
categoryName: string;
children?: CategoryVO[];
/**
* 显示顺序
*/
orderNum: number;
/**
* 创建时间
*/
createTime: string;
/**
* 子对象
*/
children: CategoryVO[];
}
export interface CategoryForm extends BaseEntity {
/**
* 主键
*/
id?: string | number;
/**
* 分类名称
* 流程分类ID
*/
categoryId?: string | number;
/**
* 流程分类名称
*/
categoryName?: string;
/**
* 分类编码
*/
categoryCode?: string;
/**
* 父级id
* 父流程分类id
*/
parentId?: string | number;
/**
*
* 显示顺
*/
sortNum?: number;
orderNum?: number;
}
export interface CategoryQuery extends PageQuery {
export interface CategoryQuery {
/**
* 分类名称
* 流程分类名称
*/
categoryName?: string;
/**
* 分类编码
*/
categoryCode?: string;
}

View 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'
});
};

View 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;
}

View File

@ -1,49 +0,0 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { DefinitionConfigVO, DefinitionConfigForm } from '@/api/workflow/definitionConfig/types';
/**
* 查询表单配置详细
* @param definitionId
*/
export const getByDefId = (definitionId: string | number): AxiosPromise<DefinitionConfigVO> => {
return request({
url: '/workflow/definitionConfig/getByDefId/' + definitionId,
method: 'get'
});
};
/**
* 新增表单配置
* @param data
*/
export const saveOrUpdate = (data: DefinitionConfigForm) => {
return request({
url: '/workflow/definitionConfig/saveOrUpdate',
method: 'post',
data: data
});
};
/**
* 删除表单配置
* @param id
*/
export const deldefinitionConfig = (id: string | number | Array<string | number>) => {
return request({
url: '/workflow/definitionConfig/' + id,
method: 'delete'
});
};
/**
* 查询流程定义配置排除当前查询的流程定义
* @param tableName
* @param definitionId
*/
export const getByTableNameNotDefId = (tableName: string, definitionId: string | number) => {
return request({
url: `/workflow/definitionConfig/getByTableNameNotDefId/${tableName}/${definitionId}`,
method: 'get'
});
};

View File

@ -1,102 +0,0 @@
import { FormManageVO } from '@/api/workflow/formManage/types';
export interface DefinitionConfigVO {
/**
* 主键
*/
id: string | number;
/**
* 表名
*/
tableName?: string;
/**
* 流程定义ID
*/
definitionId: string | number;
/**
* 流程KEY
*/
processKey: string;
/**
* 流程版本
*/
version?: string | number;
/**
* 备注
*/
remark: string;
/**
* 表单管理
*/
wfFormManageVo: FormManageVO;
}
export interface DefinitionConfigForm extends BaseEntity {
/**
* 主键
*/
id?: string | number;
/**
* 表名
*/
tableName?: string;
/**
* 流程定义ID
*/
definitionId?: string | number;
/**
* 流程KEY
*/
processKey?: string;
/**
* 流程版本
*/
version?: string | number;
/**
* 备注
*/
remark?: string;
/**
* 表单管理
*/
wfFormManageVo?: FormManageVO;
}
export interface DefinitionConfigQuery extends PageQuery {
/**
* 表名
*/
tableName?: string;
/**
* 流程定义ID
*/
definitionId?: string | number;
/**
* 流程KEY
*/
processKey?: string;
/**
* 流程版本
*/
version?: string | number;
/**
* 表单管理
*/
wfFormManageVo: FormManageVO;
}

View File

@ -1,76 +0,0 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { FormManageVO, FormManageForm, FormManageQuery } from '@/api/workflow/formManage/types';
/**
* 查询表单管理列表
* @param query
* @returns {*}
*/
export const listFormManage = (query?: FormManageQuery): AxiosPromise<FormManageVO[]> => {
return request({
url: '/workflow/formManage/list',
method: 'get',
params: query
});
};
/**
* 查询表单管理列表
* @param query
* @returns {*}
*/
export const selectListFormManage = (): AxiosPromise<FormManageVO[]> => {
return request({
url: '/workflow/formManage/list/selectList',
method: 'get'
});
};
/**
* 查询表单管理详细
* @param id
*/
export const getFormManage = (id: string | number): AxiosPromise<FormManageVO> => {
return request({
url: '/workflow/formManage/' + id,
method: 'get'
});
};
/**
* 新增表单管理
* @param data
*/
export const addFormManage = (data: FormManageForm) => {
return request({
url: '/workflow/formManage',
method: 'post',
data: data
});
};
/**
* 修改表单管理
* @param data
*/
export const updateFormManage = (data: FormManageForm) => {
return request({
url: '/workflow/formManage',
method: 'put',
data: data
});
};
/**
* 删除表单管理
* @param id
*/
export const delFormManage = (id: string | number | Array<string | number>) => {
return request({
url: '/workflow/formManage/' + id,
method: 'delete'
});
};

View File

@ -1,69 +0,0 @@
export interface FormManageVO {
/**
* 主键
*/
id: string | number;
/**
* 表单名称
*/
formName: string;
/**
* 表单类型
*/
formType: string;
/**
* 表单类型名称
*/
formTypeName: string;
/**
* 路由地址/表单ID
*/
router: string;
/**
* 备注
*/
remark: string;
}
export interface FormManageForm extends BaseEntity {
/**
* 主键
*/
id?: string | number;
/**
* 表单名称
*/
formName?: string;
/**
* 表单类型
*/
formType?: string;
/**
* 路由地址/表单ID
*/
router?: string;
/**
* 备注
*/
remark?: string;
}
export interface FormManageQuery extends PageQuery {
/**
* 表单名称
*/
formName?: string;
/**
* 表单类型
*/
formType?: string;
}

View 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
});
};

View 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[];
}

View File

@ -1,104 +0,0 @@
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'
});
};
/**
* 复制模型
* @param data
* @returns {*}
*/
export const copyModel = (data: ModelForm): AxiosPromise<void> => {
return request({
url: '/workflow/model/copyModel',
method: 'post',
data: data
});
};

View File

@ -1,66 +0,0 @@
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;
}

View File

@ -1,38 +0,0 @@
import { FormManageVO } from '@/api/workflow/formManage/types';
export interface NodeConfigVO {
/**
* 主键
*/
id: string | number;
/**
* 表单id
*/
formId: string | number;
/**
* 表单类型
*/
formType: string;
/**
* 节点名称
*/
nodeName: string;
/**
* 节点id
*/
nodeId: string | number;
/**
* 流程定义id
*/
definitionId: string | number;
/**
* 表单管理
*/
wfFormManageVo: FormManageVO;
}

View File

@ -1,114 +0,0 @@
import request from '@/utils/request';
import { ProcessDefinitionQuery, ProcessDefinitionVO, definitionXmlVO } from '@/api/workflow/processDefinition/types';
import { AxiosPromise } from 'axios';
/**
* 获取流程定义列表
* @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 getListByKey = (key: string) => {
return request({
url: `/workflow/processDefinition/getListByKey/${key}`,
method: 'get'
});
};
/**
* 通过流程定义id获取流程图
*/
export const definitionImage = (processDefinitionId: string): AxiosPromise<any> => {
return request({
url: `/workflow/processDefinition/definitionImage/${processDefinitionId}` + '?t' + Math.random(),
method: 'get'
});
};
/**
* 通过流程定义id获取xml
* @param processDefinitionId 流程定义id
* @returns
*/
export const definitionXml = (processDefinitionId: string): AxiosPromise<definitionXmlVO> => {
return request({
url: `/workflow/processDefinition/definitionXml/${processDefinitionId}`,
method: 'get'
});
};
/**
* 删除流程定义
* @param deploymentId 部署id
* @param processDefinitionId 流程定义id
* @returns
*/
export const deleteProcessDefinition = (deploymentId: string | string[], processDefinitionId: string | string[]) => {
return request({
url: `/workflow/processDefinition/${deploymentId}/${processDefinitionId}`,
method: 'delete'
});
};
/**
* 挂起/激活
* @param processDefinitionId 流程定义id
* @returns
*/
export const updateDefinitionState = (processDefinitionId: string) => {
return request({
url: `/workflow/processDefinition/updateDefinitionState/${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,
headers: {
repeatSubmit: false
}
});
}
/**
* 迁移流程
* @param currentProcessDefinitionId
* @param fromProcessDefinitionId
* @returns
*/
export const migrationDefinition = (currentProcessDefinitionId: string, fromProcessDefinitionId: string) => {
return request({
url: `/workflow/processDefinition/migrationDefinition/${currentProcessDefinitionId}/${fromProcessDefinitionId}`,
method: 'put'
});
};

View File

@ -1,24 +0,0 @@
import { DefinitionConfigVO } from '@/api/workflow/definitionConfig/types';
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;
wfDefinitionConfigVo: DefinitionConfigVO;
}
export interface definitionXmlVO {
xml: string[];
xmlStr: string;
}

View File

@ -1,136 +0,0 @@
import request from '@/utils/request';
import { ProcessInstanceQuery, ProcessInstanceVO } from '@/api/workflow/processInstance/types';
import { AxiosPromise } from 'axios';
/**
* 查询运行中实例列表
* @param query
* @returns {*}
*/
export const getPageByRunning = (query: ProcessInstanceQuery): AxiosPromise<ProcessInstanceVO[]> => {
return request({
url: '/workflow/processInstance/getPageByRunning',
method: 'get',
params: query
});
};
/**
* 查询已完成实例列表
* @param query
* @returns {*}
*/
export const getPageByFinish = (query: ProcessInstanceQuery): AxiosPromise<ProcessInstanceVO[]> => {
return request({
url: '/workflow/processInstance/getPageByFinish',
method: 'get',
params: query
});
};
/**
* 通过业务id获取历史流程图
*/
export const getHistoryImage = (businessKey: string) => {
return request({
url: `/workflow/processInstance/getHistoryImage/${businessKey}` + '?t' + Math.random(),
method: 'get'
});
};
/**
* 通过业务id获取历史流程图运行中历史等节点
*/
export const getHistoryList = (businessKey: string): AxiosPromise<Record<string, any>> => {
return request({
url: `/workflow/processInstance/getHistoryList/${businessKey}` + '?t' + Math.random(),
method: 'get'
});
};
/**
* 获取审批记录
* @param businessKey 业务id
* @returns
*/
export const getHistoryRecord = (businessKey: string | number) => {
return request({
url: `/workflow/processInstance/getHistoryRecord/${businessKey}`,
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
* @returns {*}
*/
export const getPageByCurrent = (query: ProcessInstanceQuery): AxiosPromise<ProcessInstanceVO[]> => {
return request({
url: '/workflow/processInstance/getPageByCurrent',
method: 'get',
params: query
});
};
/**
* 撤销流程
* @param businessKey 业务id
* @returns
*/
export const cancelProcessApply = (businessKey: string) => {
return request({
url: `/workflow/processInstance/cancelProcessApply/${businessKey}`,
method: 'post'
});
};
export default {
getPageByRunning,
getPageByFinish,
getHistoryImage,
getHistoryList,
getHistoryRecord,
deleteRunInstance,
deleteRunAndHisInstance,
deleteFinishAndHisInstance,
getPageByCurrent,
cancelProcessApply
};

View File

@ -1,27 +0,0 @@
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[];
}

View File

@ -1,15 +1,15 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { TaskQuery, TaskVO } from '@/api/workflow/task/types';
import { TaskQuery, FlowTaskVO, TaskOperationBo } from '@/api/workflow/task/types';
/**
* 查询待办列表
* @param query
* @returns {*}
*/
export const getPageByTaskWait = (query: TaskQuery): AxiosPromise<TaskVO[]> => {
export const pageByTaskWait = (query: TaskQuery): AxiosPromise<FlowTaskVO[]> => {
return request({
url: '/workflow/task/getPageByTaskWait',
url: '/workflow/task/pageByTaskWait',
method: 'get',
params: query
});
@ -20,9 +20,9 @@ export const getPageByTaskWait = (query: TaskQuery): AxiosPromise<TaskVO[]> => {
* @param query
* @returns {*}
*/
export const getPageByTaskFinish = (query: TaskQuery): AxiosPromise<TaskVO[]> => {
export const pageByTaskFinish = (query: TaskQuery): AxiosPromise<FlowTaskVO[]> => {
return request({
url: '/workflow/task/getPageByTaskFinish',
url: '/workflow/task/pageByTaskFinish',
method: 'get',
params: query
});
@ -33,9 +33,9 @@ export const getPageByTaskFinish = (query: TaskQuery): AxiosPromise<TaskVO[]> =>
* @param query
* @returns {*}
*/
export const getPageByTaskCopy = (query: TaskQuery): AxiosPromise<TaskVO[]> => {
export const pageByTaskCopy = (query: TaskQuery): AxiosPromise<FlowTaskVO[]> => {
return request({
url: '/workflow/task/getPageByTaskCopy',
url: '/workflow/task/pageByTaskCopy',
method: 'get',
params: query
});
@ -46,9 +46,9 @@ export const getPageByTaskCopy = (query: TaskQuery): AxiosPromise<TaskVO[]> => {
* @param query
* @returns {*}
*/
export const getPageByAllTaskWait = (query: TaskQuery): AxiosPromise<TaskVO[]> => {
export const pageByAllTaskWait = (query: TaskQuery): AxiosPromise<FlowTaskVO[]> => {
return request({
url: '/workflow/task/getPageByAllTaskWait',
url: '/workflow/task/pageByAllTaskWait',
method: 'get',
params: query
});
@ -59,9 +59,9 @@ export const getPageByAllTaskWait = (query: TaskQuery): AxiosPromise<TaskVO[]> =
* @param query
* @returns {*}
*/
export const getPageByAllTaskFinish = (query: TaskQuery): AxiosPromise<TaskVO[]> => {
export const pageByAllTaskFinish = (query: TaskQuery): AxiosPromise<FlowTaskVO[]> => {
return request({
url: '/workflow/task/getPageByAllTaskFinish',
url: '/workflow/task/pageByAllTaskFinish',
method: 'get',
params: query
});
@ -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
@ -135,61 +111,24 @@ export const backProcess = (data: any): any => {
* @param taskId
* @returns
*/
export const getTaskById = (taskId: string) => {
export const getTask = (taskId: string) => {
return request({
url: '/workflow/task/getTaskById/' + taskId,
url: '/workflow/task/getTask/' + taskId,
method: 'get'
});
};
/**
* 加签
* @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
* @param taskIdList
* @param userId
* @returns
*/
export const updateAssignee = (taskIds: Array<string>, userId: string) => {
export const updateAssignee = (taskIdList: Array<string>, userId: string) => {
return request({
url: `/workflow/task/updateAssignee/${taskIds}/${userId}`,
method: 'put'
});
};
/**
* 转办任务
* @returns
*/
export const transferTask = (data: any) => {
return request({
url: `/workflow/task/transferTask`,
method: 'post',
data: data
url: `/workflow/task/updateAssignee/${userId}`,
method: 'put',
data: taskIdList
});
};
@ -205,60 +144,37 @@ export const terminationTask = (data: any) => {
});
};
/**
* 查询流程变量
* @returns
*/
export const getInstanceVariable = (taskId: string) => {
return request({
url: `/workflow/task/getInstanceVariable/${taskId}`,
method: 'get'
});
};
/**
* 获取可驳回得任务节点
* @returns
*/
export const getTaskNodeList = (processInstanceId: string) => {
export const getBackTaskNode = (definitionId: string, nodeCode: string) => {
return request({
url: `/workflow/task/getTaskNodeList/${processInstanceId}`,
url: `/workflow/task/getBackTaskNode/${definitionId}/${nodeCode}`,
method: 'get'
});
};
/**
* 委托任务
* 任务操作 操作类型,委派 delegateTask、转办 transferTask、加签 addSignature、减签 reductionSignature
* @returns
*/
export const delegateTask = (data: any) => {
export const taskOperation = (data: TaskOperationBo, operation: string) => {
return request({
url: `/workflow/task/delegateTask`,
url: `/workflow/task/taskOperation/${operation}`,
method: 'post',
data: data
});
};
/**
* 查询工作流任务用户选择加签人员
* @param taskId
* @returns {*}
* 获取当前任务办理人
* @param taskId 任务id
* @returns
*/
export const getTaskUserIdsByAddMultiInstance = (taskId: string) => {
export const currentTaskAllUser = (taskId: string | number) => {
return request({
url: '/workflow/task/getTaskUserIdsByAddMultiInstance/' + taskId,
method: 'get'
});
};
/**
* 查询工作流选择减签人员
* @param taskId
* @returns {*}
*/
export const getListByDeleteMultiInstance = (taskId: string) => {
return request({
url: '/workflow/task/getListByDeleteMultiInstance/' + taskId,
url: `/workflow/task/currentTaskAllUser/${taskId}`,
method: 'get'
});
};

View File

@ -1,9 +1,8 @@
import { NodeConfigVO } from '@/api/workflow/nodeConfig/types';
import { DefinitionConfigVO } from '@/api/workflow/definitionConfig/types';
export interface TaskQuery extends PageQuery {
name?: string;
processDefinitionKey?: string;
processDefinitionName?: string;
nodeName?: string;
flowCode?: string;
flowName?: string;
createByIds?: string[] | number[];
}
export interface ParticipantVo {
@ -12,38 +11,38 @@ export interface ParticipantVo {
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;
businessKey?: string;
wfNodeConfigVo?: NodeConfigVO;
wfDefinitionConfigVo?: DefinitionConfigVO;
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;
}

View File

@ -2,28 +2,14 @@ import { RouterJumpVo } from '@/api/workflow/workflowCommon/types';
export default {
routerJump(routerJumpVo: RouterJumpVo, proxy) {
if (routerJumpVo.wfNodeConfigVo && routerJumpVo.wfNodeConfigVo.formType === 'static' && routerJumpVo.wfNodeConfigVo.wfFormManageVo) {
proxy.$tab.closePage(proxy.$route);
proxy.$router.push({
path: `${routerJumpVo.wfNodeConfigVo.wfFormManageVo.router}`,
query: {
id: routerJumpVo.businessKey,
type: routerJumpVo.type,
taskId: routerJumpVo.taskId
}
});
} else if (routerJumpVo.wfNodeConfigVo && routerJumpVo.wfNodeConfigVo.formType === 'dynamic' && routerJumpVo.wfNodeConfigVo.wfFormManageVo) {
proxy.$tab.closePage(proxy.$route);
proxy.$router.push({
path: `${routerJumpVo.wfNodeConfigVo.wfFormManageVo.router}`,
query: {
id: routerJumpVo.businessKey,
type: routerJumpVo.type,
taskId: routerJumpVo.taskId
}
});
} else {
proxy?.$modal.msgError('请到模型配置菜单!');
}
proxy.$tab.closePage(proxy.$route);
proxy.$router.push({
path: routerJumpVo.formPath,
query: {
id: routerJumpVo.businessId,
type: routerJumpVo.type,
taskId: routerJumpVo.taskId
}
});
}
};

View File

@ -1,16 +1,13 @@
import { NodeConfigVO } from '@/api/workflow/nodeConfig/types';
import { DefinitionConfigVO } from '@/api/workflow/definitionConfig/types';
export interface RouterJumpVo {
wfNodeConfigVo: NodeConfigVO;
wfDefinitionConfigVo: DefinitionConfigVO;
businessKey: string;
taskId: string;
businessId: string;
taskId: string | number;
type: string;
formCustom: string;
formPath: string;
}
export interface StartProcessBo {
businessKey: string | number;
tableName: string;
businessId: string | number;
flowCode: string;
variables: any;
}