Commit 02a6bd11 authored by dragondean@qq.com's avatar dragondean@qq.com

修复角色菜单权限设置异常

parent f2dd5478
......@@ -396,7 +396,7 @@ export default {
// 获得角色拥有的菜单集合
listRoleMenus(id).then(response => {
// 设置为严格,避免设置父节点自动选中子节点,解决半选中问题
this.form.menuCheckStrictly = true
// this.form.menuCheckStrictly = true
// 设置选中
this.$refs.menu.setCheckedKeys(response.data);
// 设置为非严格,继续使用半选中
......@@ -466,7 +466,7 @@ export default {
if (this.form.id !== undefined) {
assignRoleMenu({
roleId: this.form.id,
menuIds: [...this.$refs.menu.getCheckedKeys(), ...this.$refs.menu.getHalfCheckedKeys()]
menuIds: [...this.$refs.menu.getCheckedKeys()] // , ...this.$refs.menu.getHalfCheckedKeys() 不需要半选中的,会在下次回显的时候导致子节点全部被选中
}).then(response => {
this.$modal.msgSuccess("修改成功");
this.openMenu = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment