This commit is contained in:
Taric Xin
2022-02-15 10:23:19 +08:00
parent 386bcccae8
commit 4b99e7ba59
5 changed files with 127 additions and 119 deletions

View File

@ -4,6 +4,7 @@ import { cacheConf } from '@conf/cache.conf';
import { sysConf } from '@conf/sys.conf'; import { sysConf } from '@conf/sys.conf';
import { ACLService } from '@delon/acl'; import { ACLService } from '@delon/acl';
import { MenuService, SettingsService, TitleService, _HttpClient } from '@delon/theme'; import { MenuService, SettingsService, TitleService, _HttpClient } from '@delon/theme';
import { environment } from '@env/environment';
import { AmapService, EACacheService, EAUserService } from '@shared'; import { AmapService, EACacheService, EAUserService } from '@shared';
import { NzSafeAny } from 'ng-zorro-antd/core/types'; import { NzSafeAny } from 'ng-zorro-antd/core/types';
import { NzIconService } from 'ng-zorro-antd/icon'; import { NzIconService } from 'ng-zorro-antd/icon';
@ -46,7 +47,7 @@ export class StartupService {
}); });
let data; let data;
if (this.coreSrv.loginStatus) { if (this.coreSrv.loginStatus && environment.production) {
// 本地菜单 // 本地菜单
// data = this.loadMockData(); // data = this.loadMockData();
// 远程菜单 // 远程菜单

View File

@ -75,7 +75,10 @@
<td>{{ item.keyCode }}</td> <td>{{ item.keyCode }}</td>
<td>{{ item.link }}</td> <td>{{ item.link }}</td>
<td nzAlign="center" nzWidth="100px"> <td nzAlign="center" nzWidth="100px">
<i nz-icon [nzType]="item.iconType"></i> <ng-container [ngSwitch]="item.iconType">
<i *ngSwitchCase="'icon'" nz-icon [nzType]="item.value"></i>
<i *ngSwitchCase="'iconfont'" [class]="item.value"></i>
</ng-container>
</td> </td>
<td nzAlign="right" nzWidth="100px">{{ item.sorted }}</td> <td nzAlign="right" nzWidth="100px">{{ item.sorted }}</td>
<td nzAlign="center" nzWidth="250px"> <td nzAlign="center" nzWidth="250px">

View File

@ -131,7 +131,7 @@ export class MenuModalComponent implements OnInit {
const params = { const params = {
...this.sf.value, ...this.sf.value,
...this.params, ...this.params,
i18n: '', i18n: null,
// i18n: this.sf.value.keyCode, // i18n: this.sf.value.keyCode,
menuType: 0, menuType: 0,
reuse: 0, reuse: 0,

View File

@ -20,11 +20,11 @@ export class MenuManagerService extends BaseService {
// 获取菜单下按钮权限列表 // 获取菜单下按钮权限列表
$api_get_functions_by_id = `/api/mdc/cuc/functionButton/getFunctionButtonByFunctionId`; $api_get_functions_by_id = `/api/mdc/cuc/functionButton/getFunctionButtonByFunctionId`;
// 获取所有按钮信息 // 获取所有按钮信息
$api_get_functions= `/api/mdc/cuc/buttonInfo/getButtonInfoList`; $api_get_functions = `/api/mdc/cuc/buttonInfo/getButtonInfoList`;
// 保存菜单按钮关联 // 保存菜单按钮关联
$api_save_menu_function= `/api/mdc/cuc/functionButton/saveFunctionButton`; $api_save_menu_function = `/api/mdc/cuc/functionButton/saveFunctionButton`;
// 删除菜单按钮关联表 // 删除菜单按钮关联表
$api_delete_menu_function= `/api/mdc/cuc/functionButton/deletebatch`; $api_delete_menu_function = `/api/mdc/cuc/functionButton/deletebatch`;
constructor(public injector: Injector) { constructor(public injector: Injector) {
super(injector); super(injector);
@ -112,7 +112,7 @@ export class MenuManagerService extends BaseService {
level: node.level! + 1, level: node.level! + 1,
expand: false, expand: false,
parent: node, parent: node,
iconType: this.formatIcon(node.children[i].icon) ...this.formatIcon(node.children[i].icon)
}); });
} }
} }
@ -128,13 +128,17 @@ export class MenuManagerService extends BaseService {
} }
} }
private formatIcon(icon: any) { private formatIcon(icon: any): { iconType: string; value: string } {
let value = icon; let value = icon;
let type = 'icon';
// compatible `anticon anticon-user` // compatible `anticon anticon-user`
if (~icon.indexOf(`anticon-`)) { if (~icon.indexOf(`anticon-`)) {
value = value.split('-').slice(1).join('-'); value = value.split('-').slice(1).join('-');
} }
return value; if (~icon.indexOf(`iconfont`)) {
type = 'iconfont';
}
return { iconType: type, value };
} }
} }

