<template>
  <div class="manage-container">
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="基本资料" name="first">
        <basic-index ref="basic"></basic-index>
      </el-tab-pane>
      <el-tab-pane label="修改密码" name="second">
        <resetting-index ref="resetting"></resetting-index>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import resettingIndex from './components/resetting';
import basicIndex from './components/basic';
export default {
  components: {
    resettingIndex,
    basicIndex,
  },
  data() {
    return {
      activeName: 'first',
      form: {
        name: '',
        gender: '',
        tel: '',
        mail: '',
        department: '',
        role: '',
        date: '',
        password1: '',
        password2: '',
        password3: '',
      },
    };
  },
  methods: {
    handleClick(tab, event) {
      if (tab.paneName == 'first') {
        this.$refs['basic'].showData();
      } else if (tab.paneName == 'second') {
        this.$refs['resetting'].showData();
      }
    },
  },
};
</script>

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

<style lang="scss" scoped>
.el-form-item {
  margin-bottom: 10px !important;
  .el-input {
    width: 360px !important;
  }
  .el-select {
    width: 360px !important;
  }
  .el-cascader {
    width: 360px !important;
  }
}
</style>
