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 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 dataType = userTask.getAttributeValue(ProcessConstants.NAMASPASE, ProcessConstants.PROCESS_CUSTOM_DATA_TYPE);
String userType = userTask.getAttributeValue(ProcessConstants.NAMASPASE, ProcessConstants.PROCESS_CUSTOM_USER_TYPE); String userType = userTask.getAttributeValue(ProcessConstants.NAMASPASE, ProcessConstants.PROCESS_CUSTOM_USER_TYPE);
// 处理加载动态指定下一节点接收人员信息
if (ProcessConstants.DATA_TYPE.equals(dataType)) { if (ProcessConstants.DATA_TYPE.equals(dataType)) {
// 指定单个人员 // 指定单个人员
if (ProcessConstants.USER_TYPE_ASSIGNEE.equals(userType)) { 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.setType(ProcessConstants.USER_TYPE_ROUPS);
flowNextDto.setRoleList(sysRoles); 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 v-loading="loading" fit :data="definitionList" border @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <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="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" prop="category" />
<el-table-column label="流程名称" align="center" :show-overflow-tooltip="true"> <el-table-column label="流程名称" align="center" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">

@ -116,6 +116,21 @@
<!-- 发起流程 --> <!-- 发起流程 -->
<el-dialog :title="title" :visible.sync="open" width="60%" append-to-body> <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 v-loading="processLoading" fit :data="definitionList" border >
<el-table-column label="流程名称" align="center" prop="name" /> <el-table-column label="流程名称" align="center" prop="name" />
<el-table-column label="流程版本" align="center"> <el-table-column label="流程版本" align="center">
@ -138,8 +153,8 @@
<pagination <pagination
v-show="processTotal>0" v-show="processTotal>0"
:total="processTotal" :total="processTotal"
:page.sync="queryParams.pageNum" :page.sync="queryProcessParams.pageNum"
:limit.sync="queryParams.pageSize" :limit.sync="queryProcessParams.pageSize"
@pagination="listDefinition" @pagination="listDefinition"
/> />
</el-dialog> </el-dialog>
@ -200,6 +215,20 @@ export default {
parentDeploymentId: null, parentDeploymentId: null,
engineVersion: 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: {}, form: {},
// //
@ -251,6 +280,16 @@ export default {
this.resetForm("queryForm"); this.resetForm("queryForm");
this.handleQuery(); this.handleQuery();
}, },
/** 搜索按钮操作 */
handleProcessQuery() {
this.queryProcessParams.pageNum = 1;
this.listDefinition();
},
/** 重置按钮操作 */
resetProcessQuery() {
this.resetForm("queryProcessForm");
this.handleProcessQuery();
},
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.id) this.ids = selection.map(item => item.id)
@ -264,7 +303,7 @@ export default {
this.listDefinition(); this.listDefinition();
}, },
listDefinition(){ listDefinition(){
listDefinition(this.queryParams).then(response => { listDefinition(this.queryProcessParams).then(response => {
this.definitionList = response.data.records; this.definitionList = response.data.records;
this.processTotal = response.data.total; this.processTotal = response.data.total;
this.processLoading = false; this.processLoading = false;

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

Loading…
Cancel
Save