This commit is contained in:
wangshiming
2022-04-25 15:40:16 +08:00
parent 81bfaea6f5
commit 0f4a05e2bf
2 changed files with 9 additions and 4 deletions

View File

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

View File

@ -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)) {