Răsfoiți Sursa

离线考试:examStudentId是唯一的

Michael Wang 4 ani în urmă
părinte
comite
e3b7cd8d73
1 a modificat fișierele cu 6 adăugiri și 6 ștergeri
  1. 6 6
      src/features/OfflineExam/OfflineExamList.vue

+ 6 - 6
src/features/OfflineExam/OfflineExamList.vue

@@ -132,7 +132,7 @@ export default {
   data() {
     return {
       disableDownloadPaperBtn: false,
-      downloadPaperIds: new Set(),
+      downloadIds: new Set(),
       selectedCourse: null,
     };
   },
@@ -189,14 +189,14 @@ export default {
     },
     tempDisableBtnAndDownloadPaper(course) {
       window._hmt.push(["_trackEvent", "离线考试页面", "下载试卷"]);
-      this.downloadPaperIds.add(course.paperId);
-      this.downloadPaperIds = new Set(this.downloadPaperIds);
+      this.downloadIds.add(course.examStudentId);
+      this.downloadIds = new Set(this.downloadIds);
       // this.$forceUpdate();
       // this.disableDownloadPaperBtn = true;
       setTimeout(() => {
         // this.disableDownloadPaperBtn = false;
-        this.downloadPaperIds.delete(course.paperId);
-        this.downloadPaperIds = new Set(this.downloadPaperIds);
+        this.downloadIds.delete(course.examStudentId);
+        this.downloadIds = new Set(this.downloadIds);
         // set 并不能正常的reactive
         // this.$forceUpdate();
       }, 10 * 1000);
@@ -214,7 +214,7 @@ export default {
         this.user.token;
     },
     downloadingCourse(course) {
-      return this.downloadPaperIds.has(course.paperId);
+      return this.downloadIds.has(course.examStudentId);
     },
     uploadHandler(course) {
       this.selectedCourse = course;