OnlinePracticeRecordDetail.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <template>
  2. <main-layout>
  3. <Breadcrumb style="text-align: left; padding-left: 20px; height: 40px; line-height: 40px; background-color: #fafafa;">
  4. 当前所在位置:
  5. <BreadcrumbItem>在线练习</BreadcrumbItem>
  6. <BreadcrumbItem>练习详情</BreadcrumbItem>
  7. <BreadcrumbItem>成绩报告</BreadcrumbItem>
  8. </Breadcrumb>
  9. <div class="home">
  10. <div class="qm-title-text">练习情况概率(科目:{{examRecordResult.courseName}})</div>
  11. <div style="display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 20px; text-align: left">
  12. <div>答题正确率: <span>{{examRecordResult.objectiveAccuracy}}%</span></div>
  13. </div>
  14. <div class="list">
  15. <table>
  16. <tbody class="list-row">
  17. <tr class="list-header qm-primary-strong-text">
  18. <td>题目分类</td>
  19. <td>题量</td>
  20. <td>正确</td>
  21. <td>错误</td>
  22. <td>未答</td>
  23. </tr>
  24. <tr v-for="record in examRecordResult.paperStructInfos" :key="record.index">
  25. <td>{{ record.title }}</td>
  26. <td>{{ record.questionCount }}</td>
  27. <td>{{ record.succQuestionNum }}</td>
  28. <td>{{ record.failQuestionNum }}</td>
  29. <td>{{ record.notAnsweredCount }}</td>
  30. </tr>
  31. </tbody>
  32. </table>
  33. <div class="info-text">
  34. <h4 class="font-thin text-primary-lt m-t">报告提示:</h4>
  35. <div class="scroll-y wrapper-sm" style="min-height: 80px;">
  36. <p class="m-b-sm">1、若本练习卷中包含部分主观题型,则报告统计数据仅供参考,因为部分题型需考生根据参考答案判断正确和错误,报告仅对可统计的题型进行统计。</p>
  37. <p class="m-b-sm">2、若单题存在多处作答,只要有一处出错,该题就判为错题。</p>
  38. </div>
  39. </div>
  40. </div>
  41. </div>
  42. <ExamPaper :examId="examId" :examRecordDataId="examRecordDataId" />
  43. </main-layout>
  44. </template>
  45. <script>
  46. // import { createNamespacedHelpers } from "vuex";
  47. import moment from "moment";
  48. // import { mapState as globalMapState } from "vuex";
  49. // const { mapMutations } = createNamespacedHelpers("examHomeModule");
  50. import ExamPaper from "../OnlineExam/Examing/ExamPaper.vue";
  51. export default {
  52. name: "OnlinePracticeRecordDetail",
  53. data() {
  54. return { examRecordResult: [] };
  55. },
  56. async created() {
  57. try {
  58. const res = await this.$http.get(
  59. "/api/ecs_oe_student/practice/getPracticeDetailInfo?examRecordDataId=" +
  60. this.$route.query.examRecordDataId
  61. );
  62. this.examRecordResult = res.data || [];
  63. } catch (error) {
  64. this.$Message.error("查询练习试卷详情出错!");
  65. }
  66. },
  67. methods: {
  68. async enterPracticeRecord(course) {
  69. this.$router.push(
  70. `/online-practice/exam/${course.examId}/detail?examStudentId=${
  71. course.examStudentId
  72. }`
  73. );
  74. },
  75. formatTime(ms) {
  76. return moment.utc(ms).format("HH:mm:ss") || "";
  77. }
  78. },
  79. computed: {
  80. examRecordDataId() {
  81. return this.$route.query.examRecordDataId - 0;
  82. },
  83. examId() {
  84. return this.$route.params.examId - 0;
  85. }
  86. },
  87. components: {
  88. ExamPaper
  89. }
  90. };
  91. </script>
  92. <style scoped>
  93. .home {
  94. margin: 20px;
  95. }
  96. .list {
  97. border: 1px solid #eeeeee;
  98. border-radius: 6px;
  99. }
  100. .list table {
  101. width: 100%;
  102. border-collapse: collapse !important;
  103. border-spacing: 0;
  104. }
  105. .list td {
  106. border: 1px solid #eeeeee;
  107. border-radius: 6px;
  108. border-collapse: separate !important;
  109. padding: 10px;
  110. }
  111. .list .info-text {
  112. text-align: left;
  113. padding: 5px;
  114. }
  115. </style>