This commit is contained in:
Taric Xin
2022-04-28 15:36:26 +08:00
parent 7c4b440e8e
commit dc64c78694
4 changed files with 23 additions and 10 deletions

View File

@ -30,7 +30,7 @@ module.exports = {
// },
'//api': {
target: {
host: 'tms-api-dev.eascs.com',
host: 'tms-api-test.eascs.com',
protocol: 'https:',
port: 443
},

View File

@ -23,8 +23,8 @@
<nz-card class="content-box">
<nz-tabset>
<nz-tab nzTitle="货主菜单" (nzClick)="changeMemu(0)"></nz-tab>
<nz-tab nzTitle="运营后台菜单" (nzClick)="changeMemu(1)"></nz-tab>
<nz-tab nzTitle="货主菜单" (nzClick)="changeMemu(0)" *ngIf="isShowFre"></nz-tab>
<nz-tab nzTitle="运营后台菜单" (nzClick)="changeMemu(1)" *ngIf="isShowBackEND"></nz-tab>
</nz-tabset>
<!-- <st #st [data]="service.$api_get_all" [columns]="columns" [expand]="expand" expandRowByClick
@ -36,7 +36,7 @@
</ng-template>
</st> -->
<nz-table #expandTable [nzData]="listOfMapData" nzTableLayout="fixed" nzBordered nzSize="small"
[nzLoading]="service.http.loading">
[nzLoading]="service.http.loading" *ngIf="isShowFre || isShowBackEND">
<thead>
<tr>
<!-- <th nzWidth="70px" nzAlign="center">#</th> -->
@ -65,7 +65,7 @@
</td>
<td nzWidth="100px">{{ item.sorted }}</td>
<td nzWidth="150px" nzAlign="center">
<a (click)="openDrawer(item)">权限配置</a>
<a (click)="openDrawer(item)" acl [acl-ability]="['MENU-AUTH-auth']">权限配置</a>
</td>
</tr>
</ng-container>

View File

@ -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);
}

View File

@ -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 {}