diff --git a/proxy.conf.js b/proxy.conf.js index 4690cd30..d18ecb48 100644 --- a/proxy.conf.js +++ b/proxy.conf.js @@ -30,7 +30,7 @@ module.exports = { // }, '//api': { target: { - host: 'tms-api-dev.eascs.com', + host: 'tms-api-test.eascs.com', protocol: 'https:', port: 443 }, diff --git a/src/app/routes/menu-manager/components/api-auth/api-auth.component.html b/src/app/routes/menu-manager/components/api-auth/api-auth.component.html index f1d7c7f0..86ffe160 100644 --- a/src/app/routes/menu-manager/components/api-auth/api-auth.component.html +++ b/src/app/routes/menu-manager/components/api-auth/api-auth.component.html @@ -23,8 +23,8 @@ - - + + + [nzLoading]="service.http.loading" *ngIf="isShowFre || isShowBackEND"> @@ -65,7 +65,7 @@ {{ item.sorted }} - 权限配置 + 权限配置 diff --git a/src/app/routes/menu-manager/components/api-auth/api-auth.component.ts b/src/app/routes/menu-manager/components/api-auth/api-auth.component.ts index c61cab04..f6004b13 100644 --- a/src/app/routes/menu-manager/components/api-auth/api-auth.component.ts +++ b/src/app/routes/menu-manager/components/api-auth/api-auth.component.ts @@ -1,4 +1,5 @@ import { Component, OnInit, ViewChild } from '@angular/core'; +import { ACLService } from '@delon/acl'; import { SFComponent, SFSchema } from '@delon/form'; import { EAEnvironmentService } from '@shared'; import { NzDrawerService } from 'ng-zorro-antd/drawer'; @@ -34,14 +35,26 @@ export class ApiAuthComponent implements OnInit { mapOfExpandedData: { [key: string]: any[] } = {}; listOfMapData: any[] = []; - constructor(private envSrv: EAEnvironmentService, public service: MenuManagerService, private drawer: NzDrawerService) { + + isShowBackEND = false; + isShowFre = false; + + constructor( + private envSrv: EAEnvironmentService, + public service: MenuManagerService, + private drawer: NzDrawerService, + private acl: ACLService + ) { + const acls = acl.data.abilities || []; + this.isShowBackEND = acl.data.full || !!acls.find(acl => acl === 'MENU-AUTH-obclist'); + this.isShowFre = acl.data.full || !!acls.find(acl => acl === 'MENU-AUTH-smclist'); this.initData(); } ngOnInit(): void {} initData(): void { - this.selectedPlatform = this.platforms[0]; + this.selectedPlatform = this.isShowFre ? this.platforms[0] : this.platforms[1]; this.loadMemu(this.selectedPlatform.appId); } diff --git a/src/app/routes/menu-manager/menu-manager-routing.module.ts b/src/app/routes/menu-manager/menu-manager-routing.module.ts index d46c398f..30dde843 100644 --- a/src/app/routes/menu-manager/menu-manager-routing.module.ts +++ b/src/app/routes/menu-manager/menu-manager-routing.module.ts @@ -5,12 +5,12 @@ import { MenuManagerComponentsIndexComponent } from './components/index/index.co const routes: Routes = [ { path: '', redirectTo: 'index', pathMatch: 'full' }, - { path: 'index', component: MenuManagerComponentsIndexComponent }, - { path: 'auth', component: ApiAuthComponent }, + { path: 'index', component: MenuManagerComponentsIndexComponent, data: { guard: { ability: ['MENU-INDEX-obclist'] } } }, + { path: 'auth', component: ApiAuthComponent, data: { guard: { ability: ['MENU-AUTH-obclist', 'MENU-AUTH-smclist'] } } } ]; @NgModule({ imports: [RouterModule.forChild(routes)], - exports: [RouterModule], + exports: [RouterModule] }) export class MenuManagerRoutingModule {}