Merge branch 'bjxz-dev' into chenH

This commit is contained in:
cjp 2024-05-01 02:40:21 +08:00
commit 1c912ca23c

View File

@ -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;