2025-04-12 14:54:02 +08:00
|
|
|
import { createRouter,createWebHashHistory } from "vue-router";
|
|
|
|
import layout from "@/layout/index"; //layout直接引用 其他使用路由懒加载
|
|
|
|
import store from "@/store";
|
|
|
|
|
|
|
|
// import Home from '../views/Home.vue'
|
|
|
|
/**
|
|
|
|
* 关于路由配置描述
|
|
|
|
* 1.meta && meta.title && meta.icon 则在菜单栏显示
|
|
|
|
* 2.如果存在children , 则以el-sub-menu子菜单显示
|
|
|
|
* 否则不在menu菜单显示
|
|
|
|
* 如果只展示单级别菜单 需要像developer这样配置
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 私有路由表
|
|
|
|
*/
|
|
|
|
|
|
|
|
export const privateRoutes = [
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 公开路由表
|
|
|
|
*/
|
|
|
|
export const publicRoutes = [
|
|
|
|
|
|
|
|
{
|
|
|
|
path: "/login",
|
|
|
|
name:'login',
|
|
|
|
component: () => import("@/views/login/index")
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "/",
|
|
|
|
name:'home',
|
|
|
|
component: () => import("@/views/home/index") //系统登录
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "/editPassword",// 注意:带有路径“/”的记录中的组件“默认”是一个不返回 Promise 的函数
|
|
|
|
component: layout,
|
2025-04-14 11:32:57 +08:00
|
|
|
redirect: "/FourColorWarning",
|
2025-04-12 14:54:02 +08:00
|
|
|
children: [
|
2025-04-14 11:32:57 +08:00
|
|
|
{
|
|
|
|
path: "/",
|
|
|
|
name:'home',
|
|
|
|
component: () => import("@/views/home/index"), //系统登录
|
2025-04-12 14:54:02 +08:00
|
|
|
meta: {
|
2025-04-14 11:32:57 +08:00
|
|
|
title: "首页",
|
2025-04-12 14:54:02 +08:00
|
|
|
icon: "article"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2025-04-14 11:32:57 +08:00
|
|
|
path: "/FourColorWarning",
|
|
|
|
name: "FourColorWarning",
|
2025-04-12 23:51:24 +08:00
|
|
|
meta: { title: "四色预警管理", icon: "article" },
|
2025-04-12 14:54:02 +08:00
|
|
|
children: [
|
|
|
|
{
|
2025-04-12 23:51:24 +08:00
|
|
|
path: "/IdentityManage",
|
|
|
|
name: "IdentityManage",
|
2025-04-14 11:32:57 +08:00
|
|
|
component: () => import("@/views/backOfficeSystem/fourColorManage/IdentityManage/index"),
|
2025-04-12 14:54:02 +08:00
|
|
|
meta: {
|
2025-04-12 23:51:24 +08:00
|
|
|
title: "身份标签管理",
|
2025-04-12 14:54:02 +08:00
|
|
|
icon: "article"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2025-04-12 23:51:24 +08:00
|
|
|
path: "/tagManage",
|
|
|
|
name: "tagManage",
|
2025-04-14 11:32:57 +08:00
|
|
|
component: () => import("@/views/backOfficeSystem/fourColorManage/tagManage/index"),
|
2025-04-12 14:54:02 +08:00
|
|
|
meta: {
|
2025-04-12 23:51:24 +08:00
|
|
|
title: "标签组合管理",
|
2025-04-12 14:54:02 +08:00
|
|
|
icon: "article"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2025-04-14 11:32:57 +08:00
|
|
|
// {
|
|
|
|
// path: "/Mechanics",
|
|
|
|
// name: "Mechanics",
|
|
|
|
// meta: { title: "智能布控", icon: "article" },
|
|
|
|
// children: [
|
|
|
|
// {
|
|
|
|
// path: "/yjControl",
|
|
|
|
// name: "yjControl",
|
|
|
|
// component: () => import("@/views/backOfficeManage/ControlManage/yjControl/index"),
|
|
|
|
// meta: {
|
|
|
|
// title: "预警布控",
|
|
|
|
// icon: "article"
|
|
|
|
// }
|
|
|
|
// },
|
|
|
|
// {
|
|
|
|
// path: "/myControl",
|
|
|
|
// name: "myControl",
|
|
|
|
// component: () => import("@/views/backOfficeManage/ControlManage/myControl/index"),
|
|
|
|
// meta: {
|
|
|
|
// title: "我的布控",
|
|
|
|
// icon: "article"
|
|
|
|
// }
|
|
|
|
// },
|
|
|
|
// {
|
|
|
|
// path: "/VehicleAccessories",
|
|
|
|
// name: "VehicleAccessories",
|
|
|
|
// component: () => import("@/views/backOfficeSystem/Mechanics/VehicleAccessories/index"),
|
|
|
|
// meta: {
|
|
|
|
// title: "车辆配件业务登记信息",
|
|
|
|
// icon: "article"
|
|
|
|
// }
|
|
|
|
// },
|
|
|
|
// {
|
|
|
|
// path: "/VehicleRepairs",
|
|
|
|
// name: "VehicleRepairs",
|
|
|
|
// component: () => import("@/views/backOfficeSystem/Mechanics/VehicleRepairs/index"),
|
|
|
|
// meta: {
|
|
|
|
// title: "机动车修理业务信息",
|
|
|
|
// icon: "article"
|
|
|
|
// }
|
|
|
|
// },
|
2025-04-12 14:54:02 +08:00
|
|
|
|
2025-04-14 11:32:57 +08:00
|
|
|
// {
|
|
|
|
// path: "/CarIntersectionInfo",
|
|
|
|
// name: "CarIntersectionInfo",
|
|
|
|
// component: () => import("@/views/backOfficeSystem/Mechanics/CarIntersectionInfo/index"),
|
|
|
|
// meta: {
|
|
|
|
// title: "承接车辆交接信息",
|
|
|
|
// icon: "article"
|
|
|
|
// }
|
|
|
|
// },
|
|
|
|
// {
|
|
|
|
// path: "/CarBasicInfo",
|
|
|
|
// name: "CarBasicInfo",
|
|
|
|
// component: () => import("@/views/backOfficeSystem/Mechanics/CarBasicInfo/index"),
|
|
|
|
// meta: {
|
|
|
|
// title: "承接车辆基本信息",
|
|
|
|
// icon: "article"
|
|
|
|
// }
|
|
|
|
// },
|
|
|
|
// {
|
|
|
|
// path: "/Practitioners",
|
|
|
|
// name: "Practitioners",
|
|
|
|
// component: () => import("@/views/backOfficeSystem/EntertainmentManagemnet/Practitioners/index"),
|
|
|
|
// meta: {
|
|
|
|
// title: "从业人员",
|
|
|
|
// icon: "article"
|
|
|
|
// }
|
|
|
|
// },
|
|
|
|
// {
|
|
|
|
// path: "/MachineRepair",
|
|
|
|
// name: "MachineRepair",
|
|
|
|
// component: () => import("@/views/backOfficeSystem/Mechanics/MachineRepair/index"),
|
|
|
|
// meta: { title: "机修场所信息管理",icon: "article" }
|
|
|
|
// },
|
2025-04-12 14:54:02 +08:00
|
|
|
|
2025-04-14 11:32:57 +08:00
|
|
|
// ],
|
|
|
|
// },
|
2025-04-12 14:54:02 +08:00
|
|
|
{
|
|
|
|
path: "/LockSmith",
|
|
|
|
name: "LockSmith",
|
|
|
|
meta: { title: "开锁行业", icon: "article" },
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
path: "/location",
|
|
|
|
name: "location",
|
|
|
|
component: () => import("@/views/backOfficeSystem/LockSmith/LocationGL/index"),
|
|
|
|
meta: {
|
|
|
|
title: "开锁业场所管理",
|
|
|
|
icon: "article"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "/business",
|
|
|
|
name: "business",
|
|
|
|
component: () => import("@/views/backOfficeSystem/LockSmith/BusinessGL/index"),
|
|
|
|
meta: {
|
|
|
|
title: "开锁业务信息管理",
|
|
|
|
icon: "article"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "/Pawnbroking",
|
|
|
|
name: "Pawnbroking",
|
|
|
|
meta: { title: "典当业", icon: "article" },
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
path: "/PopManagement",
|
|
|
|
name: "PopManagement",
|
|
|
|
component: () => import("@/views/backOfficeSystem/Pawnbroking/PopManagement/index"),
|
|
|
|
meta: {
|
|
|
|
title: "典当业场所管理",
|
|
|
|
icon: "article"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "/ItemInformation",
|
|
|
|
name: "ItemInformation",
|
|
|
|
component: () => import("@/views/backOfficeSystem/Pawnbroking/ItemInformation/index"),
|
|
|
|
meta: {
|
|
|
|
title: "典当物品信息管理",
|
|
|
|
icon: "article"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "/BusinessInformation",
|
|
|
|
name: "BusinessInformation",
|
|
|
|
component: () => import("@/views/backOfficeSystem/Pawnbroking/BusinessInformation/index"),
|
|
|
|
meta: {
|
|
|
|
title: "典当业务信息管理",
|
|
|
|
icon: "article"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "/ScrapMetal",
|
|
|
|
name: "ScrapMetal",
|
|
|
|
meta: { title: "废旧金属", icon: "article" },
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
path: "/PremisesManagement",
|
|
|
|
name: "PremisesManagement",
|
|
|
|
component: () => import("@/views/backOfficeSystem/ScrapMetal/PremisesManagement/index"),
|
|
|
|
meta: {
|
|
|
|
title: "废旧金属回收场所管理",
|
|
|
|
icon: "article"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "/RecyclingBusinessManagement",
|
|
|
|
name: "RecyclingBusinessManagement",
|
|
|
|
component: () => import("@/views/backOfficeSystem/ScrapMetal/RecyclingBusinessManagement/index"),
|
|
|
|
meta: {
|
|
|
|
title: "废旧金属回收业务管理",
|
|
|
|
icon: "article"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "/3DPrinting",
|
|
|
|
name: "3DPrinting",
|
|
|
|
meta: { title: "3D打印业", icon: "article" },
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
path: "/CSGL",
|
|
|
|
name: "CSGL",
|
|
|
|
component: () => import("@/views/backOfficeSystem/3DPrinting/CSGL/index"),
|
|
|
|
meta: {
|
|
|
|
title: "3D打印业场所管理",
|
|
|
|
icon: "article"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "/YWXXGL",
|
|
|
|
name: "YWXXGL",
|
|
|
|
component: () => import("@/views/backOfficeSystem/3DPrinting/YWXXGL/index"),
|
|
|
|
meta: {
|
|
|
|
title: "3D打印业务信息管理",
|
|
|
|
icon: "article"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "/CivilExplosives",
|
|
|
|
name: "CivilExplosives",
|
|
|
|
meta: { title: "民爆业务", icon: "article" },
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
path: "/BlastingAccidents",
|
|
|
|
name: "BlastingAccidents",
|
|
|
|
component: () => import("@/views/backOfficeSystem/CivilExplosives/BlastingAccidents/index"),
|
|
|
|
meta: {
|
|
|
|
title: "爆破事故登记信息",
|
|
|
|
icon: "article"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "/BlastingOperations",
|
|
|
|
name: "BlastingOperations",
|
|
|
|
component: () => import("@/views/backOfficeSystem/CivilExplosives/BlastingOperations/index"),
|
|
|
|
meta: {
|
|
|
|
title: "爆破作业项目信息",
|
|
|
|
icon: "article"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "/ExplosionAccidents",
|
|
|
|
name: "ExplosionAccidents",
|
|
|
|
component: () => import("@/views/backOfficeSystem/CivilExplosives/ExplosionAccidents/index"),
|
|
|
|
meta: {
|
|
|
|
title: "爆炸事故单位信息",
|
|
|
|
icon: "article"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "/PersonnelInformation",
|
|
|
|
name: "PersonnelInformation",
|
|
|
|
component: () => import("@/views/backOfficeSystem/CivilExplosives/PersonnelInformation/index"),
|
|
|
|
meta: {
|
|
|
|
title: "爆炸事故人员信息",
|
|
|
|
icon: "article"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "/ExplosivesRelated",
|
|
|
|
name: "ExplosivesRelated",
|
|
|
|
component: () => import("@/views/backOfficeSystem/CivilExplosives/ExplosivesRelated/index"),
|
|
|
|
meta: {
|
|
|
|
title: "涉爆从业单位",
|
|
|
|
icon: "article"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "/Illegal",
|
|
|
|
name: "Illegal",
|
|
|
|
component: () => import("@/views/backOfficeSystem/CivilExplosives/Illegal/index"),
|
|
|
|
meta: {
|
|
|
|
title: "涉爆违章项目信息",
|
|
|
|
icon: "article"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "/KeyPersonnel",
|
|
|
|
name: "KeyPersonnel",
|
|
|
|
component: () => import("@/views/backOfficeSystem/CivilExplosives/KeyPersonnel/index"),
|
|
|
|
meta: {
|
|
|
|
title: "涉爆重点人员",
|
|
|
|
icon: "article"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "/SuspensionInfo",
|
|
|
|
name: "SuspensionInfo",
|
|
|
|
component: () => import("@/views/backOfficeSystem/CivilExplosives/SuspensionInfo/index"),
|
|
|
|
meta: {
|
|
|
|
title: "停产停业信息",
|
|
|
|
icon: "article"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "/ViolationRegistration",
|
|
|
|
name: "ViolationRegistration",
|
|
|
|
component: () => import("@/views/backOfficeSystem/CivilExplosives/ViolationRegistration/index"),
|
|
|
|
meta: {
|
|
|
|
title: "违章登记信息",
|
|
|
|
icon: "article"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "/ViolationPersonnel",
|
|
|
|
name: "ViolationPersonnel",
|
|
|
|
component: () => import("@/views/backOfficeSystem/CivilExplosives/ViolationPersonnel/index"),
|
|
|
|
meta: {
|
|
|
|
title: "违章人员信息",
|
|
|
|
icon: "article"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "/Warehouse",
|
|
|
|
name: "Warehouse",
|
|
|
|
component: () => import("@/views/backOfficeSystem/CivilExplosives/Warehouse/index"),
|
|
|
|
meta: {
|
|
|
|
title: "库房管理",
|
|
|
|
icon: "article"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "/ThriftTrading",
|
|
|
|
name: "ThriftTrading",
|
|
|
|
meta: { title: "旧货交易", icon: "article" },
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
path: "/TradeTtems",
|
|
|
|
name: "TradeTtems",
|
|
|
|
component: () => import("@/views/backOfficeSystem/ThriftTrading/TradeTtems/index"),
|
|
|
|
meta: {
|
|
|
|
title: "交易物品信息管理",
|
|
|
|
icon: "article"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "/TradingVenues",
|
|
|
|
name: "TradingVenues",
|
|
|
|
component: () => import("@/views/backOfficeSystem/ThriftTrading/TradingVenues/index"),
|
|
|
|
meta: {
|
|
|
|
title: "旧货交易业场所管理",
|
|
|
|
icon: "article"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "/TradingBusiness",
|
|
|
|
name: "TradingBusiness",
|
|
|
|
component: () => import("@/views/backOfficeSystem/ThriftTrading/TradingBusiness/index"),
|
|
|
|
meta: {
|
|
|
|
title: "旧货交易业务信息管理",
|
|
|
|
icon: "article"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
]},
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
const router = createRouter({
|
|
|
|
history: createWebHashHistory(),
|
|
|
|
routes: publicRoutes
|
|
|
|
});
|
|
|
|
//初始化路由表
|
|
|
|
export function resetRouter() {
|
|
|
|
if (store.getters ?.routeReady && store.getters ?.userInfo ?.permission ?.menus) {
|
|
|
|
const menus = store.getters.userInfo.permission.menus;
|
|
|
|
menus.forEach((menu) => {
|
|
|
|
router.removeRoute(menu);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
export default router;
|