|
@@ -1,396 +1,404 @@
|
|
|
import {
|
|
|
- createRouter,
|
|
|
- createWebHistory,
|
|
|
- createWebHashHistory,
|
|
|
+ createRouter,
|
|
|
+ createWebHistory,
|
|
|
+ createWebHashHistory,
|
|
|
} from "vue-router";
|
|
|
import Home from "../pages/Home.vue";
|
|
|
import store from "@/store";
|
|
|
import { getCookie } from "@/utils/auth";
|
|
|
const routes = [
|
|
|
- { path: "/", redirect: "/safe/realwaring" },
|
|
|
- {
|
|
|
- path: "/",
|
|
|
- name: "Home",
|
|
|
- redirect: "/safe/realwaring",
|
|
|
-
|
|
|
- component: Home,
|
|
|
- children: [
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ { path: "/", redirect: "/safe/realwaring" },
|
|
|
+ {
|
|
|
+ path: "/",
|
|
|
+ name: "Home",
|
|
|
+ redirect: "/safe/realwaring",
|
|
|
+
|
|
|
+ component: Home,
|
|
|
+ children: [
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
- {
|
|
|
- icon: "iconfont iconfengji",
|
|
|
- path: "/safe",
|
|
|
- name: "safe",
|
|
|
- redirect: "/safe/realwaring",
|
|
|
- meta: {
|
|
|
- title: "安全运行",
|
|
|
- },
|
|
|
- component: () =>
|
|
|
- import ("../pages/routerView.vue"),
|
|
|
- children: [{
|
|
|
- path: "/safe/realwaring",
|
|
|
- name: "saferealwaring",
|
|
|
- meta: {
|
|
|
- title: "实时报警",
|
|
|
- keepAlive: true,
|
|
|
- },
|
|
|
- component: () =>
|
|
|
- import (
|
|
|
-
|
|
|
- "../pages/safe/realwaring.vue"
|
|
|
- ),
|
|
|
- },
|
|
|
- {
|
|
|
- path: "/safe/historywaring/:deviceId?/:alarmId?",
|
|
|
- name: "safehistorywaring",
|
|
|
- meta: {
|
|
|
- title: "报警记录",
|
|
|
- },
|
|
|
- component: () =>
|
|
|
- import (
|
|
|
-
|
|
|
- "../pages/safe/historywaring.vue"
|
|
|
- ),
|
|
|
- },
|
|
|
- {
|
|
|
- path: "/safe/dataSearch",
|
|
|
- name: "safedataSearch",
|
|
|
- meta: {
|
|
|
- title: "数据查询",
|
|
|
- },
|
|
|
- component: () =>
|
|
|
- import (
|
|
|
-
|
|
|
- "../pages/safe/datasearch.vue"
|
|
|
- ),
|
|
|
- },
|
|
|
- ],
|
|
|
+ {
|
|
|
+ icon: "iconfont iconfengji",
|
|
|
+ path: "/safe",
|
|
|
+ name: "safe",
|
|
|
+ redirect: "/safe/realwaring",
|
|
|
+ meta: {
|
|
|
+ title: "安全运行",
|
|
|
+ },
|
|
|
+ component: () => import("../pages/routerView.vue"),
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ path: "/safe/realwaring",
|
|
|
+ name: "saferealwaring",
|
|
|
+ isshow: "super_admin,common",
|
|
|
+ meta: {
|
|
|
+ title: "实时报警",
|
|
|
+ keepAlive: true,
|
|
|
+ },
|
|
|
+ component: () =>
|
|
|
+ import(
|
|
|
+
|
|
|
+ "../pages/safe/realwaring.vue"
|
|
|
+ ),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: "/safe/historywaring/:deviceId?/:alarmId?",
|
|
|
+ name: "safehistorywaring",
|
|
|
+ isshow: "super_admin,common",
|
|
|
+ meta: {
|
|
|
+ title: "报警记录",
|
|
|
+ },
|
|
|
+ component: () =>
|
|
|
+ import(
|
|
|
+
|
|
|
+ "../pages/safe/historywaring.vue"
|
|
|
+ ),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: "/safe/dataSearch",
|
|
|
+ name: "safedataSearch",
|
|
|
+ isshow: "super_admin,common",
|
|
|
+ meta: {
|
|
|
+ title: "数据查询",
|
|
|
},
|
|
|
+ component: () =>
|
|
|
+ import(
|
|
|
+
|
|
|
+ "../pages/safe/datasearch.vue"
|
|
|
+ ),
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
|
|
|
- {
|
|
|
- icon: "iconfont iconguzhangzhenduan",
|
|
|
- path: "/faultDiagnosis",
|
|
|
- name: "faultDiagnosis",
|
|
|
- redirect: "/faultDiagnosis/warning",
|
|
|
- meta: {
|
|
|
- title: "状态检修",
|
|
|
- permission: true,
|
|
|
- },
|
|
|
- component: () =>
|
|
|
- import (
|
|
|
-
|
|
|
- "../pages/routerView.vue"
|
|
|
- ),
|
|
|
- children: [
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- {
|
|
|
- icon: "el-icon-s-home",
|
|
|
- path: "/basedata/FanDataStatisticTable",
|
|
|
- name: "FanDataStatisticTable",
|
|
|
- meta: {
|
|
|
- title: "原始报警分析",
|
|
|
- keepAlive: true,
|
|
|
- },
|
|
|
- component: () =>
|
|
|
- import ("../pages/baseData/FanDataStatisticTable.vue"),
|
|
|
- },
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ {
|
|
|
+ icon: "iconfont iconguzhangzhenduan",
|
|
|
+ path: "/faultDiagnosis",
|
|
|
+ name: "faultDiagnosis",
|
|
|
+ isshow: "super_admin,common",
|
|
|
+ redirect: "/faultDiagnosis/warning",
|
|
|
+ meta: {
|
|
|
+ title: "状态检修",
|
|
|
+ permission: true,
|
|
|
+ },
|
|
|
+ component: () =>
|
|
|
+ import(
|
|
|
+
|
|
|
+ "../pages/routerView.vue"
|
|
|
+ ),
|
|
|
+ children: [
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ {
|
|
|
+ icon: "el-icon-s-home",
|
|
|
+ path: "/basedata/FanDataStatisticTable",
|
|
|
+ name: "FanDataStatisticTable",
|
|
|
+ isshow: "super_admin,common",
|
|
|
+ meta: {
|
|
|
+ title: "原始报警分析",
|
|
|
+ keepAlive: true,
|
|
|
+ },
|
|
|
+ component: () =>
|
|
|
+ import("../pages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|
|
|
+ {
|
|
|
+ icon: "iconfont iconbaojingpeizhi",
|
|
|
+ path: "/alarmconfig",
|
|
|
+ name: "alarmconfig",
|
|
|
+ isshow: "super_admin,common",
|
|
|
+ redirect: "/alarmconfig/station",
|
|
|
+ meta: {
|
|
|
+ title: "预警配置",
|
|
|
+ },
|
|
|
+ component: () =>
|
|
|
+ import(
|
|
|
+
|
|
|
+ "../pages/routerView.vue"
|
|
|
+ ),
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ icon: "el-icon-s-home",
|
|
|
+ path: "/alarmConfig/custom",
|
|
|
+ isshow: "super_admin,common",
|
|
|
+ name: "alarmConfigcustom",
|
|
|
+ meta: {
|
|
|
+ title: "自定义预警",
|
|
|
},
|
|
|
- {
|
|
|
- icon: "iconfont iconbaojingpeizhi",
|
|
|
- path: "/alarmconfig",
|
|
|
- name: "alarmconfig",
|
|
|
-
|
|
|
- redirect: "/alarmconfig/station",
|
|
|
- meta: {
|
|
|
- title: "预警配置",
|
|
|
- },
|
|
|
- component: () =>
|
|
|
- import (
|
|
|
-
|
|
|
- "../pages/routerView.vue"
|
|
|
- ),
|
|
|
- children: [{
|
|
|
- icon: "el-icon-s-home",
|
|
|
- path: "/alarmConfig/custom",
|
|
|
- name: "alarmConfigcustom",
|
|
|
- meta: {
|
|
|
- title: "自定义预警",
|
|
|
- },
|
|
|
- component: () =>
|
|
|
- import (
|
|
|
-
|
|
|
- "../pages/alarmConfig/bj_custom/custom.vue"
|
|
|
- ),
|
|
|
- },
|
|
|
- {
|
|
|
- icon: "el-icon-s-home",
|
|
|
- path: "/alarmConfig/fan",
|
|
|
- name: "alarmConfigfan",
|
|
|
- meta: {
|
|
|
- title: "风机报警",
|
|
|
- },
|
|
|
- component: () =>
|
|
|
- import (
|
|
|
-
|
|
|
- "../pages/alarmConfig/bj_windturbine/windturbine.vue"
|
|
|
- ),
|
|
|
- },
|
|
|
-
|
|
|
- {
|
|
|
- icon: "el-icon-s-home",
|
|
|
- path: "/alarmConfig/Logs",
|
|
|
- name: "alarmConfigLogs",
|
|
|
- meta: {
|
|
|
- title: "规则修改日志",
|
|
|
- },
|
|
|
- component: () =>
|
|
|
- import (
|
|
|
-
|
|
|
- "../pages/alarmConfig/Logs.vue"
|
|
|
- ),
|
|
|
- },
|
|
|
- ],
|
|
|
+ component: () =>
|
|
|
+ import(
|
|
|
+
|
|
|
+ "../pages/alarmConfig/bj_custom/custom.vue"
|
|
|
+ ),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ icon: "el-icon-s-home",
|
|
|
+ path: "/alarmConfig/fan",
|
|
|
+ isshow: "super_admin,common",
|
|
|
+ name: "alarmConfigfan",
|
|
|
+ meta: {
|
|
|
+ title: "风机报警",
|
|
|
},
|
|
|
+ component: () =>
|
|
|
+ import(
|
|
|
+
|
|
|
+ "../pages/alarmConfig/bj_windturbine/windturbine.vue"
|
|
|
+ ),
|
|
|
+ },
|
|
|
|
|
|
- {
|
|
|
- icon: "iconfont iconjichushuju",
|
|
|
- path: "/basedata",
|
|
|
- name: "basedata",
|
|
|
-
|
|
|
- redirect: "/basedata/station",
|
|
|
- meta: {
|
|
|
- title: "基础数据",
|
|
|
- },
|
|
|
- component: () =>
|
|
|
- import (
|
|
|
-
|
|
|
- "../pages/routerView.vue"
|
|
|
- ),
|
|
|
- children: [
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- {
|
|
|
- icon: "el-icon-s-home",
|
|
|
- path: "/basedata/dictionary",
|
|
|
- name: "basedatadictionary",
|
|
|
- meta: {
|
|
|
- title: "字典维护",
|
|
|
- keepAlive: true,
|
|
|
- },
|
|
|
- component: () =>
|
|
|
- import (
|
|
|
-
|
|
|
- "../pages/baseData/dictionary.vue"
|
|
|
- ),
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- {
|
|
|
- icon: "iconfont iconxitongcaidan",
|
|
|
- path: "/systemManage",
|
|
|
- isshow: "admin",
|
|
|
- name: "systemManage",
|
|
|
- meta: {
|
|
|
- title: "系统管理",
|
|
|
- },
|
|
|
- component: () =>
|
|
|
- import ("../pages/systemManage/systemManage.vue"),
|
|
|
+ {
|
|
|
+ icon: "el-icon-s-home",
|
|
|
+ path: "/alarmConfig/Logs",
|
|
|
+ isshow: "super_admin,common",
|
|
|
+ name: "alarmConfigLogs",
|
|
|
+ meta: {
|
|
|
+ title: "规则修改日志",
|
|
|
},
|
|
|
+ component: () =>
|
|
|
+ import(
|
|
|
+
|
|
|
+ "../pages/alarmConfig/Logs.vue"
|
|
|
+ ),
|
|
|
+ },
|
|
|
],
|
|
|
- },
|
|
|
- {
|
|
|
- path: "/login",
|
|
|
- name: "Login",
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ icon: "iconfont iconjichushuju",
|
|
|
+ path: "/basedata",
|
|
|
+ name: "basedata",
|
|
|
+ isshow: "super_admin",
|
|
|
+ redirect: "/basedata/station",
|
|
|
meta: {
|
|
|
- title: "登录",
|
|
|
+ title: "基础数据",
|
|
|
},
|
|
|
component: () =>
|
|
|
- import (
|
|
|
-
|
|
|
- "../pages/Login.vue"
|
|
|
- ),
|
|
|
- },
|
|
|
- {
|
|
|
+ import(
|
|
|
+
|
|
|
+ "../pages/routerView.vue"
|
|
|
+ ),
|
|
|
+ children: [
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ {
|
|
|
+ icon: "el-icon-s-home",
|
|
|
+ path: "/basedata/dictionary",
|
|
|
+ isshow: "super_admin",
|
|
|
+ name: "basedatadictionary",
|
|
|
+ meta: {
|
|
|
+ title: "字典维护",
|
|
|
+ keepAlive: true,
|
|
|
+ },
|
|
|
+ component: () =>
|
|
|
+ import(
|
|
|
+
|
|
|
+ "../pages/baseData/dictionary.vue"
|
|
|
+ ),
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ {
|
|
|
icon: "iconfont iconxitongcaidan",
|
|
|
- path: "/check",
|
|
|
-
|
|
|
- name: "check",
|
|
|
+ path: "/systemManage",
|
|
|
+ isshow: "super_admin",
|
|
|
+ name: "systemManage",
|
|
|
meta: {
|
|
|
- title: "单点登录",
|
|
|
+ title: "系统管理",
|
|
|
},
|
|
|
- component: () =>
|
|
|
- import ("@/pages/check/check.vue"),
|
|
|
+ component: () => import("../pages/systemManage/systemManage.vue"),
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: "/login",
|
|
|
+ name: "Login",
|
|
|
+ meta: {
|
|
|
+ title: "登录",
|
|
|
+ },
|
|
|
+ component: () =>
|
|
|
+ import(
|
|
|
+
|
|
|
+ "../pages/Login.vue"
|
|
|
+ ),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ icon: "iconfont iconxitongcaidan",
|
|
|
+ path: "/check",
|
|
|
+
|
|
|
+ name: "check",
|
|
|
+ meta: {
|
|
|
+ title: "单点登录",
|
|
|
},
|
|
|
+ component: () => import("@/pages/check/check.vue"),
|
|
|
+ },
|
|
|
];
|
|
|
const constantRoutes = [];
|
|
|
const router = createRouter({
|
|
|
- history: createWebHashHistory(""),
|
|
|
- routes,
|
|
|
+ history: createWebHashHistory(""),
|
|
|
+ routes,
|
|
|
});
|
|
|
|
|
|
-export default router;
|
|
|
+export default router;
|