fix bug
This commit is contained in:
@ -73,6 +73,8 @@ console.log(this.params.infoUrl)
|
||||
});
|
||||
}
|
||||
getData(res: { authority: any[]; authorityAssistId: any[] }) {
|
||||
console.log('修改了');
|
||||
|
||||
this.authority = res.authority;
|
||||
this.authorityAssistId = res.authorityAssistId;
|
||||
}
|
||||
|
||||
@ -63,8 +63,6 @@ export class SettingMenuComponent implements OnInit, OnChanges {
|
||||
// 判断此菜单权限是否已经存在权限列表中
|
||||
// 当前操作菜单id存在权限列表里
|
||||
this.authority.forEach(menuItem => {
|
||||
console.log(menuItem);
|
||||
console.log(item);
|
||||
|
||||
if (menuItem.authorityId === origin.id) {
|
||||
menuItem.buttonAuthorityIds = menuItem.buttonAuthorityIds || []; // 防止属性不存在,给属性指定数据类型
|
||||
@ -73,9 +71,12 @@ export class SettingMenuComponent implements OnInit, OnChanges {
|
||||
if (item.checked) {
|
||||
if (menuItem.buttonAuthorityIds.indexOf(item.functionButtonId) === -1) {
|
||||
// 如果该按钮在数据权限数组中不存在
|
||||
console.log('不存在');
|
||||
|
||||
menuItem.buttonAuthorityIds.push(item.functionButtonId);
|
||||
}
|
||||
} else {
|
||||
console.log('存在');
|
||||
if (menuItem.buttonAuthorityIds && menuItem.buttonAuthorityIds.length) {
|
||||
menuItem.buttonAuthorityIds.forEach((btnItem: any, index: any) => {
|
||||
if (btnItem === item.functionButtonId) {
|
||||
|
||||
Reference in New Issue
Block a user