fix bug
This commit is contained in:
@ -64,6 +64,7 @@ export class SettingRoleEditComponent implements OnInit {
|
||||
const params = {
|
||||
id: this.params.id
|
||||
};
|
||||
console.log(this.params.infoUrl)
|
||||
this.service.request(this.params.infoUrl, params).subscribe(res => {
|
||||
if (res) {
|
||||
this.roleInfoData = res;
|
||||
|
||||
@ -57,10 +57,15 @@ export class SettingMenuComponent implements OnInit, OnChanges {
|
||||
});
|
||||
}
|
||||
addAuthority(origin: { id: any; all: any }, node: { buttonInfoList: any[] }, item?: { checked: any; functionButtonId: any }) {
|
||||
console.log(origin,node);
|
||||
|
||||
if (this.authority?.length && this.authority.filter(authItem => authItem.authorityId === origin.id).length) {
|
||||
// 判断此菜单权限是否已经存在权限列表中
|
||||
// 当前操作菜单id存在权限列表里
|
||||
this.authority.forEach(menuItem => {
|
||||
console.log(menuItem);
|
||||
console.log(item);
|
||||
|
||||
if (menuItem.authorityId === origin.id) {
|
||||
menuItem.buttonAuthorityIds = menuItem.buttonAuthorityIds || []; // 防止属性不存在,给属性指定数据类型
|
||||
if (item) {
|
||||
@ -312,6 +317,8 @@ export class SettingMenuComponent implements OnInit, OnChanges {
|
||||
if (res) {
|
||||
origin.buttonInfoList = res;
|
||||
origin.all = false;
|
||||
console.log(origin);
|
||||
|
||||
// 判断此菜单下是否已有此按钮权限
|
||||
this.againGetBtn(id, origin);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user