Explorar el Código

1月11号提交

nikang hace 6 años
padre
commit
997e9ef444

+ 1 - 1
src/modules/marking/views/MarkWork.vue

@@ -256,7 +256,7 @@ export default {
       markWorkId: "",
       examDisabled: false,
       examTitle: "",
-      loading: true,
+      loading: false,
       closeClickModal: false,
       isAdmin: false,
       oldWorkName: ""

+ 17 - 6
src/modules/marking/views/Marking.vue

@@ -313,7 +313,8 @@ export default {
       //获取试卷标志(成功获取true,没有试卷false)
       paperMark: true,
       tags: [],
-      answerHtml: null
+      answerHtml: null,
+      rangeId: null
     };
   },
   methods: {
@@ -552,10 +553,16 @@ export default {
         });
     },
     async getMarkRange() {
-      console.log("getMarkRange");
       if (!this.paperMark) {
         return;
       }
+      if (this.rangeId == this.task.markRangeId) {
+        for (let resultItem of this.resultItems) {
+          resultItem.score = "";
+        }
+        return;
+      }
+      this.resultItems.splice(0, this.resultItems.length);
       var self = this;
       await self.$http
         .get(MARKING_API + "/markRanges/" + self.task.markRangeId)
@@ -573,6 +580,9 @@ export default {
       }
     },
     async getNext() {
+      if (this.rangeId == null) {
+        this.rangeId = this.task.markRangeId;
+      }
       this.answerHtml = null;
       //试卷全部评完且回评时不继续获取试卷
       if (this.backMark && this.allMarked) {
@@ -582,10 +592,11 @@ export default {
       await this.markInit();
       await this.getPaper();
       await this.getAnswerHtml();
-      await this.getChangeTasks();
+      // await this.getChangeTasks();
       await this.getMarkRange();
       await this.getMarkedTask();
       this.backMark = false;
+      this.$loading().close();
     },
     dateFormatter(row) {
       var fulldate = new Date(row.markedOn);
@@ -596,7 +607,7 @@ export default {
       return formatDate;
     },
     initMarkItem() {
-      this.resultItems.splice(0, this.resultItems.length);
+      //this.resultItems.splice(0, this.resultItems.length);
       this.markResult = {};
       this.markedResult = {};
     },
@@ -610,7 +621,7 @@ export default {
       }
     },
     async getAnswerHtml() {
-      if (this.studentPaper.basePaperId) {
+      if (this.studentPaper.basePaperId && this.examType == "OFFLINE") {
         var paperId = this.studentPaper.basePaperId;
         await this.$http
           .get(QUESTION_API + "/extract/getAnswerHtml/" + paperId)
@@ -659,7 +670,7 @@ export default {
   async created() {
     this.loading = true;
     await this.markInit();
-    await this.getChangeTasks();
+    //await this.getChangeTasks();
     await this.getPaper();
     await this.getAnswerHtml();
     await this.getMarkRange();

+ 6 - 0
src/modules/marking/views/TpScoreBoard.vue

@@ -299,6 +299,7 @@ export default {
         }
       });
     },
+    //在内存中对试卷进行标记保存
     saveMarkSign() {
       localStorage.removeItem(this.paperKey);
       localStorage.setItem(this.paperKey, JSON.stringify(this.paperMarkSign));
@@ -363,6 +364,7 @@ export default {
         return true;
       }
     },
+    //检查每项分数是否满足要求
     checkScore(resultItem) {
       var score = resultItem.score + "";
       var maxScore = resultItem.markItem.maxScore + "";
@@ -503,6 +505,7 @@ export default {
     problemClick() {
       this.problemView = !this.problemView;
     },
+    //检查评分项
     checkItems() {
       var itemName = "";
       for (var resultItem of this.resultItems) {
@@ -531,12 +534,14 @@ export default {
       }
       this.processTagPaper();
       this.loading = true;
+      this.$loading({ fullscreen: true });
       let remarkValue = "";
       if (document.getElementById("remark")) {
         remarkValue = document.getElementById("remark").value;
       }
       console.log("remarkValue: " + remarkValue);
       if (!this.markedResult.id) {
+        //正常提交清空
         console.log("提交resultItems", this.resultItems);
         this.$http
           .post(
@@ -566,6 +571,7 @@ export default {
                   type: "error"
                 });
               }
+              //调用Marking.vue中方法:执行的是拿取下一份试卷
               this.$emit("submitMark");
               this.loading = false;
               this.markTypeView = false;