View File

@ -3,71 +3,71 @@
"data": { "data": {
"menu": [ "menu": [
{ {
"title": "主导航", "text": "主导航",
"hideInBreadcrumb": true, "hideInBreadcrumb": true,
"children": [ "children": [
{ {
"title": "用户中心", "text": "用户中心",
"icon": "iconfont icon-yonghu-copy", "icon": "iconfont icon-yonghu-copy",
"group": true, "group": true,
"children": [ "children": [
{ {
"title": "货主管理", "text": "货主管理",
"children": [ "children": [
{ {
"title": "企业列表", "text": "企业列表",
"link": "/usercenter/freight/list" "link": "/usercenter/freight/list"
}, },
{ {
"title": "道运证", "text": "道运证",
"hide": true, "hide": true,
"link": "/usercenter/freight/list/view/:id" "link": "/usercenter/freight/list/view/:id"
}, },
{ {
"title": "货主详情", "text": "货主详情",
"hide": true, "hide": true,
"link": "/usercenter/freight/list/detail/:id" "link": "/usercenter/freight/list/detail/:id"
}, },
{ {
"title": "企业认证", "text": "企业认证",
"hide": true, "hide": true,
"link": "/usercenter/freight/new" "link": "/usercenter/freight/new"
}, },
{ {
"title": "企业审核列表", "text": "企业审核列表",
"link": "/usercenter/freight/enterprise" "link": "/usercenter/freight/enterprise"
}, },
{ {
"title": "企业审核列表详情", "text": "企业审核列表详情",
"hide": true, "hide": true,
"link": "/usercenter/freight/enterprise/view/:id" "link": "/usercenter/freight/enterprise/view/:id"
}, },
{ {
"title": "货主员工列表", "text": "货主员工列表",
"link": "/usercenter/freight/user" "link": "/usercenter/freight/user"
}, },
{ {
"title": "货主员工详情", "text": "货主员工详情",
"hide": true, "hide": true,
"link": "/usercenter/freight/user/view/:id" "link": "/usercenter/freight/user/view/:id"
} }
] ]
}, },
{ {
"title": "司机管理", "text": "司机管理",
"link": "/demo/zorro", "link": "/demo/zorro",
"children": [ "children": [
{ {
"title": "司机列表", "text": "司机列表",
"link": "/usercenter/driver" "link": "/usercenter/driver"
}, },
{ {
"title": "司机详情", "text": "司机详情",
"hide": true, "hide": true,
"link": "/usercenter/driver/detail/:id" "link": "/usercenter/driver/detail/:id"
}, },
{ {
"title": "车队长列表", "text": "车队长列表",
"link": "/usercenter/driver/captain" "link": "/usercenter/driver/captain"
} }
] ]
@ -75,437 +75,437 @@
] ]
}, },
{ {
"title": "运力管理", "text": "运力管理",
"icon": "iconfont icon-yunli-copy", "icon": "iconfont icon-yunli-copy",
"group": true, "group": true,
"children": [ "children": [
{ {
"title": "车辆列表", "text": "车辆列表",
"link": "/vehicle/list" "link": "/vehicle/list"
}, },
{ {
"hide": true, "hide": true,
"title": "车辆列表详情", "text": "车辆列表详情",
"link": "/vehicle/list/detail/:id" "link": "/vehicle/list/detail/:id"
}, },
{ {
"title": "车辆审核列表", "text": "车辆审核列表",
"link": "/vehicle/audit" "link": "/vehicle/audit"
}, },
{ {
"hide": true, "hide": true,
"title": "车辆审核列表详情", "text": "车辆审核列表详情",
"link": "/vehicle/audit/detail/:id" "link": "/vehicle/audit/detail/:id"
} }
] ]
}, },
{ {
"title": "货源管理", "text": "货源管理",
"icon": "iconfont icon-huoyuan-copy", "icon": "iconfont icon-huoyuan-copy",
"group": true, "group": true,
"children": [ "children": [
{ {
"title": "货源管理", "text": "货源管理",
"link": "/supply-management/index", "link": "/supply-management/index",
"reuse": true "reuse": true
}, },
{ {
"title": "货源详情", "text": "货源详情",
"link": "/supply-management/bulk-detail", "link": "/supply-management/bulk-detail",
"hide": true "hide": true
}, },
{ {
"title": "修改货源", "text": "修改货源",
"link": "/supply-management/vehicle-amend/:id", "link": "/supply-management/vehicle-amend/:id",
"hide": true "hide": true
}, },
{ {
"title": "货源详情", "text": "货源详情",
"link": "/supply-management/vehicle-detail/:id", "link": "/supply-management/vehicle-detail/:id",
"hide": true "hide": true
} }
] ]
}, },
{ {
"title": "订单管理", "text": "订单管理",
"icon": "iconfont icon-dingdan-copy", "icon": "iconfont icon-dingdan-copy",
"group": true, "group": true,
"children": [ "children": [
{ {
"title": "整车订单", "text": "整车订单",
"link": "/order-management/vehicle" "link": "/order-management/vehicle"
}, },
{ {
"title": "大宗订单", "text": "大宗订单",
"link": "/order-management/bulk" "link": "/order-management/bulk"
}, },
{ {
"title": "风险单管理", "text": "风险单管理",
"link": "/order-management/risk" "link": "/order-management/risk"
}, },
{ {
"title": "单据审核", "text": "单据审核",
"link": "/order-management/receipts-audit" "link": "/order-management/receipts-audit"
}, },
{ {
"title": "投诉管理", "text": "投诉管理",
"link": "/order-management/complaint" "link": "/order-management/complaint"
}, },
{ {
"title": "合规抽查", "text": "合规抽查",
"link": "/order-management/compliance-audit" "link": "/order-management/compliance-audit"
}, },
{ {
"title": "整车订单详情", "text": "整车订单详情",
"link": "/order-management/vehicle-detail/:id", "link": "/order-management/vehicle-detail/:id",
"hide": true "hide": true
}, },
{ {
"title": "大宗订单详情", "text": "大宗订单详情",
"link": "/order-management/bulk-detail/:id", "link": "/order-management/bulk-detail/:id",
"hide": true "hide": true
} }
] ]
}, },
{ {
"title": "运单管理", "text": "运单管理",
"icon": "iconfont icon-yundan-copy", "icon": "iconfont icon-yundan-copy",
"group": true, "group": true,
"children": [ "children": [
{ {
"title": "整车运单", "text": "整车运单",
"link": "/waybill-management/vehicle" "link": "/waybill-management/vehicle"
}, },
{ {
"hide": true, "hide": true,
"title": "整车运单详情", "text": "整车运单详情",
"link": "/waybill-management/vehicle-detail/:id" "link": "/waybill-management/vehicle-detail/:id"
}, },
{ {
"title": "大宗运单", "text": "大宗运单",
"link": "/waybill-management/bulk" "link": "/waybill-management/bulk"
}, },
{ {
"hide": true, "hide": true,
"title": "大宗运单详情", "text": "大宗运单详情",
"link": "/waybill-management/bulk-detail/:id" "link": "/waybill-management/bulk-detail/:id"
}, },
{ {
"title": "异常上报", "text": "异常上报",
"link": "/waybill-management/abnormal-appear" "link": "/waybill-management/abnormal-appear"
} }
] ]
}, },
{ {
"title": "保险管理", "text": "保险管理",
"icon": "iconfont icon-yundan-copy", "icon": "iconfont icon-yundan-copy",
"group": true, "group": true,
"children": [ "children": [
{ {
"title": "保险列表", "text": "保险列表",
"link": "/insurance-management/list" "link": "/insurance-management/list"
} }
] ]
}, },
{ {
"title": "财务管理", "text": "财务管理",
"icon": "iconfont icon-caiwu-copy", "icon": "iconfont icon-caiwu-copy",
"group": true, "group": true,
"children": [ "children": [
{ {
"title": "费用管理", "text": "费用管理",
"link": "/financial-management/cost-management" "link": "/financial-management/cost-management"
}, },
{ {
"title": "费用浏览", "text": "费用浏览",
"hide": true, "hide": true,
"link": "/financial-management/cost-management/detail/:id" "link": "/financial-management/cost-management/detail/:id"
}, },
{ {
"title": "凭证管理", "text": "凭证管理",
"link": "/financial-management/voucher-management" "link": "/financial-management/voucher-management"
}, },
{ {
"title": "凭证汇总", "text": "凭证汇总",
"link": "/financial-management/voucher-summary" "link": "/financial-management/voucher-summary"
}, },
{ {
"title": "应收费用单", "text": "应收费用单",
"hide": true, "hide": true,
"link": "/financial-management/cost-management/expenses-receivable/:id" "link": "/financial-management/cost-management/expenses-receivable/:id"
}, },
{ {
"title": "应付费用单", "text": "应付费用单",
"hide": true, "hide": true,
"link": "/financial-management/cost-management/expenses-payable/:id" "link": "/financial-management/cost-management/expenses-payable/:id"
}, },
{ {
"title": "付款单", "text": "付款单",
"link": "/financial-management/payment-order" "link": "/financial-management/payment-order"
}, },
{ {
"title": "收款单", "text": "收款单",
"link": "/financial-management/receipt-order" "link": "/financial-management/receipt-order"
}, },
{ {
"title": "应收核销", "text": "应收核销",
"link": "/financial-management/receivable-order" "link": "/financial-management/receivable-order"
}, },
{ {
"title": "应收核销详情", "text": "应收核销详情",
"hide": true, "hide": true,
"link": "/financial-management/receivable-order/detail/:id" "link": "/financial-management/receivable-order/detail/:id"
}, },
{ {
"title": "应付核销", "text": "应付核销",
"link": "/financial-management/payable-order" "link": "/financial-management/payable-order"
}, },
{ {
"title": "应收核销详情", "text": "应收核销详情",
"hide": true, "hide": true,
"link": "/financial-management/payable-order/detail/:id" "link": "/financial-management/payable-order/detail/:id"
}, },
{ {
"title": "货主账户", "text": "货主账户",
"link": "/financial-management/freight-account" "link": "/financial-management/freight-account"
}, },
{ {
"title": "货主账户详情", "text": "货主账户详情",
"hide": true, "hide": true,
"link": "/financial-management/freight-account/detail/:id" "link": "/financial-management/freight-account/detail/:id"
}, },
{ {
"title": "平台账户", "text": "平台账户",
"link": "/financial-management/platform-account" "link": "/financial-management/platform-account"
}, },
{ {
"title": "司机账户", "text": "司机账户",
"link": "/financial-management/driver-account" "link": "/financial-management/driver-account"
}, },
{ {
"title": "司机账户详情", "text": "司机账户详情",
"hide": true, "hide": true,
"link": "/financial-management/driver-account/detail/:id" "link": "/financial-management/driver-account/detail/:id"
}, },
{ {
"title": "充值记录", "text": "充值记录",
"link": "/financial-management/recharge-record" "link": "/financial-management/recharge-record"
}, },
{ {
"title": "提现记录", "text": "提现记录",
"link": "/financial-management/withdrawals-record" "link": "/financial-management/withdrawals-record"
}, },
{ {
"title": "提现详情", "text": "提现详情",
"hide": true, "hide": true,
"link": "/financial-management/withdrawals-record/detail/:id" "link": "/financial-management/withdrawals-record/detail/:id"
}, },
{ {
"title": "异常入金", "text": "异常入金",
"link": "/financial-management/abnormal-gold" "link": "/financial-management/abnormal-gold"
}, },
{ {
"title": "支付记录", "text": "支付记录",
"link": "/financial-management/payment-record" "link": "/financial-management/payment-record"
}, },
{ {
"title": "交易流水", "text": "交易流水",
"link": "/financial-management/transaction-flow" "link": "/financial-management/transaction-flow"
} }
] ]
}, },
{ {
"title": "票务管理", "text": "票务管理",
"icon": "iconfont icon-piaowu-copy", "icon": "iconfont icon-piaowu-copy",
"group": true, "group": true,
"children": [ "children": [
{ {
"title": "销项发票", "text": "销项发票",
"children": [ "children": [
{ {
"title": "开票申请", "text": "开票申请",
"link": "/ticket/invoice-requested" "link": "/ticket/invoice-requested"
}, },
{ {
"title": "开票订单明细", "text": "开票订单明细",
"link": "/ticket/invoice-requested/detail/:id", "link": "/ticket/invoice-requested/detail/:id",
"hide": true "hide": true
}, },
{ {
"title": "销票处理", "text": "销票处理",
"link": "/ticket/cancellation-invoice" "link": "/ticket/cancellation-invoice"
}, },
{ {
"title": "销票订单明细", "text": "销票订单明细",
"link": "/ticket/cancellation-invoice/detail/:id", "link": "/ticket/cancellation-invoice/detail/:id",
"hide": true "hide": true
}, },
{ {
"title": "已开发票", "text": "已开发票",
"link": "/ticket/invoice-list" "link": "/ticket/invoice-list"
}, },
{ {
"title": "已开订单明细", "text": "已开订单明细",
"link": "/ticket/invoice-list/detail/:id", "link": "/ticket/invoice-list/detail/:id",
"hide": true "hide": true
}, },
{ {
"title": "快递信息", "text": "快递信息",
"link": "/ticket/express-info" "link": "/ticket/express-info"
} }
] ]
}, },
{ {
"title": "ETC发票", "text": "ETC发票",
"children": [ "children": [
{ {
"title": "申请发票", "text": "申请发票",
"link": "/ticket/etc-invoice-requested" "link": "/ticket/etc-invoice-requested"
}, },
{ {
"title": "开票记录", "text": "开票记录",
"link": "/ticket/etc-invoice-list" "link": "/ticket/etc-invoice-list"
}, },
{ {
"title": "已开发票", "text": "已开发票",
"link": "/ticket/etc-invoiced-logs" "link": "/ticket/etc-invoiced-logs"
}, },
{ {
"title": "ETC白名单", "text": "ETC白名单",
"link": "/ticket/etc-blacklist" "link": "/ticket/etc-blacklist"
} }
] ]
}, },
{ {
"title": "进项发票", "text": "进项发票",
"link": "/ticket/input-invoice" "link": "/ticket/input-invoice"
}, },
{ {
"title": "修改收票信息", "text": "修改收票信息",
"link": "/ticket/input-invoice/detail/:id", "link": "/ticket/input-invoice/detail/:id",
"hide": true "hide": true
}, },
{ {
"title": "进项发票", "text": "进项发票",
"link": "/ticket/input-invoice/edit/:id", "link": "/ticket/input-invoice/edit/:id",
"hide": true "hide": true
} }
] ]
}, },
{ {
"title": "合同管理", "text": "合同管理",
"icon": "iconfont icon-hetong-copy", "icon": "iconfont icon-hetong-copy",
"group": true, "group": true,
"children": [ "children": [
{ {
"title": "保单管理", "text": "保单管理",
"link": "/contract-management/policy" "link": "/contract-management/policy"
}, },
{ {
"title": "合同管理", "text": "合同管理",
"link": "/contract-management/index" "link": "/contract-management/index"
}, },
{ {
"title": "合同模板", "text": "合同模板",
"link": "/contract-management/template" "link": "/contract-management/template"
} }
] ]
}, },
{ {
"title": "系统设置", "text": "系统设置",
"icon": "iconfont icon-shezhi-copy", "icon": "iconfont icon-shezhi-copy",
"group": true, "group": true,
"children": [ "children": [
{ {
"title": "员工管理", "text": "员工管理",
"group": true, "group": true,
"children": [ "children": [
{ {
"title": "员工管理", "text": "员工管理",
"link": "/system/staff-management" "link": "/system/staff-management"
}, },
{ {
"title": "角色管理", "text": "角色管理",
"link": "/system/role-management" "link": "/system/role-management"
} }
] ]
}, },
{ {
"title": "操作日志", "text": "操作日志",
"group": true, "group": true,
"children": [ "children": [
{ {
"title": "系统操作日志", "text": "系统操作日志",
"link": "/logs/system-logs" "link": "/logs/system-logs"
}, },
{ {
"title": "货源操作日志", "text": "货源操作日志",
"link": "/logs/system-supply-logs" "link": "/logs/system-supply-logs"
}, },
{ {
"title": "订单操作日志", "text": "订单操作日志",
"link": "/logs/system-waybill-logs" "link": "/logs/system-waybill-logs"
}, },
{ {
"title": "用户登录日志", "text": "用户登录日志",
"link": "/logs/user-logs" "link": "/logs/user-logs"
}, },
{ {
"title": "版本发布记录", "text": "版本发布记录",
"link": "/logs/version-logs" "link": "/logs/version-logs"
} }
] ]
}, },
{ {
"title": "CRM客户管理", "text": "CRM客户管理",
"link": "/system/crm-management" "link": "/system/crm-management"
}, },
{ {
"title": "结算客户管理", "text": "结算客户管理",
"link": "/system/close-account" "link": "/system/close-account"
}, },
{ {
"title": "网络货运人", "text": "网络货运人",
"link": "/system/network-freight" "link": "/system/network-freight"
}, },
{ {
"title": "基础设置", "text": "基础设置",
"link": "/system/basic-setting" "link": "/system/basic-setting"
}, },
{ {
"title": "保险配置", "text": "保险配置",
"link": "/system/insurance-set" "link": "/system/insurance-set"
}, },
{ {
"title": "公告信息管理", "text": "公告信息管理",
"link": "/system/announcement-message" "link": "/system/announcement-message"
}, },
{ {
"title": "车型车长配置", "text": "车型车长配置",
"link": "/system/cart-config" "link": "/system/cart-config"
}, },
{ {
"title": "基础配置", "text": "基础配置",
"link": "/system/basic-config" "link": "/system/basic-config"
}, },
{ {
"title": "协议配置", "text": "协议配置",
"link": "/system/agreement-config" "link": "/system/agreement-config"
}, },
{ {
"title": "菜单管理", "text": "菜单管理",
"link": "/menu-management/index" "link": "/menu-management/index"
}, },
{ {
"title": "接口权限", "text": "接口权限",
"link": "/menu-management/auth" "link": "/menu-management/auth"
}, },
{ {
"title": "系统配置", "text": "系统配置",
"link": "/system/system-config" "link": "/system/system-config"
}, },
{ {
"title": "货物名称配置", "text": "货物名称配置",
"link": "/system/goods-name-config" "link": "/system/goods-name-config"
} }
] ]