Browse Source

新增是否谁分档谁打分设置

zhangjie 4 years ago
parent
commit
d3733884a4

+ 2 - 2
src/modules/grading/GradingDetail.vue

@@ -163,7 +163,7 @@
               :current="current"
               :total="total"
               :page-size="size"
-              :show-total="showPaperRelateCount"
+              :show-total="!!showPaperRelateCount"
               show-elevator
               @on-change="toPage"
             ></Page>
@@ -322,7 +322,7 @@ export default {
       return ["image-view-list", `image-view-list-${this.size / 2}`];
     },
     showPaperRelateCount() {
-      return this.IS_ADMIN || this.paramsSet["showPaperCount"];
+      return this.IS_ADMIN || !!this.paramsSet["showPaperCount"];
     },
     IS_ADMIN() {
       return (

+ 2 - 2
src/modules/grading/GradingOperation.vue

@@ -157,7 +157,7 @@
                   :current="current"
                   :total="total"
                   :page-size="size"
-                  :show-total="showPaperRelateCount"
+                  :show-total="!!showPaperRelateCount"
                   show-elevator
                   show-sizer
                   :page-size-opts="[4, 6, 8]"
@@ -285,7 +285,7 @@ export default {
       return ["image-view-list", `image-view-list-${this.size / 2}`];
     },
     showPaperRelateCount() {
-      return this.paramsSet["showPaperCount"];
+      return !!this.paramsSet["showPaperCount"];
     }
   },
   mounted() {

+ 1 - 1
src/modules/grading/GradingProgress.vue

@@ -186,7 +186,7 @@ export default {
       );
     },
     showPaperRelateCount() {
-      return this.IS_ADMIN || this.paramsSet["showPaperCount"];
+      return this.IS_ADMIN || !!this.paramsSet["showPaperCount"];
     },
     IS_ADMIN() {
       return (

+ 16 - 1
src/modules/mark-set/MarkRuleSet.vue

@@ -44,6 +44,20 @@
           ></Option>
         </Select>
       </FormItem>
+      <FormItem label="是否谁分档谁打分:">
+        <Select
+          v-model="modalForm.isLevelToScore"
+          :disabled="!modalFormCanEdit"
+          placeholder="是否谁分档谁打分"
+        >
+          <Option
+            v-for="(val, key) in BOOLEAN_TYPE"
+            :key="key"
+            :value="key * 1"
+            :label="val"
+          ></Option>
+        </Select>
+      </FormItem>
       <FormItem>
         <Button
           shape="circle"
@@ -80,7 +94,8 @@ export default {
         workId: "",
         roundUp: 0,
         changeStage: 0,
-        scoreShowAllPaper: 0
+        scoreShowAllPaper: 0,
+        isLevelToScore: 0
       },
       modalFormCanEdit: false,
       modalForm: {}

+ 1 - 1
src/modules/mark/MarkDetail.vue

@@ -229,7 +229,7 @@ export default {
       return ["image-view-list", `image-view-list-${this.size / 2}`];
     },
     showPaperRelateCount() {
-      return this.IS_ADMIN || this.paramsSet["showPaperCount"];
+      return this.IS_ADMIN || !!this.paramsSet["showPaperCount"];
     },
     IS_ADMIN() {
       return (

+ 7 - 3
src/modules/mark/MarkHome.vue

@@ -60,7 +60,7 @@
 </template>
 
 <script>
-import { subjectDetail } from "@/api";
+import { subjectDetail, getParamsSet } from "@/api";
 import { mark, main } from "@/constants/authority";
 import menuMixins from "@/components/homeMenuMixins";
 import { SUBJECT_STAGE } from "@/constants/enumerate";
@@ -72,12 +72,14 @@ export default {
   data() {
     return {
       subjectId: this.$route.params.subjectId,
+      workId: this.$route.params.workId,
       navs: [],
       curNav: {},
       curSubject: { name: "" },
       SUBJECT_STAGE,
       IS_ADMIN: false,
-      IS_SUPER_ADMIN: false
+      IS_SUPER_ADMIN: false,
+      paramsSet: {}
     };
   },
   watch: {
@@ -96,11 +98,12 @@ export default {
   methods: {
     async initData() {
       this.curSubject = await subjectDetail(this.subjectId);
+      this.paramsSet = await getParamsSet(this.workId);
       if (this.curSubject.stage === "LEVEL") {
         this.$router.replace({
           name: "Grading",
           params: {
-            workId: this.subjectId.split("-")[0],
+            workId: this.workId,
             subjectId: this.subjectId
           }
         });
@@ -113,6 +116,7 @@ export default {
       this.navs = deepCopy(mark);
       if (this.IS_ADMIN || this.IS_SUPER_ADMIN) {
         this.navs.pop();
+        if (this.paramsSet.isLevelToScore) this.navs.pop();
         const navHead = this.IS_SUPER_ADMIN
           ? main.slice(0, 3)
           : main.slice(1, 3);

+ 1 - 1
src/modules/mark/MarkOperation.vue

@@ -235,7 +235,7 @@ export default {
       return ["image-view-list", `image-view-list-${this.size / 2}`];
     },
     showPaperRelateCount() {
-      return this.paramsSet["showPaperCount"];
+      return !!this.paramsSet["showPaperCount"];
     }
   },
   mounted() {

+ 13 - 2
src/modules/mark/MarkTaskManage.vue

@@ -7,6 +7,7 @@
           placeholder="选择考区"
           @on-change="areaChange"
           style="width: 200px;margin-right: 10px;"
+          :disabled="paramsSet.isLevelToScore"
         >
           <Option
             v-for="area in areas"
@@ -80,6 +81,7 @@
             :max="task.waitCount"
             :precision="0"
             :disabled="!task.waitCount"
+            :readonly="paramsSet.isLevelToScore"
           ></InputNumber>
         </td>
       </tr>
@@ -88,6 +90,9 @@
     <p class="tips-info tips-error" v-if="!canSubmitTask">
       警告:当前考区还有未完成的任务,无法发布新任务!
     </p>
+    <p class="tips-info tips-error" v-if="paramsSet.isLevelToScore">
+      提示:当前任务发送模式为:谁分档谁打分。
+    </p>
 
     <!-- task info confirm modal -->
     <Modal
@@ -105,6 +110,9 @@
         disabled-hover
         border
       ></Table>
+      <p class="tips-info tips-error" v-if="paramsSet.isLevelToScore">
+        提示:当前任务发送模式为:谁分档谁打分。
+      </p>
 
       <div slot="footer">
         <Button
@@ -126,7 +134,8 @@ import {
   markTaskInfo,
   checkMarkTaskCanSubmit,
   publishScoreTask,
-  checkMarkTaskSubmitType
+  checkMarkTaskSubmitType,
+  getParamsSet
 } from "@/api";
 import { calcSum } from "@/plugins/utils";
 import { SORT_ORDER_TYPE, BOOLEAN_TYPE } from "@/constants/enumerate";
@@ -146,6 +155,7 @@ export default {
       isSubmit: false,
       taskList: [],
       areas: [],
+      paramsSet: {},
       // modal
       modalIsShow: false,
       columns: [
@@ -207,6 +217,7 @@ export default {
     async initData() {
       await this.checkSubmitType();
       await this.getAreaList();
+      this.paramsSet = await getParamsSet(this.workId);
       this.questionId = this.areas[0].id;
       this.areaChange();
     },
@@ -253,7 +264,7 @@ export default {
           waitCount: item.waitCount,
           displayNumber: 0,
           sortRule: 0,
-          taskCount: 0
+          taskCount: this.paramsSet.isLevelToScore ? item.waitCount : 0
         };
       });
     },