<template>
   <div class="block">
      <h3 class="v-title mb-12">考试统计</h3>
      <div class="flex-h">
        <OrgUserChart class="chart" @change="(user)=>(curUser=user)" />
        <div class="flex-h flex-wrap flex-1">
          <template v-if="$store.statistic_tab_active === 0">
            <StudentsScorePassPercent :user="curUser" />
            <ExamStudentScoreTower :user="curUser" />
            <ExamStudentTimesTower :user="curUser" />
            <StudentsMistakesTypePercent :user="curUser" />
          </template>
          <template v-else>
            <ExamDetailsStudentScoreTable :user="curUser" />
          </template>
        </div>
      </div>
   </div>
</template>

<script>
import OrgUserChart from '@/views/statistic/components/OrgUserChart.vue'
import ExamStudentTimesTower from './ExamStudentTimesTower.vue'
import ExamStudentScoreTower from './ExamStudentScoreTower.vue'
import StudentsScorePassPercent from './StudentsScorePassPercent.vue'
import StudentsMistakesTypePercent from './StudentsMistakesTypePercent.vue'
import ExamDetailsStudentScoreTable from './ExamDetailsStudentScoreTable.vue'
export default {
  data: (_) => ({
    curUser: null
  }),
  components: {
    OrgUserChart,
    ExamStudentTimesTower,
    StudentsScorePassPercent,
    ExamStudentScoreTower,
    StudentsMistakesTypePercent,
    ExamDetailsStudentScoreTable
  }
}
</script>
