<template>
  <div class="manage-container">
    <el-tabs
      v-model="activeName"
      class="tabRight"
      type="card"
      @tab-click="handleClick"
    >
      <el-tab-pane :label="$t('site.zdsjhz')" name="first">
        <site-index ref="site"></site-index>
      </el-tab-pane>
      <!--      <el-tab-pane label="站点实时数据" name="second">-->
      <!--        <real-index ref="real"></real-index>-->
      <!--      </el-tab-pane>-->
    </el-tabs>
  </div>
</template>

<script>
import siteIndex from './components/siteIndex';
export default {
  name: 'Manage',
  components: {
    siteIndex,
  },
  data() {
    return {
      roleData: [],
      lazy: true,
      activeName: 'first',
      layout: 'total, sizes, prev, pager, next, jumper',
      total: 0,
      background: true,
      listLoading: true,
      elementLoadingText: '正在加载...',
      queryForm: {
        page: 1,
        size: 20,
        name: '',
      },
    };
  },
  computed: {
    height() {
      return 500;
    },
  },
  methods: {
    handleClick(tab, event) {
      console.log(tab, event);
      if (tab.paneName == 'second') {
        this.$refs['real'].realIndex();
      } else {
        this.$refs['site'].siteIndex();
      }
    },
  },
};
</script>

<style lang="scss" scoped>
.manage-container {
  width: 100%;

  .vab-query-form {
    margin-bottom: 30px;

    .el-input {
      width: 180px;
      margin-right: 20px;
    }
  }
}
</style>

<style lang="scss">
.el-submenu__title:hover {
  background-color: rgba(#1890ff, 0.085) !important;
  color: hsla(208, 100%, 55%, 0.95) !important;
}
</style>
