ReportSummary.vue 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <template>
  2. <div class="report-summary">
  3. <report-box title="总览">
  4. <h1 class="report-title">
  5. {{ baseinfo.semesterName }}{{ baseinfo.examName }}
  6. </h1>
  7. <h1 class="report-sub-title">{{ baseinfo.courseName }} | 成绩报告</h1>
  8. <h2 class="page-title-2 mb-15">考试概况</h2>
  9. <table class="report-table report-table-border mb-15">
  10. <tr>
  11. <th>总考生数</th>
  12. <th>实考</th>
  13. <th>缺考</th>
  14. <th>违纪</th>
  15. <th>平均分</th>
  16. <th>最高分</th>
  17. <th>最低分</th>
  18. <th>及格人数</th>
  19. <th>及格率(%)</th>
  20. <th>优秀人数</th>
  21. <th>优秀率(%)</th>
  22. </tr>
  23. <tr>
  24. <td>{{ overview.studentCount }}</td>
  25. <td>{{ overview.actualCount }}</td>
  26. <td>{{ overview.absentCount }}</td>
  27. <td>{{ overview.breachCount }}</td>
  28. <td>{{ overview.avgScore }}</td>
  29. <td>{{ overview.maxScore }}</td>
  30. <td>{{ overview.minScore }}</td>
  31. <td>{{ overview.passCount }}</td>
  32. <td>{{ overview.passRate }}</td>
  33. <td>{{ overview.excellentCount }}</td>
  34. <td>{{ overview.excellentRate }}</td>
  35. </tr>
  36. </table>
  37. <h2 class="page-title-2 mb-15">成绩分数段分析</h2>
  38. <div class="summary-chart mb-15">
  39. <v-chart
  40. v-if="scoreRangeChart"
  41. :option="scoreRangeChart"
  42. :init-options="initOption"
  43. ></v-chart>
  44. </div>
  45. <p>说明:10-分数段表示10-20分,包含10分,不包含20分</p>
  46. <table class="report-table report-table-border">
  47. <tr>
  48. <th>分数段</th>
  49. <th>分数段人数</th>
  50. <th>占比(%)</th>
  51. </tr>
  52. <tr v-for="(item, ind) in scoreRange" :key="ind">
  53. <td>{{ item.minScore }}-</td>
  54. <td>{{ item.studentCount }}</td>
  55. <td>{{ item.rate }}</td>
  56. </tr>
  57. </table>
  58. </report-box>
  59. </div>
  60. </template>
  61. <script>
  62. import { mapState } from "vuex";
  63. import ReportBox from "./ReportBox.vue";
  64. import { getScoreBarOptions, initOption } from "./chart";
  65. export default {
  66. name: "report-summary",
  67. components: { ReportBox },
  68. data() {
  69. return {
  70. scoreRangeChart: null,
  71. initOption,
  72. };
  73. },
  74. computed: {
  75. ...mapState("report", ["overview", "scoreRange", "baseinfo"]),
  76. },
  77. mounted() {
  78. this.initData();
  79. },
  80. methods: {
  81. initData() {
  82. this.scoreRangeChart = getScoreBarOptions(this.scoreRange);
  83. },
  84. },
  85. };
  86. </script>