diff --git a/src/router/index.js b/src/router/index.js index 39af3ca..c0be90e 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -96,6 +96,14 @@ export const constantRoutes = [ component: () => import("@/views/bigScreen/bigScreen"), meta: { title: "大屏总览", icon: "screen" }, }, + // 轮播监测 + { + path: '/path/to/monitor/:page?', + name:"monitor", + hidden: true, + component: () => import("@/views/components/monitor/index"), + meta: { title: "系统监测", icon: "monitor" }, + }, ]; // 动态路由,基于用户权限动态去加载 diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js index e757071..b1824f4 100644 --- a/src/store/modules/permission.js +++ b/src/store/modules/permission.js @@ -55,14 +55,6 @@ const permission = { // ); // 定义要添加的多个路由对象数组 const additionalRoutes = [ - { - path: "/monitorCenter", - name: "monitorCenter", - hidden: true, - component: () => - import("@/views/centerairC/sysMonitor/monitorCenter"), - meta: { title: "系统监测", icon: "screen" }, - }, { path: "/hostDetails", name: "hostDetails", @@ -91,90 +83,6 @@ const permission = { // console.log("不满足条件"); } - // // 风柜 - // const result2 = sidebarRoutes.find( - // (item) => item.name === "AircAndWindc" - // ); - // if (result2) { - // // 定义要添加的多个路由对象数组 - // const additionalRoutes2 = [ - // { - // path: "/asSysMonitorDetails", - // name: "asSysMonitorDetails", - // hidden: true, - // component: () => - // import( - // "@/views/aircAndWindc/awSysMonitor/asSysMonitorDetails" - // ), - // meta: { title: "系统监控", icon: "screen" }, - // }, - // // 可以继续添加更多路由对象 - // ]; - // // 循环添加额外的路由对象到各路由数组 - // additionalRoutes2.forEach((route) => { - // sidebarRoutes.push(route); - // rewriteRoutes.push(route); - // asyncRoutes.push(route); - // }); - // } else { - // // console.log("不满足条件"); - // } - - // // 锅炉 - // const result3 = sidebarRoutes.find( - // (item) => item.name === "BoilerSys" - // ); - // if (result3) { - // // 定义要添加的多个路由对象数组 - // const additionalRoutes3 = [ - // { - // path: "/boilerMonitorDetails", - // name: "boilerMonitorDetails", - // hidden: true, - // component: () => - // import( - // "@/views/boilerSys/boilerMonitor/boilerMonitorDetails" - // ), - // meta: { title: "锅炉监控", icon: "screen" }, - // }, - // { - // path: "/hotWaterBoilerDetails", - // name: "hotWaterBoilerDetails", - // hidden: true, - // component: () => - // import( - // "@/views/boilerSys/hotWaterBoiler/hotWaterBoilerDetails" - // ), - // meta: { title: "热水锅炉监控", icon: "screen" }, - // }, - // { - // path: "/heatingPumpDetails", - // name: "heatingPumpDetails", - // hidden: true, - // component: () => - // import("@/views/boilerSys/heatingPump/heatingPumpDetails"), - // meta: { title: "采暖泵监控", icon: "screen" }, - // }, - // { - // path: "/steamHeatingDetails", - // name: "steamHeatingDetails", - // hidden: true, - // component: () => - // import("@/views/boilerSys/steamHeating/steamHeatingDetails"), - // meta: { title: "蒸汽采暖运行监控", icon: "screen" }, - // }, - // // 可以继续添加更多路由对象 - // ]; - // // 循环添加额外的路由对象到各路由数组 - // additionalRoutes3.forEach((route) => { - // sidebarRoutes.push(route); - // rewriteRoutes.push(route); - // asyncRoutes.push(route); - // }); - // } else { - // // console.log("不满足条件"); - // } - // 热水 const result4 = sidebarRoutes.find( (item) => item.name === "HotWater" @@ -202,30 +110,6 @@ const permission = { // console.log("不满足条件"); } - // // 温度监测 - // const result5 = sidebarRoutes.find((item) => item.name === "TemSys"); - // if (result5) { - // // 定义要添加的多个路由对象数组 - // const additionalRoutes5 = [ - // { - // path: "/temMonitorDeatils", - // name: "temMonitorDeatils", - // hidden: true, - // component: () => - // import("@/views/temSys/temMonitor/temMonitorDeatils"), - // meta: { title: "温度监测", icon: "screen" }, - // }, - // ]; - // // 循环添加额外的路由对象到各路由数组 - // additionalRoutes5.forEach((route) => { - // sidebarRoutes.push(route); - // rewriteRoutes.push(route); - // asyncRoutes.push(route); - // }); - // } else { - // // console.log("不满足条件"); - // } - commit("SET_ROUTES", rewriteRoutes); commit("SET_SIDEBAR_ROUTERS", constantRoutes.concat(sidebarRoutes)); commit("SET_DEFAULT_ROUTES", sidebarRoutes); diff --git a/src/views/centerairC/sysMonitor/hostDetails.vue b/src/views/centerairC/sysMonitor/hostDetails.vue index 14eadec..7103826 100644 --- a/src/views/centerairC/sysMonitor/hostDetails.vue +++ b/src/views/centerairC/sysMonitor/hostDetails.vue @@ -374,7 +374,7 @@ export default { }, // 返回上一页 goBack() { - this.$router.back(); + this.$router.push('/path/to/monitor/0'); }, // 监测天数 getDayData() { diff --git a/src/views/centerairC/sysMonitor/index.vue b/src/views/centerairC/sysMonitor/index.vue index fb61bdd..96677af 100644 --- a/src/views/centerairC/sysMonitor/index.vue +++ b/src/views/centerairC/sysMonitor/index.vue @@ -11,7 +11,7 @@ export default { toPage() { console.log("需要跳转的") // 跳转到高校导航大屏展示 - this.$router.push("/monitorCenter") + this.$router.push('/path/to/monitor/0'); }, }, }; diff --git a/src/views/components/monitor/centerairMonitor.vue b/src/views/components/monitor/centerairMonitor.vue new file mode 100644 index 0000000..bcf7b91 --- /dev/null +++ b/src/views/components/monitor/centerairMonitor.vue @@ -0,0 +1,3190 @@ + + + + + + diff --git a/src/views/components/monitor/hotWaterMonitor.vue b/src/views/components/monitor/hotWaterMonitor.vue new file mode 100644 index 0000000..d6ceaa3 --- /dev/null +++ b/src/views/components/monitor/hotWaterMonitor.vue @@ -0,0 +1,2584 @@ + + + + + + diff --git a/src/views/components/monitor/index.vue b/src/views/components/monitor/index.vue new file mode 100644 index 0000000..9c84efb --- /dev/null +++ b/src/views/components/monitor/index.vue @@ -0,0 +1,648 @@ + + + + + diff --git a/src/views/hotWater/waterMonitor/index.vue b/src/views/hotWater/waterMonitor/index.vue index 849bb60..91bbe6b 100644 --- a/src/views/hotWater/waterMonitor/index.vue +++ b/src/views/hotWater/waterMonitor/index.vue @@ -11,7 +11,7 @@ export default { toPage() { console.log("需要跳转的") // 跳转到展示 - this.$router.push("/waterMonitorDetails") + this.$router.push('/path/to/monitor/1'); }, }, };