<template>
  <div class="ems-dashboard-editor-container tjbb-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+'tjbbChildrenRoute'">
          <router-link  style="height: 100%;width: 100%;display: block" :to="{path:item.path,query:$route.query}">
            {{item.meta.title}}
          </router-link>
        </div>
      </div>
    </div>
    <div class="ems-content-container ems-content-container-padding tjbb-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==='DjzkTjbb').children//获取到统计报表下面的字路由
console.log('设备监控子路由',childrenRoute)
export default {
  name:'DzjkTjbb',
  data(){
    return {
      childrenRoute,
      activeMenu:''
    }
  },
  mounted() {
    console.log('当前统计报表页面路由',this.$route)
  }

}
</script>

<style scoped lang="scss">
.tjbb-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;
  }
}
.tjbb-ems-content-container{
  margin-top:0;
  padding-top:0;
  padding-right: 0;
  flex: 1;
}
</style>

