Files
emsfront/src/views/ems/dzjk/sbjk/index.vue

67 lines
1.6 KiB
Vue
Raw Normal View History

2025-06-18 01:01:17 +08:00
<template>
2025-08-20 17:53:26 +08:00
<div
class="ems-dashboard-editor-container ems-content-container-padding sbjk-ems-dashboard-editor-container ems-third-menu-container"
>
2025-06-24 22:48:33 +08:00
<el-menu
class="ems-third-menu"
:default-active="$route.name"
background-color="#ffffff"
text-color="#666666"
active-text-color="#ffffff"
>
2025-08-20 17:53:26 +08:00
<el-menu-item
:index="item.name"
v-for="(item, index) in childrenRoute"
:key="index + 'dzjkChildrenRoute'"
>
<router-link
style="height: 100%; width: 100%; display: block"
:to="{ path: item.path, query: $route.query }"
>
{{ item.meta.title }}
2025-06-24 22:48:33 +08:00
</router-link>
</el-menu-item>
</el-menu>
2025-08-20 17:53:26 +08:00
<div
class="ems-content-container ems-content-container-padding sbjk-ems-content-container"
>
2025-06-18 01:01:17 +08:00
<keep-alive>
<router-view></router-view>
</keep-alive>
</div>
</div>
</template>
<script>
2025-08-20 17:53:26 +08:00
import { dzjk } from "@/router/ems";
const childrenRoute = dzjk[0].children.find(
(item) => item.name === "DzjkSbjk"
).children; //获取到单站监控-设备监控下面的字路由
console.log("设备监控子路由", childrenRoute);
2025-06-18 01:01:17 +08:00
export default {
2025-08-20 17:53:26 +08:00
name: "DzjkSbjk",
data() {
2025-06-18 01:01:17 +08:00
return {
childrenRoute,
2025-08-20 17:53:26 +08:00
activeMenu: "",
};
2025-06-18 01:01:17 +08:00
},
mounted() {
2025-08-20 17:53:26 +08:00
console.log("当前设备监控页面路由", this.$route);
},
};
2025-06-18 01:01:17 +08:00
</script>
<style scoped lang="scss">
2025-08-20 17:53:26 +08:00
.sbjk-ems-dashboard-editor-container {
2025-06-18 01:01:17 +08:00
display: flex;
2025-08-20 17:53:26 +08:00
background: #ffffff;
2025-06-18 01:01:17 +08:00
}
2025-08-20 17:53:26 +08:00
.sbjk-ems-content-container {
margin-top: 0;
padding-top: 0;
2025-06-18 01:01:17 +08:00
padding-right: 0;
flex: 1;
}
</style>