add 添加表单配置
This commit is contained in:
parent
5dfc25a493
commit
2ea1807f34
38
src/api/workflow/definitionConfig/index.ts
Normal file
38
src/api/workflow/definitionConfig/index.ts
Normal 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'
|
||||||
|
});
|
||||||
|
};
|
@ -1,13 +1,15 @@
|
|||||||
export interface FormDefinitionVO {
|
import { FormManageVO } from '@/api/workflow/formManage/types';
|
||||||
|
|
||||||
|
export interface DefinitionConfigVO {
|
||||||
/**
|
/**
|
||||||
* 主键
|
* 主键
|
||||||
*/
|
*/
|
||||||
id: string | number;
|
id: string | number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 路由地址
|
* 表单ID
|
||||||
*/
|
*/
|
||||||
path: string;
|
formId?: string | number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 流程定义ID
|
* 流程定义ID
|
||||||
@ -24,18 +26,23 @@ export interface FormDefinitionVO {
|
|||||||
*/
|
*/
|
||||||
remark: string;
|
remark: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 表单管理
|
||||||
|
*/
|
||||||
|
wfFormManageVo: FormManageVO;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface FormDefinitionForm extends BaseEntity {
|
export interface DefinitionConfigForm extends BaseEntity {
|
||||||
/**
|
/**
|
||||||
* 主键
|
* 主键
|
||||||
*/
|
*/
|
||||||
id?: string | number;
|
id?: string | number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 路由地址
|
* 表单ID
|
||||||
*/
|
*/
|
||||||
path?: string;
|
formId?: string | number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 流程定义ID
|
* 流程定义ID
|
||||||
@ -52,14 +59,20 @@ export interface FormDefinitionForm extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
remark?: string;
|
remark?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 表单管理
|
||||||
|
*/
|
||||||
|
wfFormManageVo: FormManageVO;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface FormDefinitionQuery extends PageQuery {
|
export interface DefinitionConfigQuery extends PageQuery {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 路由地址
|
* 表单ID
|
||||||
*/
|
*/
|
||||||
path?: string;
|
formId?: string | number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 流程定义ID
|
* 流程定义ID
|
||||||
@ -72,9 +85,10 @@ export interface FormDefinitionQuery extends PageQuery {
|
|||||||
processKey?: string;
|
processKey?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 日期范围参数
|
* 表单管理
|
||||||
*/
|
*/
|
||||||
params?: any;
|
wfFormManageVo: FormManageVO;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -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'
|
|
||||||
});
|
|
||||||
};
|
|
76
src/api/workflow/formManage/index.ts
Normal file
76
src/api/workflow/formManage/index.ts
Normal 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'
|
||||||
|
});
|
||||||
|
};
|
75
src/api/workflow/formManage/types.ts
Normal file
75
src/api/workflow/formManage/types.ts
Normal 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
63
src/api/workflow/nodeConfig/index.ts
Normal file
63
src/api/workflow/nodeConfig/index.ts
Normal 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'
|
||||||
|
});
|
||||||
|
};
|
43
src/api/workflow/nodeConfig/types.ts
Normal file
43
src/api/workflow/nodeConfig/types.ts
Normal 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;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
|||||||
|
import { NodeConfigVO } from '@/api/workflow/nodeConfig/types';
|
||||||
|
import { DefinitionConfigVO } from '@/api/workflow/definitionConfig/types';
|
||||||
export interface TaskQuery extends PageQuery {
|
export interface TaskQuery extends PageQuery {
|
||||||
name?: string;
|
name?: string;
|
||||||
processDefinitionKey?: string;
|
processDefinitionKey?: string;
|
||||||
@ -37,8 +39,8 @@ export interface TaskVO extends BaseEntity {
|
|||||||
participantVo: ParticipantVo;
|
participantVo: ParticipantVo;
|
||||||
multiInstance: boolean;
|
multiInstance: boolean;
|
||||||
businessKey: string;
|
businessKey: string;
|
||||||
formKey: string;
|
wfNodeConfigVo: NodeConfigVO;
|
||||||
wfFormDefinitionVo: any;
|
wfDefinitionConfigVo: DefinitionConfigVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariableVo {
|
export interface VariableVo {
|
||||||
|
49
src/api/workflow/workflowCommon/index.ts
Normal file
49
src/api/workflow/workflowCommon/index.ts
Normal 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('请到流程定义菜单配置路由!');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
10
src/api/workflow/workflowCommon/types.ts
Normal file
10
src/api/workflow/workflowCommon/types.ts
Normal 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;
|
||||||
|
}
|
@ -21,8 +21,10 @@
|
|||||||
<el-form-item v-if="showConfig.skipExpression" prop="skipExpression" label="跳过表达式">
|
<el-form-item v-if="showConfig.skipExpression" prop="skipExpression" label="跳过表达式">
|
||||||
<el-input v-model="formData.skipExpression" @change="skipExpressionChange"> </el-input>
|
<el-input v-model="formData.skipExpression" @change="skipExpressionChange"> </el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="formKey" label="表单地址">
|
<el-form-item prop="formKey" label="表单地址" v-loading="formManageListLoading">
|
||||||
<el-input v-model="formData.formKey" @change="formKeyChange" placeholder="当前节点表单路由如:/demo/leaveEdit/index"> </el-input>
|
<el-select @change="formKeyChange" v-model="formData.formKey" clearable filterable placeholder="请选择表单" style="width: 260px" >
|
||||||
|
<el-option v-for="item in formManageList" :key="item.id" :label="item.formTypeName+':'+item.formName" :value="item.formType+':'+item.id" />
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
</el-collapse-item>
|
</el-collapse-item>
|
||||||
@ -239,9 +241,10 @@ import { TaskPanel } from 'bpmnDesign';
|
|||||||
import { AllocationTypeEnum, MultiInstanceTypeEnum, SpecifyDescEnum } from '@/enums/bpmn/IndexEnums';
|
import { AllocationTypeEnum, MultiInstanceTypeEnum, SpecifyDescEnum } from '@/enums/bpmn/IndexEnums';
|
||||||
import { UserVO } from '@/api/system/user/types';
|
import { UserVO } from '@/api/system/user/types';
|
||||||
import { RoleVO } from '@/api/system/role/types';
|
import { RoleVO } from '@/api/system/role/types';
|
||||||
|
import { selectListFormManage } from '@/api/workflow/formManage';
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
import { FormManageVO } from '@/api/workflow/formManage/types';
|
||||||
|
const formManageList = ref<FormManageVO[]>([]);
|
||||||
|
const formManageListLoading = ref(false);
|
||||||
interface PropType {
|
interface PropType {
|
||||||
element: ModdleElement;
|
element: ModdleElement;
|
||||||
}
|
}
|
||||||
@ -459,6 +462,18 @@ const SpecifyDesc = [
|
|||||||
{ id: 'fa253b34-4335-458c-b1bc-b039e2a2b7a6', label: '指定一个人', value: 'specifySingle' },
|
{ id: 'fa253b34-4335-458c-b1bc-b039e2a2b7a6', label: '指定一个人', value: 'specifySingle' },
|
||||||
{ id: '7365ff54-2e05-4312-9bfb-0b8edd779c5b', label: '指定多个人', value: 'specifyMultiple' }
|
{ id: '7365ff54-2e05-4312-9bfb-0b8edd779c5b', label: '指定多个人', value: 'specifyMultiple' }
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const listFormManage = async () => {
|
||||||
|
formManageListLoading.value = true
|
||||||
|
const res = await selectListFormManage();
|
||||||
|
formManageList.value = res.data;
|
||||||
|
formManageListLoading.value = false
|
||||||
|
}
|
||||||
|
onMounted(() => {
|
||||||
|
nextTick(() => {
|
||||||
|
listFormManage();
|
||||||
|
});
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style lang="scss" scoped></style>
|
||||||
|
249
src/views/workflow/formManage/index.vue
Normal file
249
src/views/workflow/formManage/index.vue
Normal file
@ -0,0 +1,249 @@
|
|||||||
|
<template>
|
||||||
|
<div class="p-2">
|
||||||
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
|
<div class="search" v-show="showSearch">
|
||||||
|
<el-form :model="queryParams" ref="queryFormRef" :inline="true" label-width="68px">
|
||||||
|
<el-form-item label="表单名称" prop="formName">
|
||||||
|
<el-input v-model="queryParams.formName" placeholder="请输入表单名称" clearable style="width: 240px" @keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</transition>
|
||||||
|
|
||||||
|
<el-card shadow="never">
|
||||||
|
<template #header>
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['workflow:formManage:add']">新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['workflow:formManage:edit']">修改</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['workflow:formManage:remove']">删除</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['workflow:formManage:export']">导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="formManageList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="表单名称" align="center" prop="formName" />
|
||||||
|
<el-table-column label="表单类型" align="center">
|
||||||
|
<template #default="scope">
|
||||||
|
<dict-tag :options="wf_form_type" :value="scope.row.formType"></dict-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="地址" align="center" prop="router" />
|
||||||
|
<el-table-column label="备注" align="center" prop="remork" />
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tooltip content="修改" placement="top">
|
||||||
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['workflow:formManage:edit']"></el-button>
|
||||||
|
</el-tooltip>
|
||||||
|
<el-tooltip content="删除" placement="top">
|
||||||
|
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['workflow:formManage:remove']"></el-button>
|
||||||
|
</el-tooltip>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
v-model:page="queryParams.pageNum"
|
||||||
|
v-model:limit="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</el-card>
|
||||||
|
<!-- 添加或修改表单管理对话框 -->
|
||||||
|
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||||
|
<el-form ref="formManageFormRef" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="表单名称" prop="formName">
|
||||||
|
<el-input v-model="form.formName" placeholder="请输入表单名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="表单类型" prop="formType">
|
||||||
|
<el-radio-group v-model="form.formType" @change="form.router = ''">
|
||||||
|
<el-radio border v-for="dict in wf_form_type" :key="dict.value" :label="dict.value">{{ dict.label }}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="路由地址" prop="router" v-if="form.formType === 'static'">
|
||||||
|
<el-input v-model="form.router" placeholder="请输入路由地址" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="表单" prop="router" v-else>
|
||||||
|
<el-input v-model="form.router" disabled placeholder="请选择表单" >
|
||||||
|
<template #append>
|
||||||
|
<el-button icon="Search" />
|
||||||
|
</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="remork">
|
||||||
|
<el-input v-model="form.remork" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup name="FormManage" lang="ts">
|
||||||
|
import { listFormManage, getFormManage, delFormManage, addFormManage, updateFormManage } from '@/api/workflow/formManage';
|
||||||
|
import { FormManageVO, FormManageQuery, FormManageForm } from '@/api/workflow/formManage/types';
|
||||||
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
const { wf_form_type } = toRefs<any>(proxy?.useDict('wf_form_type'));
|
||||||
|
|
||||||
|
const formManageList = ref<FormManageVO[]>([]);
|
||||||
|
const buttonLoading = ref(false);
|
||||||
|
const loading = ref(true);
|
||||||
|
const showSearch = ref(true);
|
||||||
|
const ids = ref<Array<string | number>>([]);
|
||||||
|
const single = ref(true);
|
||||||
|
const multiple = ref(true);
|
||||||
|
const total = ref(0);
|
||||||
|
|
||||||
|
const queryFormRef = ref<ElFormInstance>();
|
||||||
|
const formManageFormRef = ref<ElFormInstance>();
|
||||||
|
|
||||||
|
const dialog = reactive<DialogOption>({
|
||||||
|
visible: false,
|
||||||
|
title: ''
|
||||||
|
});
|
||||||
|
|
||||||
|
const initFormData: FormManageForm = {
|
||||||
|
id: undefined,
|
||||||
|
formName: undefined,
|
||||||
|
formType: 'static',
|
||||||
|
remork: undefined,
|
||||||
|
}
|
||||||
|
const data = reactive<PageData<FormManageForm, FormManageQuery>>({
|
||||||
|
form: {...initFormData},
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
formName: undefined,
|
||||||
|
formType: undefined
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
id: [
|
||||||
|
{ required: true, message: "主键不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
formName: [
|
||||||
|
{ required: true, message: "表单名称不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
formType: [
|
||||||
|
{ required: true, message: "表单类型不能为空", trigger: "change" }
|
||||||
|
],
|
||||||
|
router: [
|
||||||
|
{ required: true, message: "不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const { queryParams, form, rules } = toRefs(data);
|
||||||
|
|
||||||
|
/** 查询表单管理列表 */
|
||||||
|
const getList = async () => {
|
||||||
|
loading.value = true;
|
||||||
|
const res = await listFormManage(queryParams.value);
|
||||||
|
formManageList.value = res.rows;
|
||||||
|
total.value = res.total;
|
||||||
|
loading.value = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 取消按钮 */
|
||||||
|
const cancel = () => {
|
||||||
|
reset();
|
||||||
|
dialog.visible = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 表单重置 */
|
||||||
|
const reset = () => {
|
||||||
|
form.value = {...initFormData};
|
||||||
|
formManageFormRef.value?.resetFields();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
const handleQuery = () => {
|
||||||
|
queryParams.value.pageNum = 1;
|
||||||
|
getList();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
const resetQuery = () => {
|
||||||
|
queryFormRef.value?.resetFields();
|
||||||
|
handleQuery();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 多选框选中数据 */
|
||||||
|
const handleSelectionChange = (selection: FormManageVO[]) => {
|
||||||
|
ids.value = selection.map(item => item.id);
|
||||||
|
single.value = selection.length != 1;
|
||||||
|
multiple.value = !selection.length;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
const handleAdd = () => {
|
||||||
|
reset();
|
||||||
|
dialog.visible = true;
|
||||||
|
dialog.title = "添加表单管理";
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
const handleUpdate = async (row?: FormManageVO) => {
|
||||||
|
reset();
|
||||||
|
const _id = row?.id || ids.value[0]
|
||||||
|
const res = await getFormManage(_id);
|
||||||
|
Object.assign(form.value, res.data);
|
||||||
|
dialog.visible = true;
|
||||||
|
dialog.title = "修改表单管理";
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 提交按钮 */
|
||||||
|
const submitForm = () => {
|
||||||
|
formManageFormRef.value?.validate(async (valid: boolean) => {
|
||||||
|
if (valid) {
|
||||||
|
buttonLoading.value = true;
|
||||||
|
if (form.value.id) {
|
||||||
|
await updateFormManage(form.value).finally(() => buttonLoading.value = false);
|
||||||
|
} else {
|
||||||
|
await addFormManage(form.value).finally(() => buttonLoading.value = false);
|
||||||
|
}
|
||||||
|
proxy?.$modal.msgSuccess("操作成功");
|
||||||
|
dialog.visible = false;
|
||||||
|
await getList();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
const handleDelete = async (row?: FormManageVO) => {
|
||||||
|
const _ids = row?.id || ids.value;
|
||||||
|
await proxy?.$modal.confirm('是否确认删除表单管理编号为"' + _ids + '"的数据项?').finally(() => loading.value = false);
|
||||||
|
await delFormManage(_ids);
|
||||||
|
proxy?.$modal.msgSuccess("删除成功");
|
||||||
|
await getList();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
const handleExport = () => {
|
||||||
|
proxy?.download('workflow/formManage/export', {
|
||||||
|
...queryParams.value
|
||||||
|
}, `formManage_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
</script>
|
@ -221,15 +221,17 @@
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 表单配置 -->
|
<!-- 表单配置 -->
|
||||||
<el-dialog v-model="formDialog.visible" :title="formDialog.title" width="650px" append-to-body :close-on-click-modal="false">
|
<el-dialog v-model="formDialog.visible" :title="formDialog.title" width="650px" append-to-body :close-on-click-modal="false">
|
||||||
<el-form :model="formDefinitionForm" label-width="auto">
|
<el-form :model="definitionConfigForm" label-width="auto">
|
||||||
<el-form-item label="流程KEY">
|
<el-form-item label="流程KEY">
|
||||||
<el-input v-model="formDefinitionForm.processKey" disabled/>
|
<el-input v-model="definitionConfigForm.processKey" disabled/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="路由地址">
|
<el-form-item label="表单" prop="formId">
|
||||||
<el-input v-model="formDefinitionForm.path" placeholder="请假示例路由请填写:/demo/leaveEdit/index"/>
|
<el-select v-model="definitionConfigForm.formId" clearable filterable placeholder="请选择表单" style="width: 260px" >
|
||||||
|
<el-option v-for="item in formManageList" :key="item.id" :label="item.formTypeName+':'+item.formName" :value="item.id" />
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="备注">
|
<el-form-item label="备注">
|
||||||
<el-input v-model="formDefinitionForm.remark" type="textarea" resize="none"/>
|
<el-input v-model="definitionConfigForm.remark" type="textarea" resize="none"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
@ -258,12 +260,15 @@ import {
|
|||||||
} from '@/api/workflow/processDefinition';
|
} from '@/api/workflow/processDefinition';
|
||||||
import ProcessPreview from './components/processPreview.vue';
|
import ProcessPreview from './components/processPreview.vue';
|
||||||
import { listCategory } from '@/api/workflow/category';
|
import { listCategory } from '@/api/workflow/category';
|
||||||
import { getByDefId,saveOrUpdate } from '@/api/workflow/formDefinition';
|
import { getByDefId,saveOrUpdate } from '@/api/workflow/definitionConfig';
|
||||||
import { CategoryVO } from '@/api/workflow/category/types';
|
import { CategoryVO } from '@/api/workflow/category/types';
|
||||||
import { ProcessDefinitionQuery, ProcessDefinitionVO } from '@/api/workflow/processDefinition/types';
|
import { ProcessDefinitionQuery, ProcessDefinitionVO } from '@/api/workflow/processDefinition/types';
|
||||||
import { FormDefinitionForm } from '@/api/workflow/formDefinition/types';
|
import { definitionConfigForm } from '@/api/workflow/definitionConfig/types';
|
||||||
import { UploadRequestOptions } from 'element-plus';
|
import { UploadRequestOptions } from 'element-plus';
|
||||||
|
import { FormManageVO } from '@/api/workflow/formManage/types';
|
||||||
|
import { selectListFormManage } from '@/api/workflow/formManage';
|
||||||
|
|
||||||
|
const formManageList = ref<FormManageVO[]>([]);
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
|
||||||
const previewRef = ref<InstanceType<typeof ProcessPreview>>();
|
const previewRef = ref<InstanceType<typeof ProcessPreview>>();
|
||||||
@ -290,7 +295,7 @@ const categoryOptions = ref<CategoryOption[]>([]);
|
|||||||
const categoryName = ref('');
|
const categoryName = ref('');
|
||||||
/** 部署文件分类选择 */
|
/** 部署文件分类选择 */
|
||||||
const selectCategory = ref();
|
const selectCategory = ref();
|
||||||
const formDefinitionForm = ref<FormDefinitionForm>({});
|
const definitionConfigForm = ref<definitionConfigForm>({});
|
||||||
|
|
||||||
const uploadDialog = reactive<DialogOption>({
|
const uploadDialog = reactive<DialogOption>({
|
||||||
visible: false,
|
visible: false,
|
||||||
@ -473,21 +478,22 @@ const handerDeployProcessFile = (data: UploadRequestOptions): XMLHttpRequest =>
|
|||||||
};
|
};
|
||||||
//打开表单配置
|
//打开表单配置
|
||||||
const handleFormOpen = async (row: ProcessDefinitionVO) => {
|
const handleFormOpen = async (row: ProcessDefinitionVO) => {
|
||||||
|
listFormManage()
|
||||||
formDialog.visible = true
|
formDialog.visible = true
|
||||||
formDefinitionForm.value.processKey = row.key
|
definitionConfigForm.value.processKey = row.key
|
||||||
formDefinitionForm.value.definitionId = row.id
|
definitionConfigForm.value.definitionId = row.id
|
||||||
const resp = await getByDefId(row.id)
|
const resp = await getByDefId(row.id)
|
||||||
if(resp.data){
|
if(resp.data){
|
||||||
formDefinitionForm.value = resp.data
|
definitionConfigForm.value = resp.data
|
||||||
}else{
|
}else{
|
||||||
formDefinitionForm.value.path = undefined
|
definitionConfigForm.value.formId = undefined
|
||||||
formDefinitionForm.value.remark = undefined
|
definitionConfigForm.value.remark = undefined
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//保存表单
|
//保存表单
|
||||||
const handlerSaveForm = async () => {
|
const handlerSaveForm = async () => {
|
||||||
await proxy?.$modal.confirm('是否确认保存?');
|
await proxy?.$modal.confirm('是否确认保存?');
|
||||||
saveOrUpdate(formDefinitionForm.value).then(resp=>{
|
saveOrUpdate(definitionConfigForm.value).then(resp=>{
|
||||||
if(resp.code === 200){
|
if(resp.code === 200){
|
||||||
proxy?.$modal.msgSuccess('操作成功');
|
proxy?.$modal.msgSuccess('操作成功');
|
||||||
formDialog.visible = false
|
formDialog.visible = false
|
||||||
@ -495,4 +501,9 @@ const handlerSaveForm = async () => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//表单列表
|
||||||
|
const listFormManage = async () => {
|
||||||
|
const res = await selectListFormManage();
|
||||||
|
formManageList.value = res.data;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -161,6 +161,8 @@ import { getListByKey, migrationDefinition } from '@/api/workflow/processDefinit
|
|||||||
import { listCategory } from '@/api/workflow/category';
|
import { listCategory } from '@/api/workflow/category';
|
||||||
import { CategoryVO } from '@/api/workflow/category/types';
|
import { CategoryVO } from '@/api/workflow/category/types';
|
||||||
import { ProcessInstanceQuery, ProcessInstanceVO } from '@/api/workflow/processInstance/types';
|
import { ProcessInstanceQuery, ProcessInstanceVO } from '@/api/workflow/processInstance/types';
|
||||||
|
import workflowCommon from '@/api/workflow/workflowCommon';
|
||||||
|
import { RouterJumpVo } from '@/api/workflow/workflowCommon/types';
|
||||||
//审批记录组件
|
//审批记录组件
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const queryFormRef = ref<ElFormInstance>();
|
const queryFormRef = ref<ElFormInstance>();
|
||||||
@ -347,18 +349,14 @@ const handleChange = async (id: string) => {
|
|||||||
};
|
};
|
||||||
/** 查看按钮操作 */
|
/** 查看按钮操作 */
|
||||||
const handleView = (row) => {
|
const handleView = (row) => {
|
||||||
if(row.wfFormDefinitionVo){
|
const routerJumpVo = reactive<RouterJumpVo>({
|
||||||
proxy.$tab.closePage(proxy.$route);
|
wfDefinitionConfigVo: row.wfDefinitionConfigVo,
|
||||||
proxy.$router.push({
|
wfNodeConfigVo: row.wfNodeConfigVo,
|
||||||
path: `${row.wfFormDefinitionVo.path}`,
|
businessKey: row.businessKey,
|
||||||
query: {
|
taskId: row.id,
|
||||||
id: row.businessKey,
|
|
||||||
type: 'view'
|
type: 'view'
|
||||||
}
|
});
|
||||||
})
|
workflowCommon.routerJump(routerJumpVo,proxy)
|
||||||
}else{
|
|
||||||
proxy?.$modal.msgError('请到流程定义菜单配置路由!');
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
@ -54,13 +54,13 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<el-tag type="success">
|
<el-tag type="success">
|
||||||
{{ scope.row.assigneeName }}
|
{{ scope.row.assigneeName || '无'}}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="tab === 'finish'" #default="scope">
|
<template v-else-if="tab === 'finish'" #default="scope">
|
||||||
<el-tag type="success">
|
<el-tag type="success">
|
||||||
{{ scope.row.assigneeName }}
|
{{ scope.row.assigneeName || '无'}}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -129,6 +129,8 @@ import { getPageByAllTaskWait, getPageByAllTaskFinish, updateAssignee, getInstan
|
|||||||
import MultiInstanceUser from '@/components/Process/multiInstanceUser.vue';
|
import MultiInstanceUser from '@/components/Process/multiInstanceUser.vue';
|
||||||
import UserSelect from '@/components/UserSelect';
|
import UserSelect from '@/components/UserSelect';
|
||||||
import { TaskQuery, TaskVO, VariableVo } from '@/api/workflow/task/types';
|
import { TaskQuery, TaskVO, VariableVo } from '@/api/workflow/task/types';
|
||||||
|
import workflowCommon from '@/api/workflow/workflowCommon';
|
||||||
|
import { RouterJumpVo } from '@/api/workflow/workflowCommon/types';
|
||||||
//审批记录组件
|
//审批记录组件
|
||||||
//加签组件
|
//加签组件
|
||||||
const multiInstanceUserRef = ref<InstanceType<typeof MultiInstanceUser>>();
|
const multiInstanceUserRef = ref<InstanceType<typeof MultiInstanceUser>>();
|
||||||
@ -260,18 +262,14 @@ const handleInstanceVariable = async (row: TaskVO) => {
|
|||||||
};
|
};
|
||||||
/** 查看按钮操作 */
|
/** 查看按钮操作 */
|
||||||
const handleView = (row) => {
|
const handleView = (row) => {
|
||||||
if(row.wfFormDefinitionVo){
|
const routerJumpVo = reactive<RouterJumpVo>({
|
||||||
proxy.$tab.closePage(proxy.$route);
|
wfDefinitionConfigVo: row.wfDefinitionConfigVo,
|
||||||
proxy.$router.push({
|
wfNodeConfigVo: row.wfNodeConfigVo,
|
||||||
path: `${row.wfFormDefinitionVo.path}`,
|
businessKey: row.businessKey,
|
||||||
query: {
|
taskId: row.id,
|
||||||
id: row.businessKey,
|
|
||||||
type: 'view'
|
type: 'view'
|
||||||
}
|
});
|
||||||
})
|
workflowCommon.routerJump(routerJumpVo,proxy)
|
||||||
}else{
|
|
||||||
proxy?.$modal.msgError('请到流程定义菜单配置路由!');
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getWaitingList();
|
getWaitingList();
|
||||||
|
@ -117,6 +117,8 @@ import { getPageByCurrent, deleteRunAndHisInstance, cancelProcessApply } from '@
|
|||||||
import { listCategory } from '@/api/workflow/category';
|
import { listCategory } from '@/api/workflow/category';
|
||||||
import { CategoryVO } from '@/api/workflow/category/types';
|
import { CategoryVO } from '@/api/workflow/category/types';
|
||||||
import { ProcessInstanceQuery, ProcessInstanceVO } from '@/api/workflow/processInstance/types';
|
import { ProcessInstanceQuery, ProcessInstanceVO } from '@/api/workflow/processInstance/types';
|
||||||
|
import workflowCommon from '@/api/workflow/workflowCommon';
|
||||||
|
import { RouterJumpVo } from '@/api/workflow/workflowCommon/types';
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const queryFormRef = ref<ElFormInstance>();
|
const queryFormRef = ref<ElFormInstance>();
|
||||||
const categoryTreeRef = ref<ElTreeInstance>();
|
const categoryTreeRef = ref<ElTreeInstance>();
|
||||||
@ -250,17 +252,13 @@ const handleCancelProcessApply = async (processInstanceId: string) => {
|
|||||||
|
|
||||||
//办理
|
//办理
|
||||||
const handleOpen = async (row,type) => {
|
const handleOpen = async (row,type) => {
|
||||||
if(row.wfFormDefinitionVo){
|
const routerJumpVo = reactive<RouterJumpVo>({
|
||||||
proxy.$tab.closePage(proxy.$route);
|
wfDefinitionConfigVo: row.wfDefinitionConfigVo,
|
||||||
proxy.$router.push({
|
wfNodeConfigVo: row.wfNodeConfigVo,
|
||||||
path: `${row.wfFormDefinitionVo.path}`,
|
businessKey: row.businessKey,
|
||||||
query: {
|
taskId: row.id,
|
||||||
id: row.businessKey,
|
|
||||||
type: type
|
type: type
|
||||||
}
|
});
|
||||||
})
|
workflowCommon.routerJump(routerJumpVo,proxy)
|
||||||
}else{
|
|
||||||
proxy?.$modal.msgError('请到流程定义菜单配置路由!');
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<el-tag type="success">
|
<el-tag type="success">
|
||||||
{{ scope.row.assigneeName }}
|
{{ scope.row.assigneeName || '无'}}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
@ -73,6 +73,8 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { getPageByTaskCopy} from '@/api/workflow/task';
|
import { getPageByTaskCopy} from '@/api/workflow/task';
|
||||||
import { TaskQuery } from '@/api/workflow/task/types';
|
import { TaskQuery } from '@/api/workflow/task/types';
|
||||||
|
import workflowCommon from '@/api/workflow/workflowCommon';
|
||||||
|
import { RouterJumpVo } from '@/api/workflow/workflowCommon/types';
|
||||||
//审批记录组件
|
//审批记录组件
|
||||||
const queryFormRef = ref<ElFormInstance>();
|
const queryFormRef = ref<ElFormInstance>();
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
@ -127,18 +129,14 @@ const getTaskCopyList = () => {
|
|||||||
|
|
||||||
/** 查看按钮操作 */
|
/** 查看按钮操作 */
|
||||||
const handleView = (row) => {
|
const handleView = (row) => {
|
||||||
if(row.wfFormDefinitionVo){
|
const routerJumpVo = reactive<RouterJumpVo>({
|
||||||
proxy.$tab.closePage(proxy.$route);
|
wfDefinitionConfigVo: row.wfDefinitionConfigVo,
|
||||||
proxy.$router.push({
|
wfNodeConfigVo: row.wfNodeConfigVo,
|
||||||
path: `${row.wfFormDefinitionVo.path}`,
|
businessKey: row.businessKey,
|
||||||
query: {
|
taskId: row.id,
|
||||||
id: row.businessKey,
|
|
||||||
type: 'view'
|
type: 'view'
|
||||||
}
|
});
|
||||||
})
|
workflowCommon.routerJump(routerJumpVo,proxy)
|
||||||
}else{
|
|
||||||
proxy?.$modal.msgError('请到流程定义菜单配置路由!');
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
<el-table-column fixed align="center" prop="assigneeName" label="办理人">
|
<el-table-column fixed align="center" prop="assigneeName" label="办理人">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag type="success">
|
<el-tag type="success">
|
||||||
{{ scope.row.assigneeName }}
|
{{ scope.row.assigneeName || '无'}}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -62,6 +62,8 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { getPageByTaskFinish } from '@/api/workflow/task';
|
import { getPageByTaskFinish } from '@/api/workflow/task';
|
||||||
import { TaskQuery, TaskVO } from '@/api/workflow/task/types';
|
import { TaskQuery, TaskVO } from '@/api/workflow/task/types';
|
||||||
|
import workflowCommon from '@/api/workflow/workflowCommon';
|
||||||
|
import { RouterJumpVo } from '@/api/workflow/workflowCommon/types';
|
||||||
//审批记录组件
|
//审批记录组件
|
||||||
const queryFormRef = ref<ElFormInstance>();
|
const queryFormRef = ref<ElFormInstance>();
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
@ -113,19 +115,15 @@ const getFinishList = () => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
/** 查看按钮操作 */
|
/** 查看按钮操作 */
|
||||||
const handleView = (row) => {
|
const handleView = (row: TaskVO) => {
|
||||||
if(row.wfFormDefinitionVo){
|
const routerJumpVo = reactive<RouterJumpVo>({
|
||||||
proxy.$tab.closePage(proxy.$route);
|
wfDefinitionConfigVo: row.wfDefinitionConfigVo,
|
||||||
proxy.$router.push({
|
wfNodeConfigVo: row.wfNodeConfigVo,
|
||||||
path: `${row.wfFormDefinitionVo.path}`,
|
businessKey: row.businessKey,
|
||||||
query: {
|
taskId: row.id,
|
||||||
id: row.businessKey,
|
|
||||||
type: 'view'
|
type: 'view'
|
||||||
}
|
});
|
||||||
})
|
workflowCommon.routerJump(routerJumpVo,proxy)
|
||||||
}else{
|
|
||||||
proxy?.$modal.msgError('请到流程定义菜单配置路由!');
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<el-tag type="success">
|
<el-tag type="success">
|
||||||
{{ scope.row.assigneeName }}
|
{{ scope.row.assigneeName || '无' }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
@ -79,6 +79,9 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { getPageByTaskWait, claim, returnTask } from '@/api/workflow/task';
|
import { getPageByTaskWait, claim, returnTask } from '@/api/workflow/task';
|
||||||
import { TaskQuery, TaskVO } from '@/api/workflow/task/types';
|
import { TaskQuery, TaskVO } from '@/api/workflow/task/types';
|
||||||
|
import workflowCommon from '@/api/workflow/workflowCommon';
|
||||||
|
import { RouterJumpVo } from '@/api/workflow/workflowCommon/types';
|
||||||
|
|
||||||
//提交组件
|
//提交组件
|
||||||
const queryFormRef = ref<ElFormInstance>();
|
const queryFormRef = ref<ElFormInstance>();
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
@ -135,29 +138,14 @@ const getWaitingList = () => {
|
|||||||
};
|
};
|
||||||
//办理
|
//办理
|
||||||
const handleOpen = async (row: TaskVO) => {
|
const handleOpen = async (row: TaskVO) => {
|
||||||
if (row.formKey != null) {
|
const routerJumpVo = reactive<RouterJumpVo>({
|
||||||
proxy.$tab.closePage(proxy.$route);
|
wfDefinitionConfigVo: row.wfDefinitionConfigVo,
|
||||||
proxy.$router.push({
|
wfNodeConfigVo: row.wfNodeConfigVo,
|
||||||
path: `${row.formKey}`,
|
businessKey: row.businessKey,
|
||||||
query: {
|
taskId: row.id,
|
||||||
id: row.businessKey,
|
type: 'approval'
|
||||||
type: 'approval',
|
|
||||||
taskId: row.id
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
} else if (row.wfFormDefinitionVo) {
|
workflowCommon.routerJump(routerJumpVo,proxy)
|
||||||
proxy.$tab.closePage(proxy.$route);
|
|
||||||
proxy.$router.push({
|
|
||||||
path: `${row.wfFormDefinitionVo.path}`,
|
|
||||||
query: {
|
|
||||||
id: row.businessKey,
|
|
||||||
type: 'approval',
|
|
||||||
taskId: row.id
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
proxy?.$modal.msgError('请到流程定义菜单配置路由!');
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 认领任务 */
|
/** 认领任务 */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user