<template>
  <div class="manage-container">
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="水质申请" name="first">
        <apply ref="apply"></apply>
      </el-tab-pane>
      <el-tab-pane label="水质检测" name="second">
        <testing ref="testing"></testing>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import apply from './components/apply';
import testing from './components/testing';
export default {
  components: {
    apply,
    testing,
  },
  data() {
    return {
      activeName: 'first',
    };
  },
  methods: {
    handleClick(tab, event) {
      if (tab.paneName == 'first') {
        this.$refs['apply'].applyIndex();
      } else if (tab.paneName == 'second') {
        this.$refs['testing'].testingIndex();
      }
    },
  },
};
</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>
