Merge branch 'bjxz-dev' into chenH
This commit is contained in:
commit
1c912ca23c
@ -300,21 +300,31 @@ export default {
|
||||
console.log('获取角色配置的菜单',arr);
|
||||
// var arr2 = [];
|
||||
console.log(arr);
|
||||
if (arr.length > 0) {
|
||||
arr.forEach(element => {
|
||||
if (element.authorityId) {
|
||||
this.dataList.push(element.authorityId);
|
||||
}
|
||||
// else{
|
||||
// arr2.push(element.moduleId)
|
||||
// }
|
||||
});
|
||||
}
|
||||
// if (arr.length > 0) {
|
||||
// arr.forEach(element => {
|
||||
// if (element.authorityId) {
|
||||
// this.dataList.push(element.authorityId);
|
||||
// }
|
||||
// // else{
|
||||
// // arr2.push(element.moduleId)
|
||||
// // }
|
||||
// });
|
||||
// }
|
||||
this.$nextTick(() => {
|
||||
this.$refs.tree.setCheckedKeys(this.dataList);
|
||||
this.$refs.tree.setCheckedKeys(this.getRelativeKeys(res.result));
|
||||
});
|
||||
});
|
||||
},
|
||||
// 根据条件获取需要选中的节点keys
|
||||
getRelativeKeys(arr) {
|
||||
let keysArr = [];
|
||||
arr.map((item) => {
|
||||
if (!item.hasSubList) {
|
||||
keysArr.push(item.authorityId);
|
||||
}
|
||||
});
|
||||
return keysArr;
|
||||
},
|
||||
// 取消菜单配置
|
||||
cancleBtn() {
|
||||
this.Popup.power = false;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user