fix: 修复指定人员接收任务时,人员选择页面未隐藏问题

approve-sys
tony 3 years ago
parent 0410ab897f
commit 8453a7cbb7

@ -13,6 +13,11 @@ public class ProcessConstants {
*/
public static final String DATA_TYPE = "dynamic";
/**
*
*/
public static final String FIXED = "fixed";
/**
*
*/

@ -882,6 +882,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
String dataType = userTask.getAttributeValue(ProcessConstants.NAMASPASE, ProcessConstants.PROCESS_CUSTOM_DATA_TYPE);
String userType = userTask.getAttributeValue(ProcessConstants.NAMASPASE, ProcessConstants.PROCESS_CUSTOM_USER_TYPE);
// 处理加载动态指定下一节点接收人员信息
if (ProcessConstants.DATA_TYPE.equals(dataType)) {
// 指定单个人员
if (ProcessConstants.USER_TYPE_ASSIGNEE.equals(userType)) {
@ -907,6 +908,8 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
flowNextDto.setType(ProcessConstants.USER_TYPE_ROUPS);
flowNextDto.setRoleList(sysRoles);
}
}else{
flowNextDto.setType(ProcessConstants.FIXED);
}
}
}

@ -70,7 +70,7 @@
<el-table v-loading="loading" fit :data="definitionList" border @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="流程编号" align="center" prop="deploymentId" :show-overflow-tooltip="true"/>
<el-table-column label="流程标识" align="center" prop="key" :show-overflow-tooltip="true" />
<el-table-column label="流程标识" align="center" prop="flowKey" :show-overflow-tooltip="true" />
<el-table-column label="流程分类" align="center" prop="category" />
<el-table-column label="流程名称" align="center" :show-overflow-tooltip="true">
<template slot-scope="scope">

