<template>
  <div class="manage-container">
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane :label="$t('task.gjrw')" name="first">
        <alarm ref="alarm"></alarm>
      </el-tab-pane>
      <el-tab-pane :label="$t('task.wbrw')" name="second">
        <mains ref="main"></mains>
      </el-tab-pane>
      <el-tab-pane :label="$t('task.qtrw')" name="third">
        <other ref="other"></other>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import alarm from './components/alarm/index';
import mains from './components/main/index';
import other from './components/other/index';

export default {
  components: {
    alarm,
    mains,
    other,
  },
  data() {
    return {
      activeName: 'first',
    };
  },
  methods: {
    handleClick(tab, event) {
      if (tab.paneName == 'first') {
        this.$refs['alarm'].alarmIndex();
      } else if (tab.paneName == 'second') {
        this.$refs['main'].mainIndex();
      } else if (tab.paneName == 'third') {
        this.$refs['other'].otherIndex();
      }
    },
  },
};
</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>
