add 添加表单配置

This commit is contained in:
gssong
2024-03-31 15:34:54 +08:00
parent 5dfc25a493
commit 2ea1807f34
19 changed files with 744 additions and 159 deletions

View File

@ -0,0 +1,38 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { DefinitionConfigVO, DefinitionConfigForm } from '@/api/workflow/definitionConfig/types';
/**
* 查询表单配置详细
* @param id
*/
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'
});
};

View File

@ -1,13 +1,15 @@
export interface FormDefinitionVO {
import { FormManageVO } from '@/api/workflow/formManage/types';
export interface DefinitionConfigVO {
/**
*
*/
id: string | number;
/**
*
* ID
*/
path: string;
formId?: string | number;
/**
* ID
@ -24,18 +26,23 @@ export interface FormDefinitionVO {
*/
remark: string;
/**
*
*/
wfFormManageVo: FormManageVO;
}
export interface FormDefinitionForm extends BaseEntity {
export interface DefinitionConfigForm extends BaseEntity {
/**
*
*/
id?: string | number;
/**
*
* ID
*/
path?: string;
formId?: string | number;
/**
* ID
@ -52,14 +59,20 @@ export interface FormDefinitionForm extends BaseEntity {
*/
remark?: string;
/**
*
*/
wfFormManageVo: FormManageVO;
}
export interface FormDefinitionQuery extends PageQuery {
export interface DefinitionConfigQuery extends PageQuery {
/**
*
* ID
*/
path?: string;
formId?: string | number;
/**
* ID
@ -72,9 +85,10 @@ export interface FormDefinitionQuery extends PageQuery {
processKey?: string;
/**
*
*
*/
params?: any;
wfFormManageVo: FormManageVO;
}

View File

@ -1,38 +0,0 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { FormDefinitionVO, FormDefinitionForm, FormDefinitionQuery } from '@/api/workflow/formDefinition/types';
/**
* 查询表单配置详细
* @param id
*/
export const getByDefId = (definitionId: string | number): AxiosPromise<FormDefinitionVO> => {
return request({
url: '/workflow/formDefinition/getByDefId/' + definitionId,
method: 'get'
});
};
/**
* 新增表单配置
* @param data
*/
export const saveOrUpdate = (data: FormDefinitionForm) => {
return request({
url: '/workflow/formDefinition/saveOrUpdate',
method: 'post',
data: data
});
};
/**
* 删除表单配置
* @param id
*/
export const delFormDefinition = (id: string | number | Array<string | number>) => {
return request({
url: '/workflow/formDefinition/' + id,
method: 'delete'
});
};

View File

@ -0,0 +1,76 @@
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

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

View File

@ -0,0 +1,63 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { NodeConfigVO, NodeConfigForm, NodeConfigQuery } from '@/api/workflow/nodeConfig/types';
/**
* 查询节点配置列表
* @param query
* @returns {*}
*/
export const listNodeConfig = (query?: NodeConfigQuery): AxiosPromise<NodeConfigVO[]> => {
return request({
url: '/workflow/nodeConfig/list',
method: 'get',
params: query
});
};
/**
* 查询节点配置详细
* @param id
*/
export const getNodeConfig = (id: string | number): AxiosPromise<NodeConfigVO> => {
return request({
url: '/workflow/nodeConfig/' + id,
method: 'get'
});
};
/**
* 新增节点配置
* @param data
*/
export const addNodeConfig = (data: NodeConfigForm) => {
return request({
url: '/workflow/nodeConfig',
method: 'post',
data: data
});
};
/**
* 修改节点配置
* @param data
*/
export const updateNodeConfig = (data: NodeConfigForm) => {
return request({
url: '/workflow/nodeConfig',
method: 'put',
data: data
});
};
/**
* 删除节点配置
* @param id
*/
export const delNodeConfig = (id: string | number | Array<string | number>) => {
return request({
url: '/workflow/nodeConfig/' + id,
method: 'delete'
});
};

View File

@ -0,0 +1,43 @@
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,3 +1,5 @@
import { NodeConfigVO } from '@/api/workflow/nodeConfig/types';
import { DefinitionConfigVO } from '@/api/workflow/definitionConfig/types';
export interface TaskQuery extends PageQuery {
name?: string;
processDefinitionKey?: string;
@ -37,8 +39,8 @@ export interface TaskVO extends BaseEntity {
participantVo: ParticipantVo;
multiInstance: boolean;
businessKey: string;
formKey: string;
wfFormDefinitionVo: any;
wfNodeConfigVo: NodeConfigVO;
wfDefinitionConfigVo: DefinitionConfigVO;
}
export interface VariableVo {

View File

@ -0,0 +1,49 @@
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 if (routerJumpVo.wfDefinitionConfigVo && routerJumpVo.wfDefinitionConfigVo.wfFormManageVo && routerJumpVo.wfDefinitionConfigVo.wfFormManageVo.formType === 'static') {
proxy.$tab.closePage(proxy.$route);
proxy.$router.push({
path: `${routerJumpVo.wfDefinitionConfigVo.wfFormManageVo.router}`,
query: {
id: routerJumpVo.businessKey,
type: routerJumpVo.type,
taskId: routerJumpVo.taskId
}
});
}else if (routerJumpVo.wfDefinitionConfigVo && routerJumpVo.wfDefinitionConfigVo.wfFormManageVo && routerJumpVo.wfDefinitionConfigVo.wfFormManageVo.formType === 'dynamic') {
proxy.$tab.closePage(proxy.$route);
proxy.$router.push({
path: `${routerJumpVo.wfDefinitionConfigVo.wfFormManageVo.router}`,
query: {
id: routerJumpVo.businessKey,
type: routerJumpVo.type,
taskId: routerJumpVo.taskId
}
});
} else {
proxy?.$modal.msgError('请到流程定义菜单配置路由!');
}
}
}

View File

@ -0,0 +1,10 @@
import { NodeConfigVO } from '@/api/workflow/nodeConfig/types';
import { DefinitionConfigVO } from '@/api/workflow/definitionConfig/types';
export interface RouterJumpVo {
wfDefinitionConfigVo: DefinitionConfigVO;
wfNodeConfigVo: NodeConfigVO;
businessKey: string;
taskId: string;
type: string;
}