fix bug
This commit is contained in:
@ -105,9 +105,6 @@ console.log(this.params.infoUrl)
|
|||||||
authority: auths.authority,
|
authority: auths.authority,
|
||||||
authorityAssistId: auths.authorityAssistId
|
authorityAssistId: auths.authorityAssistId
|
||||||
};
|
};
|
||||||
if(this.changeValue) {
|
|
||||||
params.isUpdateAuthority = 1
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.params.id === 0) {
|
if (this.params.id === 0) {
|
||||||
delete params.id;
|
delete params.id;
|
||||||
|
|||||||
@ -329,9 +329,15 @@ export class SettingMenuComponent implements OnInit, OnChanges {
|
|||||||
}
|
}
|
||||||
// 再次请求,需要判断暂存权限数组是否已有此权限
|
// 再次请求,需要判断暂存权限数组是否已有此权限
|
||||||
againGetBtn(id: any, origin: any) {
|
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 = [];
|
const buttonAuthorityIds: any = [];
|
||||||
|
console.log(origin);
|
||||||
|
console.log(origin.checked);
|
||||||
|
|
||||||
if (origin.checked) {
|
if (origin.checked) {
|
||||||
|
|
||||||
origin.buttonInfoList.forEach((btnItem: { functionButtonId: any; checked: boolean }) => {
|
origin.buttonInfoList.forEach((btnItem: { functionButtonId: any; checked: boolean }) => {
|
||||||
btnItem.checked = true;
|
btnItem.checked = true;
|
||||||
buttonAuthorityIds.push(btnItem.functionButtonId);
|
buttonAuthorityIds.push(btnItem.functionButtonId);
|
||||||
@ -339,6 +345,8 @@ export class SettingMenuComponent implements OnInit, OnChanges {
|
|||||||
this.authority.push({ authorityId: origin.key, buttonAuthorityIds, isUpdateAuthority: 1 });
|
this.authority.push({ authorityId: origin.key, buttonAuthorityIds, isUpdateAuthority: 1 });
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
console.log('22222');
|
||||||
|
|
||||||
if (origin.checked) {
|
if (origin.checked) {
|
||||||
//菜单勾选情况下
|
//菜单勾选情况下
|
||||||
if (this.authority.some(item => item.authorityId === id)) {
|
if (this.authority.some(item => item.authorityId === id)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user