edit
This commit is contained in:
@ -1,5 +1,8 @@
|
|||||||
<page-header-wrapper [title]="''"></page-header-wrapper>
|
<page-header-wrapper [title]="''"></page-header-wrapper>
|
||||||
|
|
||||||
<button nz-button (click)="menuImport()" [nzLoading]="service.http.loading">
|
<button nz-button (click)="menuImport(0)" [nzLoading]="service.http.loading">
|
||||||
导入
|
导入货主菜单
|
||||||
|
</button>
|
||||||
|
<button nz-button (click)="menuImport(1)" [nzLoading]="service.http.loading">
|
||||||
|
导入运营后台菜单
|
||||||
</button>
|
</button>
|
||||||
@ -32,7 +32,7 @@ export class MenuManagerComponentsIndexComponent implements OnInit {
|
|||||||
{ name: '运营后台', appId: this.envSrv.env.appId, enName: 'tms-obc-web' }
|
{ name: '运营后台', appId: this.envSrv.env.appId, enName: 'tms-obc-web' }
|
||||||
];
|
];
|
||||||
this.selectedPlatform = this.platforms[0];
|
this.selectedPlatform = this.platforms[0];
|
||||||
this.platformChange(this.selectedPlatform);
|
// this.platformChange(this.selectedPlatform);
|
||||||
}
|
}
|
||||||
|
|
||||||
platformChange(e: { name: string; appId: string }) {
|
platformChange(e: { name: string; appId: string }) {
|
||||||
@ -56,12 +56,15 @@ export class MenuManagerComponentsIndexComponent implements OnInit {
|
|||||||
console.log('editChanged', event);
|
console.log('editChanged', event);
|
||||||
}
|
}
|
||||||
|
|
||||||
menuImport() {
|
menuImport(index: number) {
|
||||||
|
this.selectedPlatform = this.platforms[index];
|
||||||
if (!this.selectedPlatform) {
|
if (!this.selectedPlatform) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.service.http.request('GET', `assets/mocks/platform/${this.selectedPlatform.enName}.json`).subscribe((res: any) => {
|
this.service.http.request('GET', `assets/mocks/platform/${this.selectedPlatform.enName}.json`).subscribe((res: any) => {
|
||||||
|
console.log(res);
|
||||||
|
|
||||||
this.addMenu(res.menu);
|
this.addMenu(res.menu);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
{
|
{
|
||||||
"success": true,
|
|
||||||
"data": {
|
|
||||||
"menu": [
|
"menu": [
|
||||||
{
|
{
|
||||||
"text": "样例",
|
"text": "主导航",
|
||||||
"hideInBreadcrumb": true,
|
"hideInBreadcrumb": true,
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
@ -463,4 +461,3 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user