Michael Wang 6 лет назад
Родитель
Сommit
de264ecc7c

+ 1 - 1
src/features/OnlineExam/OnlineExamList.vue

@@ -20,7 +20,7 @@
               <i-button class="qm-primary-button" :disabled="!courseInBetween(course)" @click="enterExam(course)">进入考试</i-button>
               <i-poptip trigger="hover" placement="left" class="online-exam-list-override-poptip">
                 <i-button class="qm-primary-button" style="width: 100%">客观分</i-button>
-                <ecs-online-exam-result-list slot="content" :results="[{startTime: '2018-06-03 12:00:00', endTime: '2018-06-04 14:00:00', score: 100}]"></ecs-online-exam-result-list>
+                <ecs-online-exam-result-list slot="content" :examStudentId="course.examStudentId"></ecs-online-exam-result-list>
               </i-poptip>
             </div>
           </td>

+ 21 - 2
src/features/OnlineExam/OnlineExamResultList.vue

@@ -14,7 +14,12 @@
           <td>{{ index + 1 }}</td>
           <td>{{ course.startTime }}</td>
           <td>{{ course.endTime }}</td>
-          <td>{{ course.score }}</td>
+          <td v-if="course.isAuditing">审核中</td>
+          <td v-else>{{ course.objectiveScore }}</td>
+        </tr>
+
+        <tr v-if="loading">
+          加载中
         </tr>
       </tbody>
     </table>
@@ -25,7 +30,21 @@
 export default {
   name: "EcsOnlineExamResultList",
   props: {
-    results: Array
+    examStudentId: Number
+  },
+  data() {
+    return {
+      loading: true,
+      results: []
+    };
+  },
+  async mounted() {
+    const results = (await this.$http.get(
+      "/api/ecs_oe_student/examScore/queryObjectiveScoreList?examStudentId=" +
+        this.examStudentId
+    )).data;
+    this.results = results.reverse().slice(0, 10);
+    this.loading = false;
   }
 };
 </script>