zhangjie 1 yıl önce
ebeveyn
işleme
c24ec707bc

+ 13 - 0
src/api.js

@@ -410,6 +410,19 @@ export const markTaskPaperList = datas => {
   // ?workId=&stage=&subject=&markerId=
   return $get("/api/marktasks/list_mark_task", datas);
 };
+export const markerSelfCheckTask = ({ workId, markerId, subject, stage }) => {
+  // stage => LEVEL or SCORE
+  return $get(`/api/marktasks/getSelfCheckTask`, {
+    workId,
+    markerId,
+    subject,
+    stage
+  });
+};
+export const markerSelfCheckLevel = (id, level) => {
+  return $patch(`/api/marktasks/markingSelfCheckTask`, { id, level });
+};
+
 // grading or scoring
 export const paperSelectLevelOrScore = (taskId, result, stage) => {
   // stage => LEVEL or SCORE

+ 1 - 0
src/modules/client-set/ClientParamSet.vue

@@ -58,6 +58,7 @@
             <FormItem label="重复扫描大小异常:">
               <InputNumber
                 v-model="modalForm.repeatScanSize"
+                :disabled="!modalFormCanEdit"
                 :min="0"
                 :max="102400"
                 :precision="0"

+ 4 - 4
src/modules/grading-set/GradingRuleSet.vue

@@ -178,7 +178,7 @@
           <InputNumber
             v-model="modalForm.selfCheckFrequency"
             :disabled="!modalFormCanEdit"
-            :min="2"
+            :min="0"
             :max="100000"
             :precision="0"
             :active-change="false"
@@ -366,9 +366,9 @@
         </FormItem>
         <FormItem label="自查卷发卷频率:">
           <InputNumber
-            v-model="modalForm.selfCheckFrequency"
+            v-model="modalFormRough.selfCheckFrequency"
             :disabled="!modalFormRoughCanEdit"
-            :min="2"
+            :min="0"
             :max="100000"
             :precision="0"
             :active-change="false"
@@ -415,7 +415,7 @@ const initModalForm = {
   showStandardPaperManage: 1,
   clearData: 0,
   removeHighAndLow: 0,
-  selfCheckFrequency: 200
+  selfCheckFrequency: 0
 };
 
 export default {

+ 50 - 7
src/modules/grading/marker/MarkerGrading.vue

@@ -171,6 +171,8 @@ import {
   markerTaskList,
   markerMarkPaperList,
   markerChangeLevelPaperList,
+  markerSelfCheckTask,
+  markerSelfCheckLevel,
   markerLevelTotalStatData,
   workLevelList,
   paperSelectLevelOrScore,
@@ -261,6 +263,9 @@ export default {
         this.curSubject.roughLevelEnable && this.curSubject.stage === "LEVEL"
       );
     },
+    IS_UNDO_STEP() {
+      return this.curStep.type === "undo";
+    },
     canMark() {
       return !this.curStep.type.includes("shift");
     },
@@ -350,6 +355,24 @@ export default {
       await this.getList();
       this.selectPaper(this.curPaperIndex);
     },
+    async gotoSelfCheckTask() {
+      const task = await markerSelfCheckTask({
+        stage: this.curSubject.stage,
+        markerId: this.filter.markerId,
+        workId: this.workId,
+        subject: this.subject
+      });
+      if (!task) return;
+
+      this.paperKey = this.$randomCode();
+      this.curPaper = { ...task, isSelfCheck: true };
+      console.log(this.curPaper);
+      if (this.isFullscreenMarking) return;
+
+      this.setShortcut(["action"]);
+      this.isFullscreenMarking = true;
+      this.$refs.SimpleImagePreview.open();
+    },
     async getStepLevels() {
       const data = await markerLevelTotalStatData(
         this.filter.markerId,
@@ -478,18 +501,25 @@ export default {
       this.setPage({ current: 1 });
       this.isFullscreenMarking = false;
       await this.getList();
-      this.getStepLevels();
+      await this.getStepLevels();
       if (this.papers.length) {
         this.selectPaper(0);
       } else {
         this.curPaper = {};
       }
+      if (this.IS_UNDO_STEP) {
+        await this.gotoSelfCheckTask();
+      }
     },
     async areaChange(curArea) {
       this.setCurArea(curArea);
       this.filter.questionId = curArea.id;
       await this.getStepLevels();
       this.toPage(1);
+      // 刷新页面时只触发areaChange
+      if (this.IS_UNDO_STEP) {
+        await this.gotoSelfCheckTask();
+      }
     },
     // selectMultiplePaper
     selectHandle(curPaper) {
@@ -660,12 +690,20 @@ export default {
       this.toActionNextPaper();
     },
     async gradeCurPaper(level) {
-      const paper = await paperSelectLevelOrScore(
-        this.curPaper.id, // is taskId
-        level.name,
-        this.curSubject.stage
-      );
-      if (!paper) return;
+      let gradeRes = null;
+      if (this.curPaper.isSelfCheck) {
+        gradeRes = await markerSelfCheckLevel(
+          this.curPaper.id, // is taskId
+          level.name
+        );
+      } else {
+        gradeRes = await paperSelectLevelOrScore(
+          this.curPaper.id, // is taskId
+          level.name,
+          this.curSubject.stage
+        );
+      }
+      if (!gradeRes) return;
 
       if (this.carouselType) {
         this.updateStepLevel(
@@ -678,6 +716,11 @@ export default {
         this.$refs.MarkerHistory.updatePapers();
       } else {
         this.updateStepLevel(this.curStep, level.name, 1);
+        // 待评阶段:自查卷获取逻辑
+        if (this.IS_UNDO_STEP && gradeRes.hasSelfTask) {
+          await this.gotoSelfCheckTask();
+          return;
+        }
         this.toActionNextPaper();
       }
     },