<template>
  <div class="app-container">
    <student-table ref="studentTable" />
  </div>
</template>

<script>
import studentCourseSignUpTable from '@/components/sc/student/studentCourseSignUpTable'
import studentTable from '@/components/sc/student/studentTable'

export default {
  name: 'Student',
  components: {
    studentCourseSignUpTable,
    studentTable
  },
  data() {
    return {
      activeTab: 'studentList'
    }
  },
  created() {
    const params = this.$route.params
    if (typeof params === 'object') {
      if (params.activeTab) {
        this.activeTab = params.activeTab
      }
    }
  },
  methods: {
    handleTabChange(tab) {
      if (tab.name === 'studentList') {
        // 会员列表
      } else if (tab.name === 'studentSignUpList') {
        // 报读列表
        this.$refs.studentCourseSignUpTable.getList()
      }
    }
  }
}
</script>
