|
|
@@ -384,9 +384,25 @@ export default {
|
|
|
this.currentForm.nodeOrder = row.nodeOrder;
|
|
|
this.currentForm.id = row.id;
|
|
|
|
|
|
- // 设置选中的用户
|
|
|
- this.selectedUsers = row.approverList || [];
|
|
|
- this.currentForm.approver = row.approverList ? row.approverList.map(user => user.userId) : [];
|
|
|
+ // 根据userName和approverList设置选中的用户
|
|
|
+ if (row.userName && row.approverList) {
|
|
|
+ const userNames = row.userName.split(',');
|
|
|
+ const userIds = row.approverList;
|
|
|
+
|
|
|
+ // 创建selectedUsers数组
|
|
|
+ this.selectedUsers = userIds.map((userId, index) => ({
|
|
|
+ userId: userId,
|
|
|
+ userName: userNames[index] || '',
|
|
|
+ nickName: userNames[index] || ''
|
|
|
+ }));
|
|
|
+
|
|
|
+ // 设置表单中的审核人ID数组
|
|
|
+ this.currentForm.approver = userIds;
|
|
|
+ } else {
|
|
|
+ // 如果没有数据,清空选中状态
|
|
|
+ this.selectedUsers = [];
|
|
|
+ this.currentForm.approver = [];
|
|
|
+ }
|
|
|
|
|
|
this.open = true;
|
|
|
this.title = "修改审核配置";
|
|
|
@@ -440,7 +456,7 @@ export default {
|
|
|
},
|
|
|
// 处理用户选择确认
|
|
|
handleUserSelectConfirm(data) {
|
|
|
- // 将选中的用户添加到已选列表中
|
|
|
+ // 多选模式,将选中的用户添加到已选列表中
|
|
|
const newUsers = data.users.filter(user =>
|
|
|
!this.selectedUsers.some(selected => selected.userId === user.userId)
|
|
|
);
|