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