zhangjie 2 tahun lalu
induk
melakukan
9942638d3d
1 mengubah file dengan 5 tambahan dan 3 penghapusan
  1. 5 3
      src/modules/mark/marker/MarkerMarking.vue

+ 5 - 3
src/modules/mark/marker/MarkerMarking.vue

@@ -471,15 +471,17 @@ export default {
 
       this.selectPaper(this.curPaperIndex);
     },
-    async toActionNextPaper() {
+    async toActionNextPaper(toNext) {
+      let curPaperIndex = toNext ? this.curPaperIndex + 1 : this.curPaperIndex;
       if (this.page.current > 1 && this.papers.length === 1) {
         this.setPage({ current: this.page.current - 1 });
         this.curPaperIndex = this.page.size;
+        curPaperIndex = this.curPaperIndex;
       }
 
       await this.getList();
       if (!this.papers.length) this.$refs.SimpleImagePreview.cancel();
-      this.selectPaper(this.curPaperIndex);
+      this.selectPaper(curPaperIndex);
     },
     async gradingCurPaper({ selectedLevel }) {
       await paperSelectLevelOrScore(
@@ -513,7 +515,7 @@ export default {
         ) {
           this.toActionNextPaper();
         } else {
-          this.toNextPaper();
+          this.toActionNextPaper(true);
         }
       }
     },