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