This commit is contained in:
Taric Xin
2021-12-20 10:53:10 +08:00
parent 91dcc20d9a
commit 19fa0ddbd5
4 changed files with 414 additions and 431 deletions

View File

@ -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 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); return zip(appData, userData, menuData);
} }

View File

@ -1,46 +1,25 @@
@import '~@delon/theme/index'; @import '../../../../less/edit.less';
:host { :host {
::ng-deep { ::ng-deep {
.ant-steps-dot { .user-info {
.ant-steps-item-content { display : flex;
width: 200px; font-size: 16px;
}
.ant-steps-item-icon {
margin-left: 96px;
}
.ant-steps-item-tail::after {
margin-left: 40px;
}
}
.success {
color: @success-color;
}
.warning { .enterprise-name {
color: @warning-color; margin-right: 15px;
} }
.error { img {
color: @error-color; width : 64px;
} height : 64px;
} margin-right : 15px;
.mt16 { border-radius: 50%;
margin-top: 16px; }
}
.user-info { .user-info-des {
display: flex; margin-bottom: 5px;
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;
} }
} }
} }

View File

@ -12,7 +12,7 @@ import { cacheConf } from '@conf/cache.conf';
import { eventConf } from '@conf/event.conf'; import { eventConf } from '@conf/event.conf';
import { sysConf } from '@conf/sys.conf'; import { sysConf } from '@conf/sys.conf';
import { DA_SERVICE_TOKEN, ITokenService } from '@delon/auth'; import { DA_SERVICE_TOKEN, ITokenService } from '@delon/auth';
import { SettingsService } from '@delon/theme'; import { MenuService, SettingsService } from '@delon/theme';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { map } from 'rxjs/operators'; import { map } from 'rxjs/operators';
import { BaseService } from '../core/base.service'; import { BaseService } from '../core/base.service';
@ -73,6 +73,7 @@ export class EAUserService extends BaseService {
public cacheSrv: EACacheService, public cacheSrv: EACacheService,
public eventSrv: EAEventService, public eventSrv: EAEventService,
public settings: SettingsService, public settings: SettingsService,
private menuService: MenuService,
public router: Router, public router: Router,
public ar: ActivatedRoute, public ar: ActivatedRoute,
@Inject(DA_SERVICE_TOKEN) public tokenSrv: ITokenService, @Inject(DA_SERVICE_TOKEN) public tokenSrv: ITokenService,
@ -143,14 +144,14 @@ export class EAUserService extends BaseService {
* 加载用户菜单 * 加载用户菜单
*/ */
async loadUserMenus() { async loadUserMenus() {
// return this.asyncRequest(this.$api_get_user_menus, { appId: sysConf.appId }).then(res => { return this.asyncRequest('assets/mocks/menu-data.json', {}, 'GET').then(res => {
// this.cacheSrv.set(cacheConf.menu, res);
// });
this.request('assets/mocks/menu-data.json').pipe(
map((res: any) => {
this.cacheSrv.set(cacheConf.menu, res.menu); 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);
// });
} }
/** /**

View File

@ -1,384 +1,387 @@
{ {
"menu": [ "success": true,
{ "data": {
"text": "样例", "menu": [
"hideInBreadcrumb": true, {
"children": [ "text": "样例",
{ "hideInBreadcrumb": true,
"text": "用户中心", "children": [
"icon": "anticon anticon-dashboard", {
"group": true, "text": "用户中心",
"children": [ "icon": "anticon anticon-dashboard",
{ "group": true,
"text": "货主管理", "children": [
"icon": "anticon anticon-dashboard", {
"link": "/demo/zorro", "text": "货主管理",
"children": [ "icon": "anticon anticon-dashboard",
{ "link": "/demo/zorro",
"text": "企业列表", "children": [
"icon": "anticon anticon-dashboard", {
"link": "/usercenter/freight/list" "text": "企业列表",
}, "icon": "anticon anticon-dashboard",
{ "link": "/usercenter/freight/list"
"text": "道运证", },
"hide": true, {
"icon": "anticon anticon-dashboard", "text": "道运证",
"link": "/usercenter/freight/list/view/:id" "hide": true,
}, "icon": "anticon anticon-dashboard",
{ "link": "/usercenter/freight/list/view/:id"
"text": "货主详情", },
"hide": true, {
"icon": "anticon anticon-dashboard", "text": "货主详情",
"link": "/usercenter/freight/list/detail/:id" "hide": true,
}, "icon": "anticon anticon-dashboard",
{ "link": "/usercenter/freight/list/detail/:id"
"text": "企业认证", },
"hide": true, {
"icon": "anticon anticon-dashboard", "text": "企业认证",
"link": "/usercenter/freight/new" "hide": true,
}, "icon": "anticon anticon-dashboard",
{ "link": "/usercenter/freight/new"
"text": "企业审核列表", },
"icon": "anticon anticon-dashboard", {
"link": "/usercenter/freight/enterprise" "text": "企业审核列表",
}, "icon": "anticon anticon-dashboard",
{ "link": "/usercenter/freight/enterprise"
"text": "企业审核列表详情", },
"hide": true, {
"icon": "anticon anticon-dashboard", "text": "企业审核列表详情",
"link": "/usercenter/freight/enterprise/view/:id" "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": "/usercenter/freight/user"
}, }
{ ]
"text": "司机管理", },
"icon": "anticon anticon-dashboard", {
"link": "/demo/zorro", "text": "司机管理",
"children": [ "icon": "anticon anticon-dashboard",
{ "link": "/demo/zorro",
"text": "司机列表", "children": [
"icon": "anticon anticon-dashboard", {
"link": "/usercenter/driver" "text": "司机列表",
}, "icon": "anticon anticon-dashboard",
{ "link": "/usercenter/driver"
"text": "司机详情", },
"hide": true, {
"icon": "anticon anticon-dashboard", "text": "司机详情",
"link": "/usercenter/driver/detail/:id" "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",
] "link": "/usercenter/driver/captain"
} }
] ]
}, }
{ ]
"text": "运力管理", },
"icon": "anticon anticon-dashboard", {
"group": true, "text": "运力管理",
"children": [ "icon": "anticon anticon-dashboard",
{ "group": true,
"text": "车辆列表", "children": [
"link": "/vehicle/list" {
}, "text": "车辆列表",
{ "link": "/vehicle/list"
"hide": true, },
"text": "车辆列表详情", {
"link": "/vehicle/list/detail/:id" "hide": true,
}, "text": "车辆列表详情",
{ "link": "/vehicle/list/detail/:id"
"text": "车辆审核列表", },
"link": "/vehicle/audit" {
}, "text": "车辆审核列表",
{ "link": "/vehicle/audit"
"hide": true, },
"text": "车辆审核列表详情", {
"link": "/vehicle/audit/detail/:id" "hide": true,
} "text": "车辆审核列表详情",
] "link": "/vehicle/audit/detail/:id"
}, }
{ ]
"text": "货源管理", },
"icon": "anticon anticon-dashboard", {
"group": true, "text": "货源管理",
"children": [ "icon": "anticon anticon-dashboard",
{ "group": true,
"text": "货源管理", "children": [
"icon": "anticon anticon-dashboard", {
"link": "/supply-management/index", "text": "货源管理",
"reuse": true "icon": "anticon anticon-dashboard",
}, "link": "/supply-management/index",
{ "reuse": true
"text": "货源管理", },
"icon": "anticon anticon-dashboard", {
"link": "/supply-management/index", "text": "货源管理",
"hide": true "icon": "anticon anticon-dashboard",
}, "link": "/supply-management/index",
{ "hide": true
"text": "货源详情", },
"icon": "anticon anticon-dashboard", {
"link": "/supply-management/bulk-detail", "text": "货源详情",
"hide": true "icon": "anticon anticon-dashboard",
}, "link": "/supply-management/bulk-detail",
{ "hide": true
"text": "修改货源", },
"icon": "anticon anticon-dashboard", {
"link": "/supply-management/vehicle-amend/:id", "text": "修改货源",
"hide": true "icon": "anticon anticon-dashboard",
}, "link": "/supply-management/vehicle-amend/:id",
{ "hide": true
"text": "货源详情", },
"icon": "anticon anticon-dashboard", {
"link": "/supply-management/vehicle-detail/:id", "text": "货源详情",
"hide": true "icon": "anticon anticon-dashboard",
} "link": "/supply-management/vehicle-detail/:id",
] "hide": true
}, }
{ ]
"text": "订单管理", },
"icon": "anticon anticon-dashboard", {
"group": true, "text": "订单管理",
"children": [ "icon": "anticon anticon-dashboard",
{ "group": true,
"text": "整车订单", "children": [
"icon": "anticon anticon-dashboard", {
"link": "/order-management/vehicle", "text": "整车订单",
"reuse": true "icon": "anticon anticon-dashboard",
}, "link": "/order-management/vehicle",
{ "reuse": true
"text": "大宗订单", },
"icon": "anticon anticon-dashboard", {
"link": "/order-management/bulk" "text": "大宗订单",
}, "icon": "anticon anticon-dashboard",
{ "link": "/order-management/bulk"
"text": "结算单", },
"children": [ {
{ "text": "结算单",
"text": "司机管理", "children": [
"icon": "anticon anticon-dashboard", {
"link": "/order-management/driver-manage" "text": "司机管理",
}, "icon": "anticon anticon-dashboard",
{ "link": "/order-management/driver-manage"
"text": "车辆管理", },
"icon": "anticon anticon-dashboard", {
"link": "/order-management/car-manage" "text": "车辆管理",
} "icon": "anticon anticon-dashboard",
] "link": "/order-management/car-manage"
}, }
{ ]
"text": "补录单", },
"children": [ {
{ "text": "补录单",
"text": "补录运单", "children": [
"icon": "anticon anticon-dashboard", {
"link": "/order-management/additionalc" "text": "补录运单",
}, "icon": "anticon anticon-dashboard",
{ "link": "/order-management/additionalc"
"text": "补录运单详情", },
"icon": "anticon anticon-dashboard", {
"link": "/order-management/additionalc-detail/:id", "text": "补录运单详情",
"hide": true "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/risk"
"text": "投诉管理", },
"icon": "anticon anticon-dashboard", {
"link": "/order-management/complaint" "text": "投诉管理",
}, "icon": "anticon anticon-dashboard",
{ "link": "/order-management/complaint"
"text": "整车订单详情", },
"icon": "anticon anticon-dashboard", {
"link": "/order-management/vehicle-detail/:id", "text": "整车订单详情",
"hide": true "icon": "anticon anticon-dashboard",
}, "link": "/order-management/vehicle-detail/:id",
{ "hide": true
"text": "大宗订单详情", },
"icon": "anticon anticon-dashboard", {
"link": "/order-management/bulk-detail/:id", "text": "大宗订单详情",
"hide": true "icon": "anticon anticon-dashboard",
}, "link": "/order-management/bulk-detail/:id",
{ "hide": true
"text": "货源详情", },
"icon": "anticon anticon-dashboard", {
"link": "/order-management/vehicle-detail", "text": "货源详情",
"hide": true "icon": "anticon anticon-dashboard",
} "link": "/order-management/vehicle-detail",
] "hide": true
}, }
{ ]
"text": "运单管理", },
"icon": "anticon anticon-dashboard", {
"group": true, "text": "运单管理",
"children": [ "icon": "anticon anticon-dashboard",
{ "group": true,
"text": "整车运单", "children": [
"link": "/waybill-management/vehicle" {
}, "text": "整车运单",
{ "link": "/waybill-management/vehicle"
"hide": true, },
"text": "整车运单详情", {
"link": "/waybill-management/vehicle-detail/:id" "hide": true,
}, "text": "整车运单详情",
{ "link": "/waybill-management/vehicle-detail/:id"
"text": "大宗运单", },
"link": "/waybill-management/bulk" {
}, "text": "大宗运单",
{ "link": "/waybill-management/bulk"
"hide": true, },
"text": "大宗运单详情", {
"link": "/waybill-management/bulk-detail/:id" "hide": true,
} "text": "大宗运单详情",
] "link": "/waybill-management/bulk-detail/:id"
}, }
{ ]
"text": "财务管理", },
"icon": "anticon anticon-dashboard", {
"group": true, "text": "财务管理",
"children": [ "icon": "anticon anticon-dashboard",
{ "group": true,
"text": "货主账户", "children": [
"icon": "anticon anticon-dashboard", {
"link": "/financial-management/freight-account" "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/driver-account"
"text": "充值记录", },
"icon": "anticon anticon-dashboard", {
"link": "/financial-management/recharge-record" "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/withdrawals-record"
"text": "账户主体", },
"icon": "anticon anticon-dashboard", {
"link": "/financial-management/main-account" "text": "账户主体",
} "icon": "anticon anticon-dashboard",
] "link": "/financial-management/main-account"
}, }
{ ]
"text": "票务管理", },
"icon": "anticon anticon-dashboard", {
"group": true, "text": "票务管理",
"children": [ "icon": "anticon anticon-dashboard",
{ "group": true,
"text": "开票申请", "children": [
"link": "/ticket/invoice-requested" {
}, "text": "开票申请",
{ "link": "/ticket/invoice-requested"
"text": "已开发票", },
"link": "/ticket/invoice-list" {
}, "text": "已开发票",
{ "link": "/ticket/invoice-list"
"text": "ETC发票", },
"children": [ {
{ "text": "ETC发票",
"text": "申请发票", "children": [
"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", {
"group": true, "text": "合同管理",
"children": [ "icon": "anticon anticon-dashboard",
{ "group": true,
"text": "合同列表", "children": [
"link": "/contract-management/list" {
} "text": "合同列表",
] "link": "/contract-management/list"
}, }
{ ]
"text": "系统设置", },
"icon": "anticon anticon-dashboard", {
"group": true, "text": "系统设置",
"children": [ "icon": "anticon anticon-dashboard",
{ "group": true,
"text": "员工管理", "children": [
"link": "/system/staff-management" {
}, "text": "员工管理",
{ "link": "/system/staff-management"
"text": "角色管理", },
"link": "/system/role-management" {
}, "text": "角色管理",
{ "link": "/system/role-management"
"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"
} }
] ]
} }
] ]
}
]
}
} }