diff --git a/src/app/routes/sys-setting/components/role-management/edit/edit.component.html b/src/app/routes/sys-setting/components/role-management/edit/edit.component.html
index 8291cad4..976a3f03 100644
--- a/src/app/routes/sys-setting/components/role-management/edit/edit.component.html
+++ b/src/app/routes/sys-setting/components/role-management/edit/edit.component.html
@@ -1,3 +1,13 @@
+
@@ -11,7 +21,7 @@
+ [authorityAssistId]="roleInfoData.authorityAssistId || []" (changeIF)="changeIF($event)">
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 70a60ca2..f595ee0a 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
@@ -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;
}
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 2a17332c..3ac047cb 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
@@ -26,6 +26,7 @@ export class SettingMenuComponent implements OnInit, OnChanges {
@Input() isAuthorityIdDTOList: any[] = [];
@Input() authorityAssistId: any[] = [];
@Input() roleId: any;
+ @Output() changeIF= new EventEmitter();
@Output() changeData = new EventEmitter();
constructor(public service: SystemService, private cdr: ChangeDetectorRef, private envSrv: EAEnvironmentService) {}
ngOnChanges(changes: SimpleChanges): void {
@@ -67,6 +68,7 @@ export class SettingMenuComponent implements OnInit, OnChanges {
if (menuItem.authorityId === origin.id) {
menuItem.buttonAuthorityIds = menuItem.buttonAuthorityIds || []; // 防止属性不存在,给属性指定数据类型
if (item) {
+ this.changeIF.emit(true);
// 单选
if (item.checked) {
if (menuItem.buttonAuthorityIds.indexOf(item.functionButtonId) === -1) {