diff --git a/src/app/routes/sys-setting/components/role-management/edit/edit.component.ts b/src/app/routes/sys-setting/components/role-management/edit/edit.component.ts index f595ee0a..50b3e8db 100644 --- a/src/app/routes/sys-setting/components/role-management/edit/edit.component.ts +++ b/src/app/routes/sys-setting/components/role-management/edit/edit.component.ts @@ -105,9 +105,6 @@ console.log(this.params.infoUrl) authority: auths.authority, authorityAssistId: auths.authorityAssistId }; - if(this.changeValue) { - params.isUpdateAuthority = 1 - } if (this.params.id === 0) { delete params.id; diff --git a/src/app/routes/sys-setting/components/role-management/menu/menu.component.ts b/src/app/routes/sys-setting/components/role-management/menu/menu.component.ts index 3ac047cb..e5d0309a 100644 --- a/src/app/routes/sys-setting/components/role-management/menu/menu.component.ts +++ b/src/app/routes/sys-setting/components/role-management/menu/menu.component.ts @@ -329,9 +329,15 @@ export class SettingMenuComponent implements OnInit, OnChanges { } // 再次请求,需要判断暂存权限数组是否已有此权限 againGetBtn(id: any, origin: any) { - if (this.authority && this.authority.length === 0) { + if (this.authority && this.authority.length !== 0) { + console.log('1111'); + const buttonAuthorityIds: any = []; + console.log(origin); + console.log(origin.checked); + if (origin.checked) { + origin.buttonInfoList.forEach((btnItem: { functionButtonId: any; checked: boolean }) => { btnItem.checked = true; buttonAuthorityIds.push(btnItem.functionButtonId); @@ -339,6 +345,8 @@ export class SettingMenuComponent implements OnInit, OnChanges { this.authority.push({ authorityId: origin.key, buttonAuthorityIds, isUpdateAuthority: 1 }); } } else { + console.log('22222'); + if (origin.checked) { //菜单勾选情况下 if (this.authority.some(item => item.authorityId === id)) {