diff --git a/src/app/routes/menu-manager/components/index/index.component.ts b/src/app/routes/menu-manager/components/index/index.component.ts
index bd1c0f33..c828397d 100644
--- a/src/app/routes/menu-manager/components/index/index.component.ts
+++ b/src/app/routes/menu-manager/components/index/index.component.ts
@@ -1,12 +1,13 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { Menu } from '@delon/theme';
+import { EAEnvironmentService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal';
import { MenuManagerService } from './../../services/menu-manager.service';
@Component({
selector: 'app-menu-manager-components-index',
templateUrl: './index.component.html',
- styleUrls: ['./index.component.less'],
+ styleUrls: ['./index.component.less']
})
export class MenuManagerComponentsIndexComponent implements OnInit {
selectedPlatform!: { name: string; appId: string; enName: string };
@@ -17,9 +18,9 @@ export class MenuManagerComponentsIndexComponent implements OnInit {
dropType = {
dropPrev: true,
dropNext: true,
- dropInner: true,
+ dropInner: true
};
- constructor(public service: MenuManagerService, private modal: NzModalService) { }
+ constructor(private envSrv: EAEnvironmentService, public service: MenuManagerService, private modal: NzModalService) {}
ngOnInit(): void {
this.initData();
@@ -27,13 +28,10 @@ export class MenuManagerComponentsIndexComponent implements OnInit {
initData(): void {
this.platforms = [
- { name: '运维平台', appId: 'D40B4EFC33FC4803864934872A11B0CE', enName: 'scm-soc-ui' },
- { name: '运营后台', appId: '2537B72DDA534361AE4931903F0BFEB3', enName: 'scm-ows-ui' },
- { name: '供应商平台', appId: '0CEE254099064665872B777CF9FCBB6B', enName: 'scm-cvc-ui' },
- // { name: '代理商平台', appId: '737BB699C8894B2D81F21FC667A21169', enName: 'scm-cac-ui' },
- // { name: '分销商平台', appId: '0D00C7CC306A4CACA5AF95BBD1251980', enName: 'scm-cdc-ui' },
- // { name: '开放平台', appId: '7B216DD933CB4922BD9094ED8F96B0B4', enName: 'scm-opc-ui' },
+ { name: '货主PC', appId: 'A48F72F0A304427F921794BAD86B3522', enName: 'tms-smc-web' },
+ { name: '运营后台', appId: this.envSrv.env.appId, enName: 'tms-obc-web' }
];
+ this.selectedPlatform = this.platforms[0];
}
platformChange(e: { name: string; appId: string }) {
@@ -46,41 +44,40 @@ export class MenuManagerComponentsIndexComponent implements OnInit {
}
loadMenus(appId: string) {
- this.service.request(this.service.$api_get_all, { appId }, 'POST', true, 'FORM').subscribe((res) => {
+ this.service.request(this.service.$api_get_all, { appId }, 'POST', true, 'FORM').subscribe(res => {
+ console.log(res);
+
this.menus = res;
});
}
-
editValueChange(event: any) {
console.log('editChanged', event);
}
-
menuImport() {
if (!this.selectedPlatform) {
return;
}
- this.service.http.request('GET', `assets/tmp/_mock/platform/${this.selectedPlatform.enName}.json`).subscribe((res: any) => {
- // console.log(res);
+ this.service.http.request('GET', `assets/mocks/platform/${this.selectedPlatform.enName}.json`).subscribe((res: any) => {
this.addMenu(res.menu);
});
}
addMenu(menus: Array