Merge branch 'bjxz-dev' into chenH
This commit is contained in:
commit
1c912ca23c
@ -300,21 +300,31 @@ export default {
|
|||||||
console.log('获取角色配置的菜单',arr);
|
console.log('获取角色配置的菜单',arr);
|
||||||
// var arr2 = [];
|
// var arr2 = [];
|
||||||
console.log(arr);
|
console.log(arr);
|
||||||
if (arr.length > 0) {
|
// if (arr.length > 0) {
|
||||||
arr.forEach(element => {
|
// arr.forEach(element => {
|
||||||
if (element.authorityId) {
|
// if (element.authorityId) {
|
||||||
this.dataList.push(element.authorityId);
|
// this.dataList.push(element.authorityId);
|
||||||
}
|
// }
|
||||||
// else{
|
// // else{
|
||||||
// arr2.push(element.moduleId)
|
// // arr2.push(element.moduleId)
|
||||||
// }
|
// // }
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
this.$nextTick(() => {
|
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() {
|
cancleBtn() {
|
||||||
this.Popup.power = false;
|
this.Popup.power = false;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user