import Vue from "vue"; import VueRouter from "vue-router"; Vue.use(VueRouter); const routes = [ { path: "/", redirect: "/stritl", component: () => import("../components/Home.vue"), children: [ { path: "/stritl", component: () => import("../views/homePage/index.vue"), name: "stritl", meta: { title: "首页", icon: "el-icon-s-home", keepAlive: true, }, }, { path: "/realTimeMonitor", component: () => import("../views/realTimeMonitor/index.vue"), name: "realTimeMonitor", meta: { title: "实时监控", permission: true, icon: "el-icon-camera", keepAlive: true, }, }, { path: "/pictureRotation", component: () => import("../views/pictureRotation/index.vue"), name: "pictureRotation", meta: { title: "图片轮巡", permission: true, icon: "el-icon-camera", keepAlive: true, }, }, { path: "/realTimeSearch", component: () => import("../views/realTimeSearch/index.vue"), name: "realTimeSearch", meta: { title: "历史图片", permission: true, icon: "el-icon-camera", //keepAlive: true, }, }, { path: "/photoAlarm", component: () => import("../views/alarmHandling/index.vue"), name: "alarmHandling", meta: { title: "告警处理", permission: true, icon: "el-icon-camera", keepAlive: true, }, }, { path: "/userManagement", component: () => import("../views/system/userManagement.vue"), name: "userManagement", meta: { title: "用户管理", icon: "el-icon-monitor", keepAlive: true }, }, { path: "/roleManagement", component: () => import("../views/system/roleManagement/index.vue"), name: "roleManagement", meta: { title: "角色管理", icon: "el-icon-monitor", keepAlive: true }, }, { path: "/globalTools", component: () => import("../views/system/globalTools/index.vue"), name: "globalTools", meta: { title: "全局设置", keepAlive: true }, }, { path: "/lineInformation", component: () => import("../views/lineInformation/index.vue"), name: "lineInformation", meta: { title: "线路信息管理", icon: "", keepAlive: true }, }, { path: "/towerInformation", component: () => import("../views/towerInformation/index.vue"), name: "towerInformation", meta: { title: "杆塔信息管理", icon: "", keepAlive: true }, }, { path: "/cameraChannel", component: () => import("../views/cameraChannel/index.vue"), name: "cameraChannel", meta: { title: "通道管理", icon: "", keepAlive: true }, }, { path: "/photographicDevice", component: () => import("../views/photographicDevice/index.vue"), name: "photographicDevice", meta: { title: "拍照装置管理", icon: "", keepAlive: true }, }, { path: "/devicePhotoSchedule", component: () => import("../views/devicePhotoSchedule/index.vue"), name: "devicePhotoSchedule", meta: { title: "拍照时间表设置", icon: "", keepAlive: true }, }, { path: "/waterMark", component: () => import("../views/waterMark/index.vue"), name: "waterMark", meta: { title: "水印下发", icon: "", keepAlive: true }, }, { path: "/echarts", component: () => import("../echartsDemo.vue"), name: "echartsDemo", meta: { title: "echarts图表", icon: "", keepAlive: true }, }, //气象检测 // { // path: "/weather", // component: () => import("../views/weather/index.vue"), // name: "weather", // meta: { title: "气象检测", icon: "", keepAlive: true }, // }, // //覆冰 // { // path: "/icing", // component: () => import("../views/icing/index.vue"), // name: "icing", // meta: { title: "覆冰", icon: "", keepAlive: true }, // }, ], }, { path: "/login", name: "login", component: () => import("../views/login/index.vue"), meta: { title: "登录" }, }, ]; const router = new VueRouter({ mode: "hash", base: process.env.BASE_URL, routes, }); export default router;