Files
emsfront/src/views/ems/dzjk/sbjk/index.vue
2025-06-18 01:01:17 +08:00

75 lines
1.8 KiB
Vue

<template>
<div class="ems-dashboard-editor-container sbjk-ems-dashboard-editor-container">
<div class="router-container">
<div>
<div class="route-link" :class="{'active':item.name === $route.name}" v-for="(item,index) in childrenRoute" :key="index+'dzjkChildrenRoute'">
<router-link style="height: 100%;width: 100%;display: block" :to="item.path">
{{item.meta.title}}
</router-link>
</div>
</div>
</div>
<div class="ems-content-container ems-content-container-padding sbjk-ems-content-container">
<keep-alive>
<router-view></router-view>
</keep-alive>
</div>
</div>
</template>
<script>
import { dzjk } from '@/router/ems'
const childrenRoute = dzjk[0].children[0].children.find(item=> item.name==='DjzkSbjk').children//获取到单站监控-设备监控下面的字路由
console.log('设备监控子路由',childrenRoute)
export default {
data(){
return {
childrenRoute,
activeMenu:''
}
},
mounted() {
console.log('当前设备监控页面路由',this.$route)
}
}
</script>
<style scoped lang="scss">
.sbjk-ems-dashboard-editor-container{
display: flex;
padding:0;
background: #FFFFFF;
}
.router-container{
&>div{
border: 1px solid #dcdfe6;
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, .12), 0 0 6px 0 rgba(0, 0, 0, .04);
display: flex;
flex-direction: column;
}
.route-link{
width: 104px;
height: 40px;
line-height: 40px;
background-color: #ffffff;
color: #666666;
font-size: 14px;
text-align: center;
}
.route-link.active{
background-color: #FFBE29 ;
color: #333333;
font-weight: 500;
}
}
.sbjk-ems-content-container{
margin-top:0;
padding-top:0;
padding-right: 0;
flex: 1;
}
</style>