mirror of
https://gitee.com/JavaLionLi/plus-ui.git
synced 2026-09-14 16:17:31 +08:00
update 优化 roleOptions 去重处理
This commit is contained in:
parent
1bf03053e1
commit
0872624adc
@ -615,8 +615,9 @@ const handleUpdate = async (row?: UserForm) => {
|
|||||||
dialog.title = '修改用户';
|
dialog.title = '修改用户';
|
||||||
Object.assign(form.value, data.user);
|
Object.assign(form.value, data.user);
|
||||||
postOptions.value = data.posts;
|
postOptions.value = data.posts;
|
||||||
roleOptions.value = data.roles;
|
roleOptions.value = Array.from(
|
||||||
roleOptions.value.push(...data.user.roles)
|
new Map([...data.roles, ...data.user.roles].map(role => [role.roleId, role])).values()
|
||||||
|
);
|
||||||
form.value.postIds = data.postIds;
|
form.value.postIds = data.postIds;
|
||||||
form.value.roleIds = data.roleIds;
|
form.value.roleIds = data.roleIds;
|
||||||
form.value.password = '';
|
form.value.password = '';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user