<template>
  <div>
    <TeacherList v-show="activeName=='TeacherList'" ref="teacherList" />
    <TeacherEdit v-if="activeName=='TeacherEdit'" />
    <TeacherInfo v-if="activeName=='TeacherInfo'" />
    <CertificateList v-if="activeName=='CertificateList'" />
    <CertificateEdit v-if="activeName=='CertificateEdit'" />
    <CertificateInfo v-if="activeName=='CertificateInfo'" />
  </div>
</template>

<script>
import TeacherList from './teacher/components/list'
import TeacherEdit from './teacher/components/edit'
import TeacherInfo from './teacher/components/info'
import CertificateList from './certificate/components/list'
import CertificateEdit from './certificate/components/edit'
import CertificateInfo from './certificate/components/info'
export default {
  components: {
    TeacherList: TeacherList,
    TeacherEdit: TeacherEdit,
    TeacherInfo: TeacherInfo,
    CertificateList: CertificateList,
    CertificateEdit: CertificateEdit,
    CertificateInfo: CertificateInfo
  },
  data() {
    return {
      activeName: 'TeacherList',
      TEACHER_ID: '',
      TEACHERCERTIFICATE_ID: ''
    }
  },
  watch: {
    activeName(val) {
      if (val == 'TeacherList') {
        this.$refs.teacherList.getQuery()
      }
    }
  }
}
</script>

<style scoped>
</style>
