fix: 审批任务选择多个候选人未正常接收

approve-sys
tony 3 years ago
parent 42e450501f
commit a199211d06

@ -51,6 +51,7 @@ GitHubhttps://github.com/tony2y/RuoYi-flowable.git
<img src="https://images.gitee.com/uploads/images/2022/0422/180040_cbfd08db_2042292.png"/> <img src="https://images.gitee.com/uploads/images/2022/0422/180040_cbfd08db_2042292.png"/>
<img src="https://images.gitee.com/uploads/images/2022/0422/180059_b43a6ebe_2042292.png"/> <img src="https://images.gitee.com/uploads/images/2022/0422/180059_b43a6ebe_2042292.png"/>
<img src="https://images.gitee.com/uploads/images/2022/0422/180232_f940c940_2042292.png"/> <img src="https://images.gitee.com/uploads/images/2022/0422/180232_f940c940_2042292.png"/>
<img src="https://images.gitee.com/uploads/images/2022/0422/182121_31ed0d5a_2042292.png"/>
<img src="https://images.gitee.com/uploads/images/2022/0422/180315_122eb523_2042292.png"/> <img src="https://images.gitee.com/uploads/images/2022/0422/180315_122eb523_2042292.png"/>
<img src="https://images.gitee.com/uploads/images/2022/0422/180200_6092c5e2_2042292.png"/> <img src="https://images.gitee.com/uploads/images/2022/0422/180200_6092c5e2_2042292.png"/>

@ -707,6 +707,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
List<HistoricIdentityLink> linksForTask = historyService.getHistoricIdentityLinksForTask(histIns.getTaskId()); List<HistoricIdentityLink> linksForTask = historyService.getHistoricIdentityLinksForTask(histIns.getTaskId());
StringBuilder stringBuilder = new StringBuilder(); StringBuilder stringBuilder = new StringBuilder();
for (HistoricIdentityLink identityLink : linksForTask) { for (HistoricIdentityLink identityLink : linksForTask) {
// 获选人,候选组/角色(多个)
if ("candidate".equals(identityLink.getType())) { if ("candidate".equals(identityLink.getType())) {
if (StringUtils.isNotBlank(identityLink.getUserId())) { if (StringUtils.isNotBlank(identityLink.getUserId())) {
SysUser sysUser = sysUserService.selectUserById(Long.parseLong(identityLink.getUserId())); SysUser sysUser = sysUserService.selectUserById(Long.parseLong(identityLink.getUserId()));

@ -127,7 +127,6 @@ export default {
if (completeTask) { if (completeTask) {
canvas.addMarker(n.id, completeTask.completed ? 'highlight' : 'highlight-todo') canvas.addMarker(n.id, completeTask.completed ? 'highlight' : 'highlight-todo')
n.outgoing?.forEach(nn => { n.outgoing?.forEach(nn => {
debugger
const targetTask = this.taskList.find(m => m.key === nn.targetRef.id) const targetTask = this.taskList.find(m => m.key === nn.targetRef.id)
if (targetTask) { if (targetTask) {
canvas.addMarker(nn.id, targetTask.completed ? 'highlight' : 'highlight-todo') canvas.addMarker(nn.id, targetTask.completed ? 'highlight' : 'highlight-todo')

@ -97,7 +97,7 @@
<el-form-item v-if="checkSendUser" prop="targetKey"> <el-form-item v-if="checkSendUser" prop="targetKey">
<el-row :gutter="20"> <el-row :gutter="20">
<!--部门数据--> <!--部门数据-->
<el-col :span="4" :xs="24"> <el-col :span="6" :xs="24">
<h6>部门列表</h6> <h6>部门列表</h6>
<div class="head-container"> <div class="head-container">
<el-input <el-input
@ -121,7 +121,7 @@
/> />
</div> </div>
</el-col> </el-col>
<el-col :span="12" :xs="24"> <el-col :span="10" :xs="24">
<h6>待选人员</h6> <h6>待选人员</h6>
<el-table <el-table
ref="singleTable" ref="singleTable"
@ -137,11 +137,11 @@
<el-col :span="8" :xs="24"> <el-col :span="8" :xs="24">
<h6>已选人员</h6> <h6>已选人员</h6>
<el-tag <el-tag
v-for="tag in userData" v-for="(user,index) in userData"
:key="tag" :key="index"
closable closable
@close="handleClose(tag)"> @close="handleClose(user)">
{{tag.nickName}} {{tag.dept.deptName}} {{user.nickName}} {{user.dept.deptName}}
</el-tag> </el-tag>
</el-col> </el-col>
</el-row> </el-row>
@ -344,15 +344,17 @@ export default {
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
if (selection) {
this.userData = selection this.userData = selection
const val = selection.map(item => item.userId)[0]; const selectVal = selection.map(item => item.userId);
if (val instanceof Array) { if (selectVal instanceof Array) {
this.taskForm.values = { this.taskForm.values = {
"approval": val.join(',') "approval": selectVal.join(',')
} }
} else { } else {
this.taskForm.values = { this.taskForm.values = {
"approval": val "approval": selectVal
}
} }
} }
}, },

Loading…
Cancel
Save