- 将 agreement.js、no-auth-plugin.js、processEntry.js、https.js、 menuConfig.js、voiceUtil.js 文件重命名为对应的 .ts 扩展名 - 在 agreement.ts 中引入配置并动态设置标题 - 在 no-auth-plugin.ts 中使用工具函数替代硬编码跳转 - 为 processEntry.ts 添加类型注解并重构代码结构 - 为 https.ts 添加类型定义并优化错误处理 - 创建 menuConfig.ts 并迁移导航配置 - 为 voiceUtil.ts 添加类型注解
95 lines
2.2 KiB
TypeScript
95 lines
2.2 KiB
TypeScript
/** 首页菜单 */
|
|
const iconColor = "#0052D9";
|
|
export const menuConfig = [
|
|
{
|
|
title: "订单管理",
|
|
icon: "form",
|
|
iconColor: iconColor,
|
|
children: [
|
|
{
|
|
title: "订单列表",
|
|
url: "/pages/orders/ordersList/ordersList",
|
|
auth: "SF_VIEW_ORDERS",
|
|
},
|
|
{
|
|
title: "流程管理",
|
|
url: "/pages/orders/processManage/processManage",
|
|
auth: "SF_VIEW_ORDER_PROCESS_MANAGE",
|
|
},
|
|
{
|
|
title: "录入流程",
|
|
url: "/pages/processEntry/processEntry",
|
|
auth: "SF_ENTER_PROCESS",
|
|
},
|
|
{
|
|
title: "工量查询",
|
|
url: "/pages/orders/workload/workload",
|
|
auth: "SF_VIEW_WORK_LIST",
|
|
},
|
|
{
|
|
title: "订单备忘",
|
|
url: "/pages/orders/orderMemo/orderMemo",
|
|
auth: "SF_VIEW_ORDER_MEMO",
|
|
},
|
|
{
|
|
title: "订单排序",
|
|
url: "/pages/orders/ordersSort/ordersSort",
|
|
auth: "SF_SET_ORDER_SORT",
|
|
},
|
|
{
|
|
title: "板号查询",
|
|
url: "/pages/orders/sale_no_query/sale_no_query",
|
|
auth: "SF_VIEW_ORDER_SALE_NO_PROCESS",
|
|
},
|
|
],
|
|
},
|
|
{
|
|
title: "客户管理",
|
|
icon: "user-vip",
|
|
iconColor: iconColor,
|
|
children: [
|
|
{
|
|
title: "供应商管理",
|
|
url: "/pages/crm_manage/suppliers/suppliers",
|
|
auth: "SF_VIEW_CRM_SUPPLIER",
|
|
},
|
|
{
|
|
title: "经销商管理",
|
|
url: "/pages/crm_manage/sales/sales",
|
|
auth: "SF_VIEW_CRM_SALE",
|
|
},
|
|
{
|
|
title: "经销商等级",
|
|
url: "/pages/crm_manage/crm_level/crm_level",
|
|
auth: "SF_VIEW_CRM_LEVEL",
|
|
},
|
|
],
|
|
},
|
|
];
|
|
|
|
const iconPath = "/images/nav_icons/";
|
|
/** 导航栏 */
|
|
export const navTabBar = [
|
|
{
|
|
iconPath: `${iconPath}home.svg`,
|
|
selectedIconPath: `${iconPath}home2.svg`,
|
|
pagePath: "/pages/index/index",
|
|
text: "首页",
|
|
key: "1",
|
|
},
|
|
{
|
|
iconPath: `${iconPath}code.svg`,
|
|
selectedIconPath: `${iconPath}code2.svg`,
|
|
pagePath: "/pages/processEntry/processEntry",
|
|
text: "扫码",
|
|
key: "2",
|
|
},
|
|
{
|
|
iconPath: `${iconPath}my.svg`,
|
|
selectedIconPath: `${iconPath}my2.svg`,
|
|
pagePath: "/pages/my/my",
|
|
text: "我的",
|
|
key: "3",
|
|
},
|
|
];
|