This commit is contained in:
wangshiming
2022-04-25 14:48:09 +08:00
parent b6d76dad82
commit 81bfaea6f5
3 changed files with 25 additions and 1 deletions

View File

@ -21,6 +21,7 @@ export class SettingRoleEditComponent implements OnInit {
roleInfoData: any = {};
authorityAssistId: any[] = [];
params: any;
changeValue: boolean = false
schema!: SFSchema;
authority: any[] = [];
constructor(private modal: NzModalRef, public service: SystemService) {}
@ -81,11 +82,18 @@ console.log(this.params.infoUrl)
close() {
this.modal.destroy();
}
changeIF(value: boolean) {
console.log(value);
console.log('54545');
this.changeValue = true
}
sure() {
if (!this.sf?.valid) {
this.service.msgSrv.warning('角色名称不能为空');
return;
}
console.log(this.changeValue);
const auths = this.menu?.washTree();
if (auths.authorityAssistId.length === 0) {
this.service.msgSrv.warning('请选择权限!');
@ -97,6 +105,10 @@ 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;
}