Pārlūkot izejas kodu

fix: 档位统计数据bug

zhangjie 2 dienas atpakaļ
vecāks
revīzija
8dd18158d0

+ 12 - 9
src/modules/grading/marker/MarkerGrading.vue

@@ -371,6 +371,7 @@ export default {
       return isRepeat;
     },
     updateStepLevel(curStep, curLevel, count, paperIds) {
+      if (!count) return;
       if (
         this.checkStepActionIsRepeat({
           curStepType: curStep.type,
@@ -472,16 +473,10 @@ export default {
 
       this.multiplebtnClicked = false;
       if (!result) return;
-      // this.getStepLevels();
-      this.updateStepLevel(
-        this.curStep,
-        level.name,
-        multipleGradingListCount,
-        paperIds.join()
-      );
       this.clearMultiplePaper();
 
       if (this.ribbonSet.listHandleRefresh) {
+        this.getStepLevels();
         this.papers.forEach((paper) => {
           if (paperIds.includes(paper.id)) {
             paper.level = level.name;
@@ -494,6 +489,13 @@ export default {
         return;
       }
 
+      this.updateStepLevel(
+        this.curStep,
+        level.name,
+        multipleGradingListCount,
+        paperIds.join()
+      );
+
       // update paper list
       if (
         this.page.current > 1 &&
@@ -601,14 +603,15 @@ export default {
         this.$refs.CarouselPapersPreview.cancel();
         this.$refs.MarkerHistory.updatePapers();
       } else {
-        this.updateStepLevel(this.curStep, level.name, 1, this.curPaper.id);
-
         if (this.ribbonSet.listHandleRefresh) {
           // update current paper level
           this.curPaper = this.papers[this.curPaperIndex] = Object.assign(
             this.papers[this.curPaperIndex],
             { level: level.name }
           );
+          this.getStepLevels();
+        } else {
+          this.updateStepLevel(this.curStep, level.name, 1, this.curPaper.id);
         }
         this.toActionNextPaper();
       }

+ 22 - 19
src/modules/mark/marker/MarkerMarking.vue

@@ -601,18 +601,10 @@ export default {
       this.multiplebtnClicked = false;
       if (!result) return;
 
-      this.updateStepLevel(
-        this.curStep,
-        {
-          curLevel: curPaperlevel,
-          manualScore: 0,
-        },
-        multipleGradingListCount,
-        paperIds.join()
-      );
       this.clearMultiplePaper();
 
       if (this.ribbonSet.listHandleRefresh) {
+        this.getStepLevels();
         this.papers.forEach((paper) => {
           if (paperIds.includes(paper.id)) {
             paper.score = score;
@@ -628,6 +620,16 @@ export default {
         return;
       }
 
+      this.updateStepLevel(
+        this.curStep,
+        {
+          curLevel: curPaperlevel,
+          manualScore: 0,
+        },
+        multipleGradingListCount,
+        paperIds.join()
+      );
+
       // update paper list
       if (
         this.page.current > 1 &&
@@ -763,22 +765,23 @@ export default {
         this.$refs.CarouselPapersPreview.cancel();
         this.$refs.MarkerHistory.updatePapers();
       } else {
-        this.updateStepLevel(
-          this.curStep,
-          {
-            curLevel: this.curPaper.level,
-            manualScore: info.manualScore,
-          },
-          1,
-          this.curPaper.id
-        );
-
         if (this.ribbonSet.listHandleRefresh) {
+          this.getStepLevels();
           // update current paper level
           this.curPaper = this.papers[this.curPaperIndex] = Object.assign(
             this.papers[this.curPaperIndex],
             { score: info.score }
           );
+        } else {
+          this.updateStepLevel(
+            this.curStep,
+            {
+              curLevel: this.curPaper.level,
+              manualScore: info.manualScore,
+            },
+            1,
+            this.curPaper.id
+          );
         }
 
         if (this.curStep.type === "undo") {