This commit is contained in:
Taric Xin
2022-02-22 16:45:33 +08:00
parent d86c80d5c5
commit 12be5d37b5
3 changed files with 15 additions and 12 deletions

View File

@ -9,7 +9,7 @@
<div class="box">
<se-container se-container="1">
<se label="角色权限" required [labelWidth]="120">
<app-cuc-menu #menu (changeData)="getData($event)" [type]="params.id === 0 ? 'add' : 'edit'" [roleId]="params.id"
<app-cuc-menu #menu (changeData)="getData($event)" [type]="params.id === 0 ? 'add' : 'edit'" [roleId]="params.id" [appId]="params.appId"
[isAuthorityIdDTOList]="roleInfoData.authority || []"
[authorityAssistId]="roleInfoData.authorityAssistId || []">
</app-cuc-menu>

View File

@ -41,15 +41,17 @@ export class SettingMenuComponent implements OnInit, OnChanges {
ngOnInit() {}
getAllFunction() {
this.service.request(this.service.$api_getAllFunctionInfoByAppId, { appId: this.appId }, 'POST', true, 'FORM').subscribe(res => {
// if (this.source === 'onlyRelationAuth') {
// this.addDisabledTree(res);
// } else {
// // this.addDisabledLeafTree(res);
// }
this.functionList = res;
this.defaultCheckedKeys = this.authorityAssistId;
});
this.service
.request(this.service.$api_getAllFunctionInfoByAppId, { appId: this.appId || this.envSrv.env.appId }, 'POST', true, 'FORM')
.subscribe(res => {
// if (this.source === 'onlyRelationAuth') {
// this.addDisabledTree(res);
// } else {
// // this.addDisabledLeafTree(res);
// }
this.functionList = res;
this.defaultCheckedKeys = this.authorityAssistId;
});
}
addAuthority(origin: { id: any; all: any }, node: { buttonInfoList: any[] }, item?: { checked: any; functionButtonId: any }) {
if (this.authority.length && this.authority.filter(authItem => authItem.authorityId === origin.id).length) {

View File

@ -56,7 +56,7 @@ export class RoleManagementComponent implements OnInit {
];
type = 'user';
params = {
params: any = {
listUrl: this.service.$api_get_role_page,
deleteUrl: this.service.$api_dalete_role,
infoUrl: this.service.$api_getRoleInfo,
@ -74,7 +74,8 @@ export class RoleManagementComponent implements OnInit {
deleteUrl: this.service.$api_dalete_role,
infoUrl: this.service.$api_getRoleInfo,
addUrl: this.service.$api_save_role,
updateUrl: this.service.$api_update_role
updateUrl: this.service.$api_update_role,
appId: 'A48F72F0A304427F921794BAD86B3522'
};
}
}