Browse Source

角色管理 2022-05-24 sxm

master
[li_she] 4 years ago
parent
commit
8106ae1e7c
  1. 10
      src/views/modules/sys/role-add-or-update.vue

10
src/views/modules/sys/role-add-or-update.vue

@ -15,7 +15,6 @@
</el-form-item> </el-form-item>
<el-form-item size="mini" label="授权"> <el-form-item size="mini" label="授权">
<el-tree <el-tree
:data="menuList" :data="menuList"
:props="menuListTreeProps" :props="menuListTreeProps"
node-key="menuId" node-key="menuId"
@ -86,7 +85,14 @@ export default {
if (idx !== -1) { if (idx !== -1) {
data.role.menuIdList.splice(idx, data.role.menuIdList.length - idx) data.role.menuIdList.splice(idx, data.role.menuIdList.length - idx)
} }
this.$refs.menuListTree.setCheckedKeys(data.role.menuIdList)
console.log(data.role.menuIdList)
let x1 = data.role.menuIdList.map(Number)
console.log(x1)
this.$nextTick(() => {
for (let x1Element of x1) {
this.$refs.menuListTree.setChecked(x1Element,true,false)
}
})
} }
}) })
} }

Loading…
Cancel
Save