zhangjie 2 years ago
parent
commit
c254dcd525

+ 5 - 1
src/api.js

@@ -323,12 +323,16 @@ export const workLevelList = async (workId, stage = "LEVEL") => {
     let levelList = Object.keys(levelMap).map((roughCode, ind) => {
       const group = levelMap[roughCode];
       const levels = group.map(item => item.code);
+      const minSs = group.map(item => item.minScore);
+      const maxSs = group.map(item => item.maxScore);
 
       return {
         id: ind + 1,
         name: roughCode,
         minScore: levels[0],
-        maxScore: levels.slice(-1)[0]
+        maxScore: levels.slice(-1)[0],
+        minSubScore: Math.min.apply(null, minSs),
+        maxSubScore: Math.max.apply(null, maxSs)
       };
     });
     levelList.sort((a, b) => (a.name < b.name ? -1 : 1));

+ 11 - 4
src/modules/grading/components/GradeAction.vue

@@ -54,6 +54,9 @@
         >
           <p>{{ level.name | levelNameFilter }}</p>
           <p>{{ level.minScore }}~{{ level.maxScore }}</p>
+          <p v-if="level.minSubScore || level.maxSubScore">
+            {{ level.minSubScore }}~{{ level.maxSubScore }}
+          </p>
         </div>
       </div>
     </div>
@@ -321,7 +324,8 @@ export default {
       btnClicked: false,
       keyInput: null,
       // 科组长权限
-      markLeaderOnlyRight: null
+      markLeaderOnlyRight: null,
+      leaderConfirm: true
     };
   },
   computed: {
@@ -378,9 +382,11 @@ export default {
     }
   },
   mounted() {
-    this.markLeaderOnlyRight = this.$ls.get("user", {
+    const userRight = this.$ls.get("user", {
       markLeaderOnlyRight: null
-    }).markLeaderOnlyRight;
+    });
+    this.markLeaderOnlyRight = userRight.markLeaderOnlyRight;
+    this.leaderConfirm = userRight.leaderConfirm;
 
     this.codeTypes = Object.entries(CODE_TYPE)
       .map(([key, val]) => {
@@ -488,7 +494,8 @@ export default {
             paperIds: this.curPaperOrTask.id + "",
             curLevel: this.curPaperOrTaskLevel,
             selectedLevel: level.name,
-            markLeaderOnlyRight: this.markLeaderOnlyRight
+            markLeaderOnlyRight: this.markLeaderOnlyRight,
+            leaderConfirm: this.leaderConfirm
           },
           this.gradingHistory.map(item => {
             return {

+ 9 - 2
src/modules/grading/components/GradeActionRough.vue

@@ -49,7 +49,7 @@
       <p>{{ curPaperOrTask.auditStatus === 1 ? "同意改档" : "不同意改档" }}</p>
     </div>
 
-    <!-- 大位信息 -->
+    <!-- 大位信息 -->
     <!-- 已评/待评(已评档位),改大裆打小档(已评档位) -->
     <div
       class="action-grade-info"
@@ -164,6 +164,9 @@
         >
           <p>{{ level.name | levelNameFilter }}</p>
           <p>{{ level.minScore }}~{{ level.maxScore }}</p>
+          <p v-if="level.minSubScore || level.maxSubScore">
+            {{ level.minSubScore }}~{{ level.maxSubScore }}
+          </p>
         </div>
       </div>
     </div>
@@ -575,12 +578,16 @@ export default {
       let roughLevelList = Object.keys(levelMap).map((roughCode, ind) => {
         const group = levelMap[roughCode];
         const levels = group.map(item => item.code);
+        const minSs = group.map(item => item.minScore);
+        const maxSs = group.map(item => item.maxScore);
 
         return {
           id: ind + 1,
           name: roughCode,
           minScore: levels[0],
-          maxScore: levels.slice(-1)[0]
+          maxScore: levels.slice(-1)[0],
+          minSubScore: Math.min.apply(null, minSs),
+          maxSubScore: Math.max.apply(null, maxSs)
         };
       });
       roughLevelList.sort((a, b) => (a.name < b.name ? -1 : 1));

+ 3 - 2
src/modules/grading/leader/LeaderGrading.vue

@@ -587,13 +587,14 @@ export default {
     },
     async leaderSelectLevel(levelInfo, markers) {
       // 唯一权限时,直接操作
-      if (levelInfo.markLeaderOnlyRight && !this.paramsSet.leaderConfirm) {
+      if (levelInfo.markLeaderOnlyRight && !levelInfo.leaderConfirm) {
         const datas = {
           action: levelInfo.markLeaderOnlyRight.action,
           level: levelInfo.selectedLevel,
           originLevel: levelInfo.curLevel,
           paperIds: levelInfo.paperIds,
-          stage: this.curSubject.stage
+          stage: this.curSubject.stage,
+          leaderConfirm: levelInfo.leaderConfirm
         };
         if (datas.action === "reject") {
           datas.range = markers.map(item => item.id).join();

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

@@ -453,6 +453,7 @@ export default {
     async getWorkLevels() {
       const data = await workLevelList(this.workId, this.curSubject.stage);
       this.levels = data || [];
+      console.log(this.levels);
     },
     async pageSetChange() {
       await this.getList();