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 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);
}

View File

@ -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;
}
}
.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;
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 { 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);
// });
}
/**

View File

@ -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"
}
]
}
]
}
]
}
}