From 19fa0ddbd581003a98457440e9435dddd87dfb0f Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Mon, 20 Dec 2021 10:53:10 +0800 Subject: [PATCH] edit --- src/app/core/startup/startup.service.ts | 2 +- .../freight/user/detail/detail.component.less | 59 +- .../shared/services/business/user.service.ts | 17 +- src/assets/mocks/menu-data.json | 767 +++++++++--------- 4 files changed, 414 insertions(+), 431 deletions(-) diff --git a/src/app/core/startup/startup.service.ts b/src/app/core/startup/startup.service.ts index 705dd465..f3f5e62c 100644 --- a/src/app/core/startup/startup.service.ts +++ b/src/app/core/startup/startup.service.ts @@ -99,7 +99,7 @@ export class StartupService { const userData = this.httpClient.post(this.userSrv.$api_get_user_by_token,{}).pipe(map((res: any) => res.data)); // 菜单数据 - const menuData = this.httpClient.get('assets/mocks/menu-data.json').pipe(map((res: any) => res.menu)); + const menuData = this.httpClient.get('assets/mocks/menu-data.json').pipe(map((res: any) => res.data.menu)); return zip(appData, userData, menuData); } diff --git a/src/app/routes/usercenter/components/freight/user/detail/detail.component.less b/src/app/routes/usercenter/components/freight/user/detail/detail.component.less index 48f605d9..e30f5583 100644 --- a/src/app/routes/usercenter/components/freight/user/detail/detail.component.less +++ b/src/app/routes/usercenter/components/freight/user/detail/detail.component.less @@ -1,46 +1,25 @@ -@import '~@delon/theme/index'; +@import '../../../../less/edit.less'; + :host { ::ng-deep { - .ant-steps-dot { - .ant-steps-item-content { - width: 200px; - } - .ant-steps-item-icon { - margin-left: 96px; - } - .ant-steps-item-tail::after { - margin-left: 40px; - } - } - .success { - color: @success-color; - } + .user-info { + display : flex; + font-size: 16px; - .warning { - color: @warning-color; - } + .enterprise-name { + margin-right: 15px; + } - .error { - color: @error-color; + img { + width : 64px; + height : 64px; + margin-right : 15px; + border-radius: 50%; + } + + .user-info-des { + margin-bottom: 5px; + } } } - .mt16 { - margin-top: 16px; - } - .user-info { - display: flex; - font-size: 16px; - .enterprise-name { - margin-right: 15px; - } - img { - width: 64px; - height: 64px; - margin-right: 15px; - border-radius: 50%; - } - .user-info-des { - margin-bottom: 5px; - } - } -} +} \ No newline at end of file diff --git a/src/app/shared/services/business/user.service.ts b/src/app/shared/services/business/user.service.ts index e7935c01..ce398dbc 100644 --- a/src/app/shared/services/business/user.service.ts +++ b/src/app/shared/services/business/user.service.ts @@ -12,7 +12,7 @@ import { cacheConf } from '@conf/cache.conf'; import { eventConf } from '@conf/event.conf'; import { sysConf } from '@conf/sys.conf'; import { DA_SERVICE_TOKEN, ITokenService } from '@delon/auth'; -import { SettingsService } from '@delon/theme'; +import { MenuService, SettingsService } from '@delon/theme'; import { Observable } from 'rxjs'; import { map } from 'rxjs/operators'; import { BaseService } from '../core/base.service'; @@ -73,6 +73,7 @@ export class EAUserService extends BaseService { public cacheSrv: EACacheService, public eventSrv: EAEventService, public settings: SettingsService, + private menuService: MenuService, public router: Router, public ar: ActivatedRoute, @Inject(DA_SERVICE_TOKEN) public tokenSrv: ITokenService, @@ -143,14 +144,14 @@ export class EAUserService extends BaseService { * 加载用户菜单 */ async loadUserMenus() { - // return this.asyncRequest(this.$api_get_user_menus, { appId: sysConf.appId }).then(res => { - // this.cacheSrv.set(cacheConf.menu, res); - // }); - this.request('assets/mocks/menu-data.json').pipe( - map((res: any) => { + return this.asyncRequest('assets/mocks/menu-data.json', {}, 'GET').then(res => { this.cacheSrv.set(cacheConf.menu, res.menu); - }) - ); + this.menuService.add(res.menu); + }); + // this.request('assets/mocks/menu-data.json', {}, 'GET').subscribe((res: any) => { + // this.cacheSrv.set(cacheConf.menu, res.menu); + // this.menuService.add(res.menu); + // }); } /** diff --git a/src/assets/mocks/menu-data.json b/src/assets/mocks/menu-data.json index af6f1b9c..66f78c8d 100644 --- a/src/assets/mocks/menu-data.json +++ b/src/assets/mocks/menu-data.json @@ -1,384 +1,387 @@ { - "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": "货主账户", - "icon": "anticon anticon-dashboard", - "link": "/financial-management/freight-account" - }, - { - "text": "司机账户", - "icon": "anticon anticon-dashboard", - "link": "/financial-management/driver-account" - }, - { - "text": "充值记录", - "icon": "anticon anticon-dashboard", - "link": "/financial-management/recharge-record" - }, - { - "text": "提现记录", - "icon": "anticon anticon-dashboard", - "link": "/financial-management/withdrawals-record" - }, - { - "text": "账户主体", - "icon": "anticon anticon-dashboard", - "link": "/financial-management/main-account" - } - ] - }, - { - "text": "票务管理", - "icon": "anticon anticon-dashboard", - "group": true, - "children": [ - { - "text": "开票申请", - "link": "/ticket/invoice-requested" - }, - { - "text": "已开发票", - "link": "/ticket/invoice-list" - }, - { - "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": "员工管理", - "link": "/system/staff-management" - }, - { - "text": "角色管理", - "link": "/system/role-management" - }, - { - "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" - } - ] - } - ] - } - ] + "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": "货主账户", + "icon": "anticon anticon-dashboard", + "link": "/financial-management/freight-account" + }, + { + "text": "司机账户", + "icon": "anticon anticon-dashboard", + "link": "/financial-management/driver-account" + }, + { + "text": "充值记录", + "icon": "anticon anticon-dashboard", + "link": "/financial-management/recharge-record" + }, + { + "text": "提现记录", + "icon": "anticon anticon-dashboard", + "link": "/financial-management/withdrawals-record" + }, + { + "text": "账户主体", + "icon": "anticon anticon-dashboard", + "link": "/financial-management/main-account" + } + ] + }, + { + "text": "票务管理", + "icon": "anticon anticon-dashboard", + "group": true, + "children": [ + { + "text": "开票申请", + "link": "/ticket/invoice-requested" + }, + { + "text": "已开发票", + "link": "/ticket/invoice-list" + }, + { + "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": "员工管理", + "link": "/system/staff-management" + }, + { + "text": "角色管理", + "link": "/system/role-management" + }, + { + "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