@ -116,6 +116,21 @@
<!-- 发起流程 -->
<el-dialog :title="title" :visible.sync="open" width="60%" append-to-body>
<el-form :model="queryProcessParams" ref="queryProcessForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="名称" prop="name">
<el-input
v-model="queryProcessParams.name"
placeholder="请输入名称"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleProcessQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetProcessQuery"></el-button>
</el-form-item>
</el-form>
<el-table v-loading="processLoading" fit :data="definitionList" border >
<el-table-column label="流程名称" align="center" prop="name" />
<el-table-column label="流程版本" align="center">
@ -138,8 +153,8 @@
<pagination
v-show="processTotal>0"
:total="processTotal"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
:page.sync="queryProcessParams.pageNum"
:limit.sync="queryProcessParams.pageSize"
@pagination="listDefinition"
/>
</el-dialog>
@ -200,6 +215,20 @@ export default {
parentDeploymentId: null,
engineVersion: null
},
//
queryProcessParams: {
pageNum: 1,
pageSize: 10,
name: null,
category: null,
key: null,
tenantId: null,
deployTime: null,
derivedFrom: null,
derivedFromRoot: null,
parentDeploymentId: null,
engineVersion: null
},
//
form: {},
//
@ -251,6 +280,16 @@ export default {
this.resetForm("queryForm");
this.handleQuery();
},
/** 搜索按钮操作 */
handleProcessQuery() {
this.queryProcessParams.pageNum = 1;
this.listDefinition();
},
/** 重置按钮操作 */
resetProcessQuery() {
this.resetForm("queryProcessForm");
this.handleProcessQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
@ -264,7 +303,7 @@ export default {
this.listDefinition();
},
listDefinition(){
listDefinition(this.queryParams).then(response => {
listDefinition(this.queryProcessParams).then(response => {
this.definitionList = response.data.records;
this.processTotal = response.data.total;
this.processLoading = false;

@ -71,56 +71,58 @@
<!--审批正常流程-->
<el-dialog :title="completeTitle" :visible.sync="completeOpen" width="60%" append-to-body>
<el-row :gutter="20">
<!--部门数据-->
<el-col :span="4" :xs="24">
<h6>部门列表</h6>
<div class="head-container">
<el-input
v-model="deptName"
placeholder="请输入部门名称"
clearable
size="small"
prefix-icon="el-icon-search"
style="margin-bottom: 20px"
/>
</div>
<div class="head-container">
<el-tree
:data="deptOptions"
:props="defaultProps"
:expand-on-click-node="false"
:filter-node-method="filterNode"
ref="tree"
default-expand-all
@node-click="handleNodeClick"
/>
</div>
</el-col>
<el-col :span="12" :xs="24">
<h6>待选人员</h6>
<el-table
ref="singleTable"
:data="userList"
border
style="width: 100%"
@selection-change="handleSelectionChange">
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="用户名" align="center" prop="nickName" />
<el-table-column label="部门" align="center" prop="dept.deptName" />
</el-table>
</el-col>
<el-col :span="8" :xs="24">
<h6>已选人员</h6>
<el-tag
v-for="tag in userData"
:key="tag.nickName"
closable
@close="handleClose(tag)">
{{tag.nickName}} {{tag.dept.deptName}}
</el-tag>
</el-col>
</el-row>
<div v-if="checkSendUser">
<el-row :gutter="20">
<!--部门数据-->
<el-col :span="4" :xs="24">
<h6>部门列表</h6>
<div class="head-container">
<el-input
v-model="deptName"
placeholder="请输入部门名称"
clearable
size="small"
prefix-icon="el-icon-search"
style="margin-bottom: 20px"
/>
</div>
<div class="head-container">
<el-tree
:data="deptOptions"
:props="defaultProps"
:expand-on-click-node="false"
:filter-node-method="filterNode"
ref="tree"
default-expand-all
@node-click="handleNodeClick"
/>
</div>
</el-col>
<el-col :span="12" :xs="24">
<h6>待选人员</h6>
<el-table
ref="singleTable"
:data="userList"
border
style="width: 100%"
@selection-change="handleSelectionChange">
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="用户名" align="center" prop="nickName" />
<el-table-column label="部门" align="center" prop="dept.deptName" />
</el-table>
</el-col>
<el-col :span="8" :xs="24">
<h6>已选人员</h6>
<el-tag
v-for="tag in userData"
:key="tag.nickName"
closable
@close="handleClose(tag)">
{{tag.nickName}} {{tag.dept.deptName}}
</el-tag>
</el-col>
</el-row>
</div>
<span slot="footer" class="dialog-footer">
<el-input style="width: 50%;margin-right: 34%" type="textarea" v-model="taskForm.comment" placeholder="请输入处理意见"/>
<el-button @click="completeOpen = false"> </el-button>
@ -241,6 +243,7 @@ export default {
rejectOpen: false,
rejectTitle: null,
userData:[],
checkSendUser: false //
};
},
created() {
@ -396,23 +399,25 @@ export default {
getNextFlowNode(params).then(res => {
const data = res.data;
if (data) {
if (data.type === 'assignee') {
this.checkSendUser = true
if (data.type === 'assignee') { //
this.userDataList = res.data.userList;
} else if (data.type === 'candidateUsers') {
} else if (data.type === 'candidateUsers') { // ()
this.userDataList = res.data.userList;
this.taskForm.multiple = true;
} else if (data.type === 'candidateGroups') {
} else if (data.type === 'candidateGroups') { // ()
res.data.roleList.forEach(role => {
role.userId = role.roleId;
role.nickName = role.roleName;
})
this.userDataList = res.data.roleList;
this.taskForm.multiple = false;
} else if (data.type === 'multiInstance') {
} else if (data.type === 'multiInstance') { // ?
this.userDataList = res.data.userList;
this.taskForm.multiple = true;
}else if (data.type === 'fixed') { //
this.checkSendUser = false;
}
this.taskForm.sendUserShow = true;
}
})
},

Loading…
Cancel
Save