You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
185 lines
5.0 KiB
JavaScript
185 lines
5.0 KiB
JavaScript
import Vue from "vue";
|
|
import VueRouter from "vue-router";
|
|
|
|
Vue.use(VueRouter);
|
|
|
|
const routes = [
|
|
{
|
|
path: "/",
|
|
redirect: "/stritl",
|
|
},
|
|
{
|
|
path: "/",
|
|
component: () =>
|
|
import(/* webpackChunkName: "home" */ "../components/common/Home.vue"),
|
|
meta: { title: "首页" },
|
|
children: [
|
|
{
|
|
path: "/stritl",
|
|
component: () =>
|
|
import(
|
|
/* webpackChunkName: "dashboard" */ "../views/stritl/index.vue"
|
|
),
|
|
meta: {
|
|
title: "系统首页",
|
|
icon: "el-icon-s-home",
|
|
},
|
|
},
|
|
{
|
|
path: "/realTimeMonitor",
|
|
component: () =>
|
|
import(
|
|
/* webpackChunkName: "icon" */ "../views/realTimeMonitor/index.vue"
|
|
),
|
|
meta: {
|
|
title: "实时监控",
|
|
permission: true,
|
|
icon: "el-icon-camera",
|
|
},
|
|
},
|
|
{
|
|
path: "/pictureRotation",
|
|
component: () =>
|
|
import(
|
|
/* webpackChunkName: "table" */ "../views/pictureRotation/index.vue"
|
|
),
|
|
meta: {
|
|
title: "图片轮巡",
|
|
permission: true,
|
|
icon: "el-icon-film",
|
|
},
|
|
},
|
|
{
|
|
path: "/videoMonitor",
|
|
component: () =>
|
|
import(
|
|
/* webpackChunkName: "tabs" */ "../views/videoMonitor/index.vue"
|
|
),
|
|
meta: { title: "监控视频", icon: "el-icon-video-camera" },
|
|
},
|
|
{
|
|
path: "/videoHistory",
|
|
component: () =>
|
|
import(
|
|
/* webpackChunkName: "tabs" */ "../views/videoMonitor/videoHistory.vue"
|
|
),
|
|
meta: { title: "视频回放", icon: "el-icon-video-camera" },
|
|
},
|
|
{
|
|
path: "/photoAlarm",
|
|
component: () =>
|
|
import(
|
|
/* webpackChunkName: "tabs" */ "../views/alarmHandling/index.vue"
|
|
),
|
|
meta: { title: "告警处理", icon: "el-icon-bell" },
|
|
},
|
|
|
|
{
|
|
path: "/lineInformation",
|
|
component: () =>
|
|
import(
|
|
/* webpackChunkName: "tabs" */ "../views/management/userEquipment/lineInformation/index.vue"
|
|
),
|
|
meta: { title: "线路信息管理", icon: "" },
|
|
},
|
|
{
|
|
path: "/groupInformation",
|
|
component: () =>
|
|
import(
|
|
/* webpackChunkName: "tabs" */ "../views/management/userEquipment/groupInformation/index.vue"
|
|
),
|
|
meta: { title: "分组信息管理", icon: "" },
|
|
},
|
|
{
|
|
path: "/towerInformation",
|
|
component: () =>
|
|
import(
|
|
/* webpackChunkName: "tabs" */ "../views/management/userEquipment/towerInformation/index.vue"
|
|
),
|
|
meta: { title: "杆塔信息管理", icon: "" },
|
|
},
|
|
{
|
|
path: "/towerTeam",
|
|
component: () =>
|
|
import(
|
|
/* webpackChunkName: "tabs" */ "../views/management/userEquipment/towerTeam/index.vue"
|
|
),
|
|
meta: { title: "杆塔班组用户", icon: "" },
|
|
},
|
|
|
|
{
|
|
path: "/deviceVisualization",
|
|
component: () =>
|
|
import(
|
|
/* webpackChunkName: "tabs" */ "../views/management/monitoringEquipment/deviceVisualization/index.vue"
|
|
),
|
|
meta: { title: "装置分布可视化", icon: "" },
|
|
},
|
|
{
|
|
path: "/photographicDevice",
|
|
component: () =>
|
|
import(
|
|
/* webpackChunkName: "tabs" */ "../views/management/monitoringEquipment/photographicDevice/index.vue"
|
|
),
|
|
meta: { title: "拍照装置管理", icon: "" },
|
|
},
|
|
{
|
|
path: "/SIMCard",
|
|
component: () =>
|
|
import(
|
|
/* webpackChunkName: "tabs" */ "../views/management/monitoringEquipment/SIMCard/index.vue"
|
|
),
|
|
meta: { title: "SIM卡管理", icon: "" },
|
|
},
|
|
|
|
{
|
|
// 权限页面
|
|
path: "/permission",
|
|
component: () =>
|
|
import(
|
|
/* webpackChunkName: "permission" */ "../views/Permission.vue"
|
|
),
|
|
meta: { title: "权限测试", permission: true, icon: "el-icon-setting" },
|
|
},
|
|
{
|
|
path: "/404",
|
|
component: () =>
|
|
import(/* webpackChunkName: "404" */ "../views/404.vue"),
|
|
meta: { title: "404" },
|
|
},
|
|
{
|
|
path: "/403",
|
|
component: () =>
|
|
import(/* webpackChunkName: "403" */ "../views/403.vue"),
|
|
meta: { title: "403" },
|
|
},
|
|
],
|
|
},
|
|
{
|
|
path: "/login",
|
|
component: () =>
|
|
import(/* webpackChunkName: "login" */ "../views/Login.vue"),
|
|
meta: { title: "登录" },
|
|
},
|
|
{
|
|
path: "*",
|
|
redirect: "/404",
|
|
},
|
|
];
|
|
|
|
const router = new VueRouter({
|
|
mode: "history",
|
|
base: process.env.BASE_URL,
|
|
routes,
|
|
});
|
|
/**
|
|
* 重写 router.prototype.push 避免同时跳转相同路径报错
|
|
*/
|
|
const originalPush = VueRouter.prototype.push;
|
|
VueRouter.prototype.push = function push(location, onResolve, onReject) {
|
|
if (onResolve || onReject)
|
|
return originalPush.call(this, location, onResolve, onReject);
|
|
return originalPush.call(this, location).catch((err) => err);
|
|
};
|
|
export default router;
|