This commit is contained in:
Taric Xin
2021-12-30 17:07:30 +08:00
parent bee71216b0
commit 98879c08d2
3 changed files with 472 additions and 469 deletions

View File

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

View File

@ -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 }) {
@ -45,7 +45,7 @@ export class MenuManagerComponentsIndexComponent implements OnInit {
} }
loadMenus(appId: string) { 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); console.log(res);
this.menus = res; this.menus = res;
@ -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);
}); });
} }

View File

@ -1,466 +1,463 @@
{ {
"success": true, "menu": [
"data": { {
"menu": [ "text": "主导航",
{ "hideInBreadcrumb": true,
"text": "样例", "children": [
"hideInBreadcrumb": true, {
"children": [ "text": "用户中心",
{ "icon": "anticon anticon-dashboard",
"text": "用户中心", "group": true,
"icon": "anticon anticon-dashboard", "children": [
"group": true, {
"children": [ "text": "货主管理",
{ "icon": "anticon anticon-dashboard",
"text": "货主管理", "link": "/demo/zorro",
"icon": "anticon anticon-dashboard", "children": [
"link": "/demo/zorro", {
"children": [ "text": "企业列表",
{ "icon": "anticon anticon-dashboard",
"text": "企业列表", "link": "/usercenter/freight/list"
"icon": "anticon anticon-dashboard", },
"link": "/usercenter/freight/list" {
}, "text": "道运证",
{ "hide": true,
"text": "道运证", "icon": "anticon anticon-dashboard",
"hide": true, "link": "/usercenter/freight/list/view/:id"
"icon": "anticon anticon-dashboard", },
"link": "/usercenter/freight/list/view/:id" {
}, "text": "货主详情",
{ "hide": true,
"text": "货主详情", "icon": "anticon anticon-dashboard",
"hide": true, "link": "/usercenter/freight/list/detail/:id"
"icon": "anticon anticon-dashboard", },
"link": "/usercenter/freight/list/detail/:id" {
}, "text": "企业认证",
{ "hide": true,
"text": "企业认证", "icon": "anticon anticon-dashboard",
"hide": true, "link": "/usercenter/freight/new"
"icon": "anticon anticon-dashboard", },
"link": "/usercenter/freight/new" {
}, "text": "企业审核列表",
{ "icon": "anticon anticon-dashboard",
"text": "企业审核列表", "link": "/usercenter/freight/enterprise"
"icon": "anticon anticon-dashboard", },
"link": "/usercenter/freight/enterprise" {
}, "text": "企业审核列表详情",
{ "hide": true,
"text": "企业审核列表详情", "icon": "anticon anticon-dashboard",
"hide": true, "link": "/usercenter/freight/enterprise/view/:id"
"icon": "anticon anticon-dashboard", },
"link": "/usercenter/freight/enterprise/view/:id" {
}, "text": "货主员工列表",
{ "icon": "anticon anticon-dashboard",
"text": "货主员工列表", "link": "/usercenter/freight/user"
"icon": "anticon anticon-dashboard", }
"link": "/usercenter/freight/user" ]
} },
] {
}, "text": "司机管理",
{ "icon": "anticon anticon-dashboard",
"text": "司机管理", "link": "/demo/zorro",
"icon": "anticon anticon-dashboard", "children": [
"link": "/demo/zorro", {
"children": [ "text": "司机列表",
{ "icon": "anticon anticon-dashboard",
"text": "司机列表", "link": "/usercenter/driver"
"icon": "anticon anticon-dashboard", },
"link": "/usercenter/driver" {
}, "text": "司机详情",
{ "hide": true,
"text": "司机详情", "icon": "anticon anticon-dashboard",
"hide": true, "link": "/usercenter/driver/detail/:id"
"icon": "anticon anticon-dashboard", },
"link": "/usercenter/driver/detail/:id" {
}, "text": "车队长列表",
{ "icon": "anticon anticon-dashboard",
"text": "车队长列表", "link": "/usercenter/driver/captain"
"icon": "anticon anticon-dashboard", }
"link": "/usercenter/driver/captain" ]
} }
] ]
} },
] {
}, "text": "运力管理",
{ "icon": "anticon anticon-dashboard",
"text": "运力管理", "group": true,
"icon": "anticon anticon-dashboard", "children": [
"group": true, {
"children": [ "text": "车辆列表",
{ "link": "/vehicle/list"
"text": "车辆列表", },
"link": "/vehicle/list" {
}, "hide": true,
{ "text": "车辆列表详情",
"hide": true, "link": "/vehicle/list/detail/:id"
"text": "车辆列表详情", },
"link": "/vehicle/list/detail/:id" {
}, "text": "车辆审核列表",
{ "link": "/vehicle/audit"
"text": "车辆审核列表", },
"link": "/vehicle/audit" {
}, "hide": true,
{ "text": "车辆审核列表详情",
"hide": true, "link": "/vehicle/audit/detail/:id"
"text": "车辆审核列表详情", }
"link": "/vehicle/audit/detail/:id" ]
} },
] {
}, "text": "货源管理",
{ "icon": "anticon anticon-dashboard",
"text": "货源管理", "group": true,
"icon": "anticon anticon-dashboard", "children": [
"group": true, {
"children": [ "text": "货源管理",
{ "icon": "anticon anticon-dashboard",
"text": "货源管理", "link": "/supply-management/index",
"icon": "anticon anticon-dashboard", "reuse": true
"link": "/supply-management/index", },
"reuse": true {
}, "text": "货源管理",
{ "icon": "anticon anticon-dashboard",
"text": "货源管理", "link": "/supply-management/index",
"icon": "anticon anticon-dashboard", "hide": true
"link": "/supply-management/index", },
"hide": true {
}, "text": "货源详情",
{ "icon": "anticon anticon-dashboard",
"text": "货源详情", "link": "/supply-management/bulk-detail",
"icon": "anticon anticon-dashboard", "hide": true
"link": "/supply-management/bulk-detail", },
"hide": true {
}, "text": "修改货源",
{ "icon": "anticon anticon-dashboard",
"text": "修改货源", "link": "/supply-management/vehicle-amend/:id",
"icon": "anticon anticon-dashboard", "hide": true
"link": "/supply-management/vehicle-amend/:id", },
"hide": true {
}, "text": "货源详情",
{ "icon": "anticon anticon-dashboard",
"text": "货源详情", "link": "/supply-management/vehicle-detail/:id",
"icon": "anticon anticon-dashboard", "hide": true
"link": "/supply-management/vehicle-detail/:id", }
"hide": true ]
} },
] {
}, "text": "订单管理",
{ "icon": "anticon anticon-dashboard",
"text": "订单管理", "group": true,
"icon": "anticon anticon-dashboard", "children": [
"group": true, {
"children": [ "text": "整车订单",
{ "icon": "anticon anticon-dashboard",
"text": "整车订单", "link": "/order-management/vehicle",
"icon": "anticon anticon-dashboard", "reuse": true
"link": "/order-management/vehicle", },
"reuse": true {
}, "text": "大宗订单",
{ "icon": "anticon anticon-dashboard",
"text": "大宗订单", "link": "/order-management/bulk"
"icon": "anticon anticon-dashboard", },
"link": "/order-management/bulk" {
}, "text": "结算单",
{ "children": [
"text": "结算单", {
"children": [ "text": "司机管理",
{ "icon": "anticon anticon-dashboard",
"text": "司机管理", "link": "/order-management/driver-manage"
"icon": "anticon anticon-dashboard", },
"link": "/order-management/driver-manage" {
}, "text": "车辆管理",
{ "icon": "anticon anticon-dashboard",
"text": "车辆管理", "link": "/order-management/car-manage"
"icon": "anticon anticon-dashboard", }
"link": "/order-management/car-manage" ]
} },
] {
}, "text": "补录单",
{ "children": [
"text": "补录单", {
"children": [ "text": "补录运单",
{ "icon": "anticon anticon-dashboard",
"text": "补录运单", "link": "/order-management/additionalc"
"icon": "anticon anticon-dashboard", },
"link": "/order-management/additionalc" {
}, "text": "补录运单详情",
{ "icon": "anticon anticon-dashboard",
"text": "补录运单详情", "link": "/order-management/additionalc-detail/:id",
"icon": "anticon anticon-dashboard", "hide": true
"link": "/order-management/additionalc-detail/:id", }
"hide": true ]
} },
] {
}, "text": "风险单管理",
{ "icon": "anticon anticon-dashboard",
"text": "风险单管理", "link": "/order-management/risk"
"icon": "anticon anticon-dashboard", },
"link": "/order-management/risk" {
}, "text": "投诉管理",
{ "icon": "anticon anticon-dashboard",
"text": "投诉管理", "link": "/order-management/complaint"
"icon": "anticon anticon-dashboard", },
"link": "/order-management/complaint" {
}, "text": "整车订单详情",
{ "icon": "anticon anticon-dashboard",
"text": "整车订单详情", "link": "/order-management/vehicle-detail/:id",
"icon": "anticon anticon-dashboard", "hide": true
"link": "/order-management/vehicle-detail/:id", },
"hide": true {
}, "text": "大宗订单详情",
{ "icon": "anticon anticon-dashboard",
"text": "大宗订单详情", "link": "/order-management/bulk-detail/:id",
"icon": "anticon anticon-dashboard", "hide": true
"link": "/order-management/bulk-detail/:id", },
"hide": true {
}, "text": "货源详情",
{ "icon": "anticon anticon-dashboard",
"text": "货源详情", "link": "/order-management/vehicle-detail",
"icon": "anticon anticon-dashboard", "hide": true
"link": "/order-management/vehicle-detail", }
"hide": true ]
} },
] {
}, "text": "运单管理",
{ "icon": "anticon anticon-dashboard",
"text": "运单管理", "group": true,
"icon": "anticon anticon-dashboard", "children": [
"group": true, {
"children": [ "text": "整车运单",
{ "link": "/waybill-management/vehicle"
"text": "整车运单", },
"link": "/waybill-management/vehicle" {
}, "hide": true,
{ "text": "整车运单详情",
"hide": true, "link": "/waybill-management/vehicle-detail/:id"
"text": "整车运单详情", },
"link": "/waybill-management/vehicle-detail/:id" {
}, "text": "大宗运单",
{ "link": "/waybill-management/bulk"
"text": "大宗运单", },
"link": "/waybill-management/bulk" {
}, "hide": true,
{ "text": "大宗运单详情",
"hide": true, "link": "/waybill-management/bulk-detail/:id"
"text": "大宗运单详情", }
"link": "/waybill-management/bulk-detail/:id" ]
} },
] {
}, "text": "财务管理",
{ "icon": "anticon anticon-dashboard",
"text": "财务管理", "group": true,
"icon": "anticon anticon-dashboard", "children": [
"group": true, {
"children": [ "text": "费用管理",
{ "link": "/financial-management/cost-management"
"text": "费用管理", },
"link": "/financial-management/cost-management" {
}, "text": "费用浏览",
{ "hide": true,
"text": "费用浏览", "link": "/financial-management/cost-management/detail/:id"
"hide": true, },
"link": "/financial-management/cost-management/detail/:id" {
}, "text": "应收费用单",
{ "hide": true,
"text": "应收费用单", "link": "/financial-management/cost-management/expenses-receivable/:id"
"hide": true, },
"link": "/financial-management/cost-management/expenses-receivable/:id" {
}, "text": "应付费用单",
{ "hide": true,
"text": "应付费用单", "link": "/financial-management/cost-management/expenses-payable/:id"
"hide": true, },
"link": "/financial-management/cost-management/expenses-payable/:id" {
}, "text": "货主账户",
{ "link": "/financial-management/freight-account"
"text": "货主账户", },
"link": "/financial-management/freight-account" {
}, "text": "货主账户详情",
{ "hide": true,
"text": "货主账户详情", "link": "/financial-management/freight-account/detail/:id"
"hide": true, },
"link": "/financial-management/freight-account/detail/:id" {
}, "text": "司机账户",
{ "link": "/financial-management/driver-account"
"text": "司机账户", },
"link": "/financial-management/driver-account" {
}, "text": "司机账户详情",
{ "hide": true,
"text": "司机账户详情", "link": "/financial-management/driver-account/detail/:id"
"hide": true, },
"link": "/financial-management/driver-account/detail/:id" {
}, "text": "充值记录",
{ "link": "/financial-management/recharge-record"
"text": "充值记录", },
"link": "/financial-management/recharge-record" {
}, "text": "提现记录",
{ "link": "/financial-management/withdrawals-record"
"text": "提现记录", },
"link": "/financial-management/withdrawals-record" {
}, "text": "提现详情",
{ "hide": true,
"text": "提现详情", "link": "/financial-management/withdrawals-record/detail/:id"
"hide": true, },
"link": "/financial-management/withdrawals-record/detail/:id" {
}, "text": "异常入金",
{ "link": "/financial-management/abnormal-gold"
"text": "异常入金", },
"link": "/financial-management/abnormal-gold" {
}, "text": "支付记录",
{ "link": "/financial-management/payment-record"
"text": "支付记录", },
"link": "/financial-management/payment-record" {
}, "text": "交易流水",
{ "link": "/financial-management/transaction-flow"
"text": "交易流水", }
"link": "/financial-management/transaction-flow" ]
} },
] {
}, "text": "票务管理",
{ "icon": "anticon anticon-dashboard",
"text": "票务管理", "group": true,
"icon": "anticon anticon-dashboard", "children": [
"group": true, {
"children": [ "text": "销项发票",
{ "children": [
"text": "销项发票", {
"children": [ "text": "开票申请",
{ "link": "/ticket/invoice-requested"
"text": "开票申请", },
"link": "/ticket/invoice-requested" {
}, "text": "开票订单明细",
{ "link": "/ticket/invoice-requested/detail/:id",
"text": "开票订单明细", "hide": true
"link": "/ticket/invoice-requested/detail/:id", },
"hide": true {
}, "text": "销票处理",
{ "link": "/ticket/cancellation-invoice"
"text": "销票处理", },
"link": "/ticket/cancellation-invoice" {
}, "text": "销票订单明细",
{ "link": "/ticket/cancellation-invoice/detail/:id",
"text": "销票订单明细", "hide": true
"link": "/ticket/cancellation-invoice/detail/:id", },
"hide": true {
}, "text": "已开发票",
{ "link": "/ticket/invoice-list"
"text": "已开发票", },
"link": "/ticket/invoice-list" {
}, "text": "已开订单明细",
{ "link": "/ticket/invoice-list/detail/:id",
"text": "已开订单明细", "hide": true
"link": "/ticket/invoice-list/detail/:id", }
"hide": true ]
} },
] {
}, "text": "ETC发票",
{ "children": [
"text": "ETC发票", {
"children": [ "text": "申请发票",
{ "link": "/ticket/etc-invoice-requested"
"text": "申请发票", },
"link": "/ticket/etc-invoice-requested" {
}, "text": "运单开票记录",
{ "link": "/ticket/etc-invoice-list"
"text": "运单开票记录", },
"link": "/ticket/etc-invoice-list" {
}, "text": "已开发票",
{ "link": "/ticket/etc-invoiced-logs"
"text": "已开发票", },
"link": "/ticket/etc-invoiced-logs" {
}, "text": "黑名单",
{ "link": "/ticket/etc-blacklist"
"text": "黑名单", }
"link": "/ticket/etc-blacklist" ]
} }
] ]
} },
] {
}, "text": "合同管理",
{ "icon": "anticon anticon-dashboard",
"text": "合同管理", "group": true,
"icon": "anticon anticon-dashboard", "children": [
"group": true, {
"children": [ "text": "合同列表",
{ "link": "/contract-management/list"
"text": "合同列表", }
"link": "/contract-management/list" ]
} },
] {
}, "text": "系统设置",
{ "icon": "anticon anticon-dashboard",
"text": "系统设置", "group": true,
"icon": "anticon anticon-dashboard", "children": [
"group": true, {
"children": [ "text": "员工管理",
{ "group": true,
"text": "员工管理", "children": [
"group": true, {
"children": [ "text": "员工管理",
{ "link": "/system/staff-management"
"text": "员工管理", },
"link": "/system/staff-management" {
}, "text": "角色管理",
{ "link": "/system/role-management"
"text": "角色管理", }
"link": "/system/role-management" ]
} },
] {
}, "text": "CRM客户管理",
{ "link": "/system/crm-management"
"text": "CRM客户管理", },
"link": "/system/crm-management" {
}, "text": "结算客户管理",
{ "link": "/system/close-account"
"text": "结算客户管理", },
"link": "/system/close-account" {
}, "text": "网络货运人",
{ "link": "/system/network-freight"
"text": "网络货运人", },
"link": "/system/network-freight" {
}, "text": "基础设置",
{ "link": "/system/basic-setting"
"text": "基础设置", },
"link": "/system/basic-setting" {
}, "text": "车型车长配置",
{ "link": "/system/cart-config"
"text": "车型车长配置", },
"link": "/system/cart-config" {
}, "text": "基础配置",
{ "link": "/system/basic-config"
"text": "基础配置", },
"link": "/system/basic-config" {
}, "text": "系统操作日志",
{ "link": "/system/system-logs"
"text": "系统操作日志", },
"link": "/system/system-logs" {
}, "text": "用户登录日志",
{ "link": "/system/user-logs"
"text": "用户登录日志", },
"link": "/system/user-logs" {
}, "text": "版本发布记录",
{ "link": "/system/version-logs"
"text": "版本发布记录", },
"link": "/system/version-logs" {
}, "text": "协议配置",
{ "link": "/system/agreement-config"
"text": "协议配置", },
"link": "/system/agreement-config" {
}, "text": "审核驳回理由配置",
{ "link": "/system/audit-reason-config"
"text": "审核驳回理由配置", },
"link": "/system/audit-reason-config" {
}, "text": "系统配置",
{ "link": "/system/system-config"
"text": "系统配置", },
"link": "/system/system-config" {
}, "text": "货物名称配置",
{ "link": "/system/goods-name-config"
"text": "货物名称配置", }
"link": "/system/goods-name-config" ]
} }
] ]
} }
] ]
}
]
}
} }