zhangjie 2 gadi atpakaļ
vecāks
revīzija
adcd64053b

+ 1 - 1
src/api.js

@@ -531,7 +531,7 @@ export const userReceiveNoticeList = datas => {
 };
 export const fetchReleaseUnreadNotice = datas => {
   // subject=&stage=&receiveUserId=
-  return $get(`/api/message/list_receive_unread`, datas);
+  return $get(`/api/message/list_receive_unread`, datas, { hideLoad: true });
 };
 export const readNotice = ids => {
   return $post(`/api/message/read`, { ids }, "json");

+ 2 - 3
src/modules/grading/components/GradeAction.vue

@@ -534,10 +534,9 @@ export default {
           this.toKeySubmit();
           return;
         }
+        if (!/^[a-zA-Z0-9]$/.test(e.key)) return;
 
-        if (!/^[a-z0-9]$/.test(e.key)) return;
-
-        const keyInput = e.key.toUpperCase();
+        const keyInput = e.key.x();
         if (this.getKeyInputLevel(keyInput)) {
           e.preventDefault();
           this.keyInput = keyInput;

+ 13 - 7
src/modules/grading/components/GradeActionRough.vue

@@ -655,8 +655,8 @@ export default {
 
       this.$emit("on-select-level", level);
     },
-    selectRoughLevel(level) {
-      if (this.curPaperOrTask.roughLevel === level.name) return;
+    selectRoughLevel(level, actionType = null) {
+      if (this.curPaperOrTask.roughLevel === level.name && !actionType) return;
 
       if (this.btnClicked) return;
       this.btnClicked = true;
@@ -676,7 +676,12 @@ export default {
       });
     },
     gradeChangeConfirm() {
-      this.selectRoughLevel({ name: this.curPaperOrTask.redoLevel });
+      this.selectRoughLevel(
+        {
+          name: this.curPaperOrTask.redoLevel
+        },
+        "gradeChangeConfirm"
+      );
     },
     toPass() {
       this.$emit("on-pass");
@@ -699,8 +704,7 @@ export default {
           this.toKeySubmit();
           return;
         }
-
-        if (!/^[a-z0-9]$/.test(e.key)) return;
+        if (!/^[a-zA-Z0-9]$/.test(e.key)) return;
 
         const keyInput = e.key.toUpperCase();
         if (this.getKeyInputLevel(keyInput)) {
@@ -717,8 +721,10 @@ export default {
     },
     getKeyInputLevel(key) {
       return (
-        this.levelList.find(item => item.name === key) ||
-        this.roughLevelList.find(item => item.name === key)
+        (this.rights.levelList &&
+          this.levelList.find(item => item.name === key)) ||
+        (this.rights.roughLevelList &&
+          this.roughLevelList.find(item => item.name === key))
       );
     },
     toKeySubmit() {

+ 7 - 5
src/modules/grading/leader/LeaderGrading.vue

@@ -177,7 +177,7 @@ import {
 } from "@/api";
 
 export default {
-  name: "marker-grading",
+  name: "leader-grading",
   components: {
     MarkerHeader,
     MarkerImageView,
@@ -239,7 +239,8 @@ export default {
       "steps",
       "curStep",
       "curArea",
-      "curSubject"
+      "curSubject",
+      "ribbonSet"
     ]),
     markerImageListClasses() {
       return ["marker-image-list", `marker-image-list-${this.page.size}`];
@@ -278,8 +279,7 @@ export default {
       "setCurSubject",
       "setCurUserRoleType",
       "setShortcut",
-      "clearState",
-      "ribbonSet"
+      "clearState"
     ]),
     async initData() {
       this.dataReady = false;
@@ -720,8 +720,10 @@ export default {
       this.setShortcut([]);
       this.$refs.MarkerStandard.open();
     },
-    standardClose() {
+    async standardClose() {
+      await this.getList();
       this.selectPaper(this.curPaperIndex);
+      this.getStepLevels();
       this.setShortcut(["page", "action"]);
     },
     toProgress() {

+ 19 - 0
src/modules/grading/marker/MarkerGrading.vue

@@ -68,6 +68,9 @@
             <marker-image-view
               :data="paper"
               :stage="curSubject.stage"
+              :can-mark="canMark"
+              :can-select="canSelect"
+              :select-handle="selectHandle"
               @to-review="toReview"
               @to-select="selectMultiplePaper"
               @on-mark="markChange"
@@ -256,6 +259,12 @@ export default {
       return (
         this.curSubject.roughLevelEnable && this.curSubject.stage === "LEVEL"
       );
+    },
+    canMark() {
+      return !this.curStep.type.includes("shift");
+    },
+    canSelect() {
+      return !this.curStep.type.includes("shift");
     }
   },
   created() {
@@ -483,6 +492,16 @@ export default {
       this.toPage(1);
     },
     // selectMultiplePaper
+    selectHandle(curPaper) {
+      if (this.IS_ROUGH_THIN_LEVEL && this.multipleGradingList.length) {
+        if (curPaper.roughLevel !== this.multipleGradingList[0].roughLevel) {
+          this.$Message.error("不得跨档批量操作");
+          return;
+        }
+      }
+
+      return true;
+    },
     selectMultiplePaper(paper) {
       if (paper.sample) return;
       const curPaper = this.papers.find(p => p.id === paper.id);

+ 5 - 2
src/modules/grading/marker/MarkerHeader.vue

@@ -275,7 +275,7 @@
           ]"
           @click="stepClick(step.name)"
         >
-          {{ step.name }}
+          {{ step.name | levelNameFilter }}
           <span>({{ step.count }})</span>
         </div>
         <div
@@ -550,7 +550,10 @@ export default {
       const userId = this.$ls.get("user", { id: "" }).id;
       const cacheRibbonSet = window.localStorage.getItem("ribbonSet");
       const ribbonSet = cacheRibbonSet ? JSON.parse(cacheRibbonSet) : {};
-      ribbonSet[userId] = { fastLevelNav: false };
+      const cacheUserRibbonSet = ribbonSet[userId] || { ...this.ribbonSet };
+      ribbonSet[userId] = Object.assign({}, cacheUserRibbonSet, {
+        fastLevelNav: false
+      });
       this.setRibbonSet(ribbonSet[userId]);
       window.localStorage.setItem("ribbonSet", JSON.stringify(ribbonSet));
     },

+ 12 - 2
src/modules/grading/marker/MarkerImageView.vue

@@ -16,7 +16,7 @@
           </div>
           <div v-if="IS_SAMPLE" class="image-sample">标</div>
           <div
-            v-else
+            v-if="canSelect && !IS_SAMPLE"
             :class="[
               'image-checkbox',
               {
@@ -39,6 +39,7 @@
         </div>
         <div class="image-action">
           <div
+            v-if="canMark"
             :class="['image-action-li', { 'is-disabled': image.markDisabled }]"
             @click="toMark"
           >
@@ -74,6 +75,14 @@ export default {
     canSelect: {
       type: Boolean,
       default: true
+    },
+    canMark: {
+      type: Boolean,
+      default: true
+    },
+    selectHandle: {
+      type: Function,
+      default: null
     }
   },
   computed: {
@@ -156,7 +165,8 @@ export default {
       this.$emit("on-mark", this.image.mark);
     },
     toSelect() {
-      if (this.IS_SAMPLE || !this.IS_LEVEL) return;
+      if (this.IS_SAMPLE || !this.IS_LEVEL || !this.canSelect) return;
+      if (this.selectHandle && !this.selectHandle(this.image)) return;
       this.image.selected = !this.image.selected;
       this.$emit("to-select", this.image);
     },

+ 9 - 1
src/modules/main/QualityAnalysis.vue

@@ -48,7 +48,11 @@
             ></DatePicker>
           </FormItem>
           <FormItem v-if="roughLevelEnable">
-            <Select v-model="stage" placeholder="档位类型">
+            <Select
+              v-model="stage"
+              placeholder="档位类型"
+              @on-change="stageChange"
+            >
               <Option
                 v-for="(val, key) in levelTypes"
                 :key="key"
@@ -253,6 +257,10 @@ export default {
       this.getAreaList();
       this.getGroupList();
     },
+    stageChange() {
+      this.filter.groupId = "";
+      this.getGroupList();
+    },
     parseGroupBarData(datas) {
       if (!datas.length) {
         return { names: [], dataList: [] };

+ 8 - 5
src/modules/mark/components/MarkAction.vue

@@ -445,8 +445,8 @@ export default {
         };
       });
     },
-    selectLevel(level) {
-      if (this.curPaperOrTask.level === level.name) return;
+    selectLevel(level, actionType = null) {
+      if (this.curPaperOrTask.level === level.name && !actionType) return;
 
       if (this.btnClicked) return;
       this.btnClicked = true;
@@ -466,7 +466,10 @@ export default {
       });
     },
     gradeChangeConfirm() {
-      this.selectLevel({ name: this.curPaperOrTask.redoLevel });
+      this.selectLevel(
+        { name: this.curPaperOrTask.redoLevel },
+        "gradeChangeConfirm"
+      );
     },
     selectScore(score) {
       if (this.btnClicked) return;
@@ -505,7 +508,7 @@ export default {
             return;
           }
 
-          if (!/^[a-z0-9]$/.test(e.key)) return;
+          if (!/^[a-zA-Z0-9]$/.test(e.key)) return;
 
           if (this.checkKeyCodeValid(e.keyCode)) {
             e.preventDefault();
@@ -527,7 +530,7 @@ export default {
             this.toKeySubmitLevel();
             return;
           }
-          if (!/^[a-z0-9]$/.test(e.key)) return;
+          if (!/^[a-zA-Z0-9]$/.test(e.key)) return;
 
           const keyInput = e.key.toUpperCase();
           if (this.getKeyInputLevel(keyInput)) {