提交代码
This commit is contained in:
555
src/router/index.js
Normal file
555
src/router/index.js
Normal file
@ -0,0 +1,555 @@
|
||||
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,
|
||||
redirect: "/securityInformation",
|
||||
children: [
|
||||
{
|
||||
path: "/securityInformation",
|
||||
name: "securityInformation",
|
||||
component: () => import("@/views/backOfficeSystem/SecurityInformation/index"),
|
||||
meta: {
|
||||
title: "单位保安信息",
|
||||
icon: "article"
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/EntertainmentManagemnet",
|
||||
name: "EntertainmentManagemnet",
|
||||
meta: { title: "娱乐场所管理", icon: "article" },
|
||||
children: [
|
||||
{
|
||||
path: "/FaceCapture",
|
||||
name: "FaceCapture",
|
||||
component: () => import("@/views/backOfficeSystem/EntertainmentManagemnet/FaceCapture/index"),
|
||||
meta: {
|
||||
title: "人脸抓拍采集信息",
|
||||
icon: "article"
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/videoGame",
|
||||
name: "videoGame",
|
||||
component: () => import("@/views/backOfficeSystem/EntertainmentManagemnet/VideoGame/index"),
|
||||
meta: {
|
||||
title: "娱乐场所电子游戏机信息",
|
||||
icon: "article"
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/CaptureCapture",
|
||||
name: "CaptureCapture",
|
||||
component: () => import("@/views/backOfficeSystem/EntertainmentManagemnet/CaptureCapture/index"),
|
||||
meta: {
|
||||
title: "机动车抓拍采集信息",
|
||||
icon: "article"
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/PersonnelCapture",
|
||||
name: "PersonnelCapture",
|
||||
component: () => import("@/views/backOfficeSystem/EntertainmentManagemnet/PersonnelCapture/index"),
|
||||
meta: {
|
||||
title: "人员抓拍采集信息",
|
||||
icon: "article"
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/AcquisitionDevices",
|
||||
name: "AcquisitionDevices",
|
||||
component: () => import("@/views/backOfficeSystem/EntertainmentManagemnet/AcquisitionDevices/index"),
|
||||
meta: {
|
||||
title: "智能采集设备信息",
|
||||
icon: "article"
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/CheckInformation",
|
||||
name: "CheckInformation",
|
||||
component: () => import("@/views/backOfficeSystem/EntertainmentManagemnet/CheckInformation/index"),
|
||||
meta: {
|
||||
title: "公安机关日常检查信息",
|
||||
icon: "article"
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/Notices",
|
||||
name: "Notices",
|
||||
component: () => import("@/views/backOfficeSystem/EntertainmentManagemnet/Notices/index"),
|
||||
meta: {
|
||||
title: "通知通告信息",
|
||||
icon: "article"
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/LawsRegulations",
|
||||
name: "LawsRegulations",
|
||||
component: () => import("@/views/backOfficeSystem/EntertainmentManagemnet/LawsRegulations/index"),
|
||||
meta: {
|
||||
title: "法律法规信息",
|
||||
icon: "article"
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/SuspiciousCircumstances",
|
||||
name: "SuspiciousCircumstances",
|
||||
component: () => import("@/views/backOfficeSystem/EntertainmentManagemnet/SuspiciousCircumstances/index"),
|
||||
meta: {
|
||||
title: "可疑情况信息",
|
||||
icon: "article"
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/PolicePresence",
|
||||
name: "PolicePresence",
|
||||
component: () => import("@/views/backOfficeSystem/EntertainmentManagemnet/PolicePresence/index"),
|
||||
meta: {
|
||||
title: "警情情况信息",
|
||||
icon: "article"
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/EcurityDeviceInformation",
|
||||
name: "EcurityDeviceInformation",
|
||||
component: () => import("@/views/backOfficeSystem/EntertainmentManagemnet/EcurityDeviceInformation/index"),
|
||||
meta: {
|
||||
title: "安全防范设备信息",
|
||||
icon: "article"
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/CasesInvolved",
|
||||
name: "CasesInvolved",
|
||||
component: () => import("@/views/backOfficeSystem/EntertainmentManagemnet/CasesInvolved/index"),
|
||||
meta: {
|
||||
title: "从业人员涉及案事件信息",
|
||||
icon: "article"
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/VenueTriggerInformation",
|
||||
name: "VenueTriggerInformation",
|
||||
component: () => import("@/views/backOfficeSystem/EntertainmentManagemnet/VenueTriggerInformation/index"),
|
||||
meta: {
|
||||
title: "场所处罚信息",
|
||||
icon: "article"
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/PeaceCase",
|
||||
name: "PeaceCase",
|
||||
component: () => import("@/views/backOfficeSystem/EntertainmentManagemnet/PeaceCase/index"),
|
||||
meta: {
|
||||
title: "场所案事件信息",
|
||||
icon: "article"
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/Practitioners",
|
||||
name: "Practitioners",
|
||||
component: () => import("@/views/backOfficeSystem/EntertainmentManagemnet/Practitioners/index"),
|
||||
meta: {
|
||||
title: "从业人员",
|
||||
icon: "article"
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/VenueAttachments",
|
||||
name: "VenueAttachments",
|
||||
component: () => import("@/views/backOfficeSystem/EntertainmentManagemnet/VenueAttachments/index"),
|
||||
meta: {
|
||||
title: "娱乐场所附加信息管理",
|
||||
icon: "article"
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/PersonnelLogs",
|
||||
name: "PersonnelLogs",
|
||||
component: () => import("@/views/backOfficeSystem/EntertainmentManagemnet/PersonnelLogs/index"),
|
||||
meta: {
|
||||
title: "娱乐场所从业人员日志信息",
|
||||
icon: "article"
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/Entertainment",
|
||||
name: "Entertainment",
|
||||
component: () => import("@/views/backOfficeSystem/EntertainmentManagemnet/Entertainment/index"),
|
||||
meta: {
|
||||
title: "娱乐场所信息管理",
|
||||
icon: "article"
|
||||
}
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/Mechanics",
|
||||
name: "Mechanics",
|
||||
meta: { title: "机修业务", icon: "article" },
|
||||
children: [
|
||||
{
|
||||
path: "/AccidentVehicle",
|
||||
name: "AccidentVehicle",
|
||||
component: () => import("@/views/backOfficeSystem/Mechanics/AccidentVehicle/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"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
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" }
|
||||
},
|
||||
|
||||
],
|
||||
},
|
||||
{
|
||||
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;
|
Reference in New Issue
Block a user