diff --git a/src/app/routes/menu-manager/components/index/index.component.html b/src/app/routes/menu-manager/components/index/index.component.html index 6f3f72d1..46fe5229 100644 --- a/src/app/routes/menu-manager/components/index/index.component.html +++ b/src/app/routes/menu-manager/components/index/index.component.html @@ -1,5 +1,8 @@ - + \ No newline at end of file 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 f267e2ed..9e0d587b 100644 --- a/src/app/routes/menu-manager/components/index/index.component.ts +++ b/src/app/routes/menu-manager/components/index/index.component.ts @@ -32,7 +32,7 @@ export class MenuManagerComponentsIndexComponent implements OnInit { { name: '运营后台', appId: this.envSrv.env.appId, enName: 'tms-obc-web' } ]; this.selectedPlatform = this.platforms[0]; - this.platformChange(this.selectedPlatform); + // this.platformChange(this.selectedPlatform); } platformChange(e: { name: string; appId: string }) { @@ -45,7 +45,7 @@ export class MenuManagerComponentsIndexComponent implements OnInit { } loadMenus(appId: string) { - this.service.request(this.service.$api_get_one, { appId },'POST',false).subscribe(res => { + this.service.request(this.service.$api_get_one, { appId }, 'POST', false).subscribe(res => { console.log(res); this.menus = res; @@ -56,12 +56,15 @@ export class MenuManagerComponentsIndexComponent implements OnInit { console.log('editChanged', event); } - menuImport() { + menuImport(index: number) { + this.selectedPlatform = this.platforms[index]; if (!this.selectedPlatform) { return; } this.service.http.request('GET', `assets/mocks/platform/${this.selectedPlatform.enName}.json`).subscribe((res: any) => { + console.log(res); + this.addMenu(res.menu); }); } diff --git a/src/assets/mocks/platform/tms-obc-web.json b/src/assets/mocks/platform/tms-obc-web.json index fd9f7dbe..9abfd9fb 100644 --- a/src/assets/mocks/platform/tms-obc-web.json +++ b/src/assets/mocks/platform/tms-obc-web.json @@ -1,466 +1,463 @@ { - "success": true, - "data": { - "menu": [ - { - "text": "样例", - "hideInBreadcrumb": true, - "children": [ - { - "text": "用户中心", - "icon": "anticon anticon-dashboard", - "group": true, - "children": [ - { - "text": "货主管理", - "icon": "anticon anticon-dashboard", - "link": "/demo/zorro", - "children": [ - { - "text": "企业列表", - "icon": "anticon anticon-dashboard", - "link": "/usercenter/freight/list" - }, - { - "text": "道运证", - "hide": true, - "icon": "anticon anticon-dashboard", - "link": "/usercenter/freight/list/view/:id" - }, - { - "text": "货主详情", - "hide": true, - "icon": "anticon anticon-dashboard", - "link": "/usercenter/freight/list/detail/:id" - }, - { - "text": "企业认证", - "hide": true, - "icon": "anticon anticon-dashboard", - "link": "/usercenter/freight/new" - }, - { - "text": "企业审核列表", - "icon": "anticon anticon-dashboard", - "link": "/usercenter/freight/enterprise" - }, - { - "text": "企业审核列表详情", - "hide": true, - "icon": "anticon anticon-dashboard", - "link": "/usercenter/freight/enterprise/view/:id" - }, - { - "text": "货主员工列表", - "icon": "anticon anticon-dashboard", - "link": "/usercenter/freight/user" - } - ] - }, - { - "text": "司机管理", - "icon": "anticon anticon-dashboard", - "link": "/demo/zorro", - "children": [ - { - "text": "司机列表", - "icon": "anticon anticon-dashboard", - "link": "/usercenter/driver" - }, - { - "text": "司机详情", - "hide": true, - "icon": "anticon anticon-dashboard", - "link": "/usercenter/driver/detail/:id" - }, - { - "text": "车队长列表", - "icon": "anticon anticon-dashboard", - "link": "/usercenter/driver/captain" - } - ] - } - ] - }, - { - "text": "运力管理", - "icon": "anticon anticon-dashboard", - "group": true, - "children": [ - { - "text": "车辆列表", - "link": "/vehicle/list" - }, - { - "hide": true, - "text": "车辆列表详情", - "link": "/vehicle/list/detail/:id" - }, - { - "text": "车辆审核列表", - "link": "/vehicle/audit" - }, - { - "hide": true, - "text": "车辆审核列表详情", - "link": "/vehicle/audit/detail/:id" - } - ] - }, - { - "text": "货源管理", - "icon": "anticon anticon-dashboard", - "group": true, - "children": [ - { - "text": "货源管理", - "icon": "anticon anticon-dashboard", - "link": "/supply-management/index", - "reuse": true - }, - { - "text": "货源管理", - "icon": "anticon anticon-dashboard", - "link": "/supply-management/index", - "hide": true - }, - { - "text": "货源详情", - "icon": "anticon anticon-dashboard", - "link": "/supply-management/bulk-detail", - "hide": true - }, - { - "text": "修改货源", - "icon": "anticon anticon-dashboard", - "link": "/supply-management/vehicle-amend/:id", - "hide": true - }, - { - "text": "货源详情", - "icon": "anticon anticon-dashboard", - "link": "/supply-management/vehicle-detail/:id", - "hide": true - } - ] - }, - { - "text": "订单管理", - "icon": "anticon anticon-dashboard", - "group": true, - "children": [ - { - "text": "整车订单", - "icon": "anticon anticon-dashboard", - "link": "/order-management/vehicle", - "reuse": true - }, - { - "text": "大宗订单", - "icon": "anticon anticon-dashboard", - "link": "/order-management/bulk" - }, - { - "text": "结算单", - "children": [ - { - "text": "司机管理", - "icon": "anticon anticon-dashboard", - "link": "/order-management/driver-manage" - }, - { - "text": "车辆管理", - "icon": "anticon anticon-dashboard", - "link": "/order-management/car-manage" - } - ] - }, - { - "text": "补录单", - "children": [ - { - "text": "补录运单", - "icon": "anticon anticon-dashboard", - "link": "/order-management/additionalc" - }, - { - "text": "补录运单详情", - "icon": "anticon anticon-dashboard", - "link": "/order-management/additionalc-detail/:id", - "hide": true - } - ] - }, - { - "text": "风险单管理", - "icon": "anticon anticon-dashboard", - "link": "/order-management/risk" - }, - { - "text": "投诉管理", - "icon": "anticon anticon-dashboard", - "link": "/order-management/complaint" - }, - { - "text": "整车订单详情", - "icon": "anticon anticon-dashboard", - "link": "/order-management/vehicle-detail/:id", - "hide": true - }, - { - "text": "大宗订单详情", - "icon": "anticon anticon-dashboard", - "link": "/order-management/bulk-detail/:id", - "hide": true - }, - { - "text": "货源详情", - "icon": "anticon anticon-dashboard", - "link": "/order-management/vehicle-detail", - "hide": true - } - ] - }, - { - "text": "运单管理", - "icon": "anticon anticon-dashboard", - "group": true, - "children": [ - { - "text": "整车运单", - "link": "/waybill-management/vehicle" - }, - { - "hide": true, - "text": "整车运单详情", - "link": "/waybill-management/vehicle-detail/:id" - }, - { - "text": "大宗运单", - "link": "/waybill-management/bulk" - }, - { - "hide": true, - "text": "大宗运单详情", - "link": "/waybill-management/bulk-detail/:id" - } - ] - }, - { - "text": "财务管理", - "icon": "anticon anticon-dashboard", - "group": true, - "children": [ - { - "text": "费用管理", - "link": "/financial-management/cost-management" - }, - { - "text": "费用浏览", - "hide": true, - "link": "/financial-management/cost-management/detail/:id" - }, - { - "text": "应收费用单", - "hide": true, - "link": "/financial-management/cost-management/expenses-receivable/:id" - }, - { - "text": "应付费用单", - "hide": true, - "link": "/financial-management/cost-management/expenses-payable/:id" - }, - { - "text": "货主账户", - "link": "/financial-management/freight-account" - }, - { - "text": "货主账户详情", - "hide": true, - "link": "/financial-management/freight-account/detail/:id" - }, - { - "text": "司机账户", - "link": "/financial-management/driver-account" - }, - { - "text": "司机账户详情", - "hide": true, - "link": "/financial-management/driver-account/detail/:id" - }, - { - "text": "充值记录", - "link": "/financial-management/recharge-record" - }, - { - "text": "提现记录", - "link": "/financial-management/withdrawals-record" - }, - { - "text": "提现详情", - "hide": true, - "link": "/financial-management/withdrawals-record/detail/:id" - }, - { - "text": "异常入金", - "link": "/financial-management/abnormal-gold" - }, - { - "text": "支付记录", - "link": "/financial-management/payment-record" - }, - { - "text": "交易流水", - "link": "/financial-management/transaction-flow" - } - ] - }, - { - "text": "票务管理", - "icon": "anticon anticon-dashboard", - "group": true, - "children": [ - { - "text": "销项发票", - "children": [ - { - "text": "开票申请", - "link": "/ticket/invoice-requested" - }, - { - "text": "开票订单明细", - "link": "/ticket/invoice-requested/detail/:id", - "hide": true - }, - { - "text": "销票处理", - "link": "/ticket/cancellation-invoice" - }, - { - "text": "销票订单明细", - "link": "/ticket/cancellation-invoice/detail/:id", - "hide": true - }, - { - "text": "已开发票", - "link": "/ticket/invoice-list" - }, - { - "text": "已开订单明细", - "link": "/ticket/invoice-list/detail/:id", - "hide": true - } - ] - }, - { - "text": "ETC发票", - "children": [ - { - "text": "申请发票", - "link": "/ticket/etc-invoice-requested" - }, - { - "text": "运单开票记录", - "link": "/ticket/etc-invoice-list" - }, - { - "text": "已开发票", - "link": "/ticket/etc-invoiced-logs" - }, - { - "text": "黑名单", - "link": "/ticket/etc-blacklist" - } - ] - } - ] - }, - { - "text": "合同管理", - "icon": "anticon anticon-dashboard", - "group": true, - "children": [ - { - "text": "合同列表", - "link": "/contract-management/list" - } - ] - }, - { - "text": "系统设置", - "icon": "anticon anticon-dashboard", - "group": true, - "children": [ - { - "text": "员工管理", - "group": true, - "children": [ - { - "text": "员工管理", - "link": "/system/staff-management" - }, - { - "text": "角色管理", - "link": "/system/role-management" - } - ] - }, - { - "text": "CRM客户管理", - "link": "/system/crm-management" - }, - { - "text": "结算客户管理", - "link": "/system/close-account" - }, - { - "text": "网络货运人", - "link": "/system/network-freight" - }, - { - "text": "基础设置", - "link": "/system/basic-setting" - }, - { - "text": "车型车长配置", - "link": "/system/cart-config" - }, - { - "text": "基础配置", - "link": "/system/basic-config" - }, - { - "text": "系统操作日志", - "link": "/system/system-logs" - }, - { - "text": "用户登录日志", - "link": "/system/user-logs" - }, - { - "text": "版本发布记录", - "link": "/system/version-logs" - }, - { - "text": "协议配置", - "link": "/system/agreement-config" - }, - { - "text": "审核驳回理由配置", - "link": "/system/audit-reason-config" - }, - { - "text": "系统配置", - "link": "/system/system-config" - }, - { - "text": "货物名称配置", - "link": "/system/goods-name-config" - } - ] - } - ] - } - ] - } + "menu": [ + { + "text": "主导航", + "hideInBreadcrumb": true, + "children": [ + { + "text": "用户中心", + "icon": "anticon anticon-dashboard", + "group": true, + "children": [ + { + "text": "货主管理", + "icon": "anticon anticon-dashboard", + "link": "/demo/zorro", + "children": [ + { + "text": "企业列表", + "icon": "anticon anticon-dashboard", + "link": "/usercenter/freight/list" + }, + { + "text": "道运证", + "hide": true, + "icon": "anticon anticon-dashboard", + "link": "/usercenter/freight/list/view/:id" + }, + { + "text": "货主详情", + "hide": true, + "icon": "anticon anticon-dashboard", + "link": "/usercenter/freight/list/detail/:id" + }, + { + "text": "企业认证", + "hide": true, + "icon": "anticon anticon-dashboard", + "link": "/usercenter/freight/new" + }, + { + "text": "企业审核列表", + "icon": "anticon anticon-dashboard", + "link": "/usercenter/freight/enterprise" + }, + { + "text": "企业审核列表详情", + "hide": true, + "icon": "anticon anticon-dashboard", + "link": "/usercenter/freight/enterprise/view/:id" + }, + { + "text": "货主员工列表", + "icon": "anticon anticon-dashboard", + "link": "/usercenter/freight/user" + } + ] + }, + { + "text": "司机管理", + "icon": "anticon anticon-dashboard", + "link": "/demo/zorro", + "children": [ + { + "text": "司机列表", + "icon": "anticon anticon-dashboard", + "link": "/usercenter/driver" + }, + { + "text": "司机详情", + "hide": true, + "icon": "anticon anticon-dashboard", + "link": "/usercenter/driver/detail/:id" + }, + { + "text": "车队长列表", + "icon": "anticon anticon-dashboard", + "link": "/usercenter/driver/captain" + } + ] + } + ] + }, + { + "text": "运力管理", + "icon": "anticon anticon-dashboard", + "group": true, + "children": [ + { + "text": "车辆列表", + "link": "/vehicle/list" + }, + { + "hide": true, + "text": "车辆列表详情", + "link": "/vehicle/list/detail/:id" + }, + { + "text": "车辆审核列表", + "link": "/vehicle/audit" + }, + { + "hide": true, + "text": "车辆审核列表详情", + "link": "/vehicle/audit/detail/:id" + } + ] + }, + { + "text": "货源管理", + "icon": "anticon anticon-dashboard", + "group": true, + "children": [ + { + "text": "货源管理", + "icon": "anticon anticon-dashboard", + "link": "/supply-management/index", + "reuse": true + }, + { + "text": "货源管理", + "icon": "anticon anticon-dashboard", + "link": "/supply-management/index", + "hide": true + }, + { + "text": "货源详情", + "icon": "anticon anticon-dashboard", + "link": "/supply-management/bulk-detail", + "hide": true + }, + { + "text": "修改货源", + "icon": "anticon anticon-dashboard", + "link": "/supply-management/vehicle-amend/:id", + "hide": true + }, + { + "text": "货源详情", + "icon": "anticon anticon-dashboard", + "link": "/supply-management/vehicle-detail/:id", + "hide": true + } + ] + }, + { + "text": "订单管理", + "icon": "anticon anticon-dashboard", + "group": true, + "children": [ + { + "text": "整车订单", + "icon": "anticon anticon-dashboard", + "link": "/order-management/vehicle", + "reuse": true + }, + { + "text": "大宗订单", + "icon": "anticon anticon-dashboard", + "link": "/order-management/bulk" + }, + { + "text": "结算单", + "children": [ + { + "text": "司机管理", + "icon": "anticon anticon-dashboard", + "link": "/order-management/driver-manage" + }, + { + "text": "车辆管理", + "icon": "anticon anticon-dashboard", + "link": "/order-management/car-manage" + } + ] + }, + { + "text": "补录单", + "children": [ + { + "text": "补录运单", + "icon": "anticon anticon-dashboard", + "link": "/order-management/additionalc" + }, + { + "text": "补录运单详情", + "icon": "anticon anticon-dashboard", + "link": "/order-management/additionalc-detail/:id", + "hide": true + } + ] + }, + { + "text": "风险单管理", + "icon": "anticon anticon-dashboard", + "link": "/order-management/risk" + }, + { + "text": "投诉管理", + "icon": "anticon anticon-dashboard", + "link": "/order-management/complaint" + }, + { + "text": "整车订单详情", + "icon": "anticon anticon-dashboard", + "link": "/order-management/vehicle-detail/:id", + "hide": true + }, + { + "text": "大宗订单详情", + "icon": "anticon anticon-dashboard", + "link": "/order-management/bulk-detail/:id", + "hide": true + }, + { + "text": "货源详情", + "icon": "anticon anticon-dashboard", + "link": "/order-management/vehicle-detail", + "hide": true + } + ] + }, + { + "text": "运单管理", + "icon": "anticon anticon-dashboard", + "group": true, + "children": [ + { + "text": "整车运单", + "link": "/waybill-management/vehicle" + }, + { + "hide": true, + "text": "整车运单详情", + "link": "/waybill-management/vehicle-detail/:id" + }, + { + "text": "大宗运单", + "link": "/waybill-management/bulk" + }, + { + "hide": true, + "text": "大宗运单详情", + "link": "/waybill-management/bulk-detail/:id" + } + ] + }, + { + "text": "财务管理", + "icon": "anticon anticon-dashboard", + "group": true, + "children": [ + { + "text": "费用管理", + "link": "/financial-management/cost-management" + }, + { + "text": "费用浏览", + "hide": true, + "link": "/financial-management/cost-management/detail/:id" + }, + { + "text": "应收费用单", + "hide": true, + "link": "/financial-management/cost-management/expenses-receivable/:id" + }, + { + "text": "应付费用单", + "hide": true, + "link": "/financial-management/cost-management/expenses-payable/:id" + }, + { + "text": "货主账户", + "link": "/financial-management/freight-account" + }, + { + "text": "货主账户详情", + "hide": true, + "link": "/financial-management/freight-account/detail/:id" + }, + { + "text": "司机账户", + "link": "/financial-management/driver-account" + }, + { + "text": "司机账户详情", + "hide": true, + "link": "/financial-management/driver-account/detail/:id" + }, + { + "text": "充值记录", + "link": "/financial-management/recharge-record" + }, + { + "text": "提现记录", + "link": "/financial-management/withdrawals-record" + }, + { + "text": "提现详情", + "hide": true, + "link": "/financial-management/withdrawals-record/detail/:id" + }, + { + "text": "异常入金", + "link": "/financial-management/abnormal-gold" + }, + { + "text": "支付记录", + "link": "/financial-management/payment-record" + }, + { + "text": "交易流水", + "link": "/financial-management/transaction-flow" + } + ] + }, + { + "text": "票务管理", + "icon": "anticon anticon-dashboard", + "group": true, + "children": [ + { + "text": "销项发票", + "children": [ + { + "text": "开票申请", + "link": "/ticket/invoice-requested" + }, + { + "text": "开票订单明细", + "link": "/ticket/invoice-requested/detail/:id", + "hide": true + }, + { + "text": "销票处理", + "link": "/ticket/cancellation-invoice" + }, + { + "text": "销票订单明细", + "link": "/ticket/cancellation-invoice/detail/:id", + "hide": true + }, + { + "text": "已开发票", + "link": "/ticket/invoice-list" + }, + { + "text": "已开订单明细", + "link": "/ticket/invoice-list/detail/:id", + "hide": true + } + ] + }, + { + "text": "ETC发票", + "children": [ + { + "text": "申请发票", + "link": "/ticket/etc-invoice-requested" + }, + { + "text": "运单开票记录", + "link": "/ticket/etc-invoice-list" + }, + { + "text": "已开发票", + "link": "/ticket/etc-invoiced-logs" + }, + { + "text": "黑名单", + "link": "/ticket/etc-blacklist" + } + ] + } + ] + }, + { + "text": "合同管理", + "icon": "anticon anticon-dashboard", + "group": true, + "children": [ + { + "text": "合同列表", + "link": "/contract-management/list" + } + ] + }, + { + "text": "系统设置", + "icon": "anticon anticon-dashboard", + "group": true, + "children": [ + { + "text": "员工管理", + "group": true, + "children": [ + { + "text": "员工管理", + "link": "/system/staff-management" + }, + { + "text": "角色管理", + "link": "/system/role-management" + } + ] + }, + { + "text": "CRM客户管理", + "link": "/system/crm-management" + }, + { + "text": "结算客户管理", + "link": "/system/close-account" + }, + { + "text": "网络货运人", + "link": "/system/network-freight" + }, + { + "text": "基础设置", + "link": "/system/basic-setting" + }, + { + "text": "车型车长配置", + "link": "/system/cart-config" + }, + { + "text": "基础配置", + "link": "/system/basic-config" + }, + { + "text": "系统操作日志", + "link": "/system/system-logs" + }, + { + "text": "用户登录日志", + "link": "/system/user-logs" + }, + { + "text": "版本发布记录", + "link": "/system/version-logs" + }, + { + "text": "协议配置", + "link": "/system/agreement-config" + }, + { + "text": "审核驳回理由配置", + "link": "/system/audit-reason-config" + }, + { + "text": "系统配置", + "link": "/system/system-config" + }, + { + "text": "货物名称配置", + "link": "/system/goods-name-config" + } + ] + } + ] + } + ] } \ No newline at end of file