edit
This commit is contained in:
@ -9,8 +9,8 @@
|
||||
<se-container se-container="1">
|
||||
<se label="角色权限" required [labelWidth]="120">
|
||||
<app-cuc-menu #menu (changeData)="getData($event)" [type]="i.id === 0 ? 'add' : 'edit'" [source]="source"
|
||||
[roleId]="i.id" [isAuthorityIdDTOList]="roleInfoData.authority"
|
||||
[authorityAssistId]="roleInfoData.authorityAssistId">
|
||||
[roleId]="i.id" [isAuthorityIdDTOList]="roleInfoData.authority || []"
|
||||
[authorityAssistId]="roleInfoData.authorityAssistId || []">
|
||||
</app-cuc-menu>
|
||||
</se>
|
||||
</se-container>
|
||||
|
||||
@ -100,9 +100,10 @@ export class SettingRoleEditComponent implements OnInit {
|
||||
id: this.i.id
|
||||
};
|
||||
this.service.request(this.service.$api_getRoleInfo, params).subscribe(res => {
|
||||
this.roleInfoData = res;
|
||||
this.roleInfoData.authority = res.authority || [];
|
||||
this.roleInfoData.authorityAssistId = res.authorityAssistId || [];
|
||||
if (res) {
|
||||
this.roleInfoData = res;
|
||||
}
|
||||
|
||||
if (this.source === '') {
|
||||
this.initSF();
|
||||
}
|
||||
@ -121,14 +122,12 @@ export class SettingRoleEditComponent implements OnInit {
|
||||
// this.service.msgSrv.warning('请选择权限!');
|
||||
// return;
|
||||
// }
|
||||
console.log(this.menu.nzTreeComponent.getCheckedNodeList());
|
||||
const selectedFun = this.menu?.nzTreeComponent?.getCheckedNodeList()?.map(node => ({ authorityId: node.key }));
|
||||
const authorityAssistId = selectedFun?.map(node => node.authorityId);
|
||||
const auths = this.menu?.washTree();
|
||||
const params: any = {
|
||||
id: this.i.id,
|
||||
...this.sf.value,
|
||||
authority: selectedFun,
|
||||
authorityAssistId: authorityAssistId
|
||||
authority: auths.authority,
|
||||
authorityAssistId: auths.authorityAssistId
|
||||
};
|
||||
// if (this.sf) {
|
||||
// this.appList.forEach(item => {
|
||||
|
||||
Reference in New Issue
Block a user