<template>
  <div class="manage-container">
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane :label="$t('maintenance.zxbx')" name="first">
        <online-index ref="online"></online-index>
      </el-tab-pane>
      <el-tab-pane :label="$t('maintenance.sbgl')" name="second">
        <equipment-index ref="equipment"></equipment-index>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import onlineIndex from './components/online';
import equipmentIndex from './components/equipment';
export default {
  name: 'Index',
  components: {
    onlineIndex,
    equipmentIndex,
  },
  data() {
    return {
      activeName: 'first',
    };
  },
  computed: {
    height() {
      return 500;
    },
  },
  mounted() {},
  methods: {
    handleClick(tab) {
      if (tab.paneName == 'first') {
        this.$refs['online'].showData();
      } else if (tab.paneName == 'second') {
        this.$refs['equipment'].showData();
      }
    },
  },
};
</script>

<style lang="scss">
.el-submenu__title:hover {
  background-color: rgba(#1890ff, 0.085) !important;
  color: hsla(208, 100%, 55%, 0.95) !important;
}
.el-dialog {
  .el-dialog__header {
    background-color: #1890ff !important;
    padding: 15px 20px;
    text-align: left !important;
    .el-dialog__title {
      color: #e8f4ff !important;
    }
    .el-dialog__headerbtn .el-dialog__close {
      color: #e8f4ff !important;
    }
  }
  .el-dialog__body {
    padding: 20px !important;
    .el-form-item {
      margin-bottom: 10px !important;
      .el-input {
        width: 100% !important;
      }
      .el-select {
        width: 100% !important;
      }
    }
    .el-form-item:last-child {
      margin-bottom: 20px !important;
    }
  }
}
</style>
