<template>
  <div class="manage-container">
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane :label="$t('dfunction.zdyyxbb')" name="first">
        <site-month ref="site"></site-month>
      </el-tab-pane>
      <el-tab-pane :label="$t('dfunction.slbb')" name="second">
        <water-month ref="water"></water-month>
      </el-tab-pane>
      <el-tab-pane :label="$t('dfunction.dlyb')" name="three">
        <elec-month ref="elec"></elec-month>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>
<script>
import elecMonth from './components/elecMonth';
import waterMonth from './components/waterMonth';
import siteMonth from './components/siteMonth';
export default {
  name: 'Index',
  components: {
    elecMonth,
    waterMonth,
    siteMonth,
  },
  data() {
    return {
      activeName: 'first',
    };
  },
  computed: {
    height() {
      return 500;
    },
  },
  mounted() {},
  methods: {
    handleClick(tab) {
      if (tab.paneName == 'first') {
        this.$refs['site'].showData();
      } else if (tab.paneName == 'second') {
        this.$refs['water'].showData();
      } else if (tab.paneName == 'three') {
        this.$refs['elec'].showData();
      }
    },
  },
};
</script>

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

  .el-form-item {
    width: 360px;
  }
}
</style>

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