zhangjie 4 жил өмнө
parent
commit
9b86364223

+ 4 - 1
src/assets/styles/mark.less

@@ -763,9 +763,12 @@
       width: 90px;
       min-width: 0;
     }
-    .ivu-form-item:last-child {
+    .ivu-form-item.mark-input-confirm {
       margin-right: 0;
     }
+    .ivu-form-item-error + .mark-input-confirm + .tips-info {
+      color: @error-color;
+    }
   }
 }
 

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

@@ -209,6 +209,11 @@ export default {
         ...initRights
       },
       roleRight: {
+        SUPER_ADMIN: {
+          done: ["search", "gradeHis", "gradeInfo"],
+          reject: ["search", "gradeInfo", "gradeHis"],
+          arbitrate: ["search", "gradeHis"]
+        },
         ADMIN: {
           done: ["search", "gradeHis", "gradeInfo"],
           reject: ["search", "gradeInfo", "gradeHis"],
@@ -249,9 +254,7 @@ export default {
   },
   computed: {
     IS_ADMIN() {
-      return (
-        this.userRole === "ADMIN" || this.curUserRoleType === "SUPER_ADMIN"
-      );
+      return this.userRole === "ADMIN" || this.userRole === "SUPER_ADMIN";
     },
     IS_MARKER() {
       return this.userRole === "MARKER";

+ 2 - 1
src/modules/inspection/InspectionGrading.vue

@@ -178,7 +178,8 @@ export default {
         workId: "",
         subject: "",
         questionId: "",
-        status: 0
+        status: 0,
+        type: 1
       },
       CHANGE_LEVEL_STATUS,
       works: [],

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

@@ -211,17 +211,13 @@ export default {
       ];
     },
     bodyClasses() {
-      return [
-        "detail-body",
-        { "detail-body-2": this.curUserRoleType === "ADMIN" }
-      ];
+      return ["detail-body", { "detail-body-2": this.IS_ADMIN }];
     },
     detailPapersClasses() {
       return [
         "detail-papers",
         {
-          [`detail-papers-col-${1 + this.size / 2}`]:
-            this.curUserRoleType !== "ADMIN"
+          [`detail-papers-col-${1 + this.size / 2}`]: !this.IS_ADMIN
         }
       ];
     },
@@ -249,7 +245,7 @@ export default {
   mounted() {
     this.subject = this.subjectId.split("-")[1];
     this.curUserRoleType = this.$ls.get("user", { role: "" }).role;
-    if (this.curUserRoleType === "ADMIN") this.size = 8;
+    if (this.IS_ADMIN) this.size = 8;
     this.initData();
   },
   methods: {

+ 2 - 5
src/modules/mark/MarkHome.vue

@@ -64,7 +64,7 @@
 </template>
 
 <script>
-import { subjectDetail, getParamsSet } from "@/api";
+import { subjectDetail } from "@/api";
 import { mark, main } from "@/constants/authority";
 import menuMixins from "@/components/homeMenuMixins";
 import { SUBJECT_STAGE } from "@/constants/enumerate";
@@ -82,8 +82,7 @@ export default {
       curSubject: { name: "" },
       SUBJECT_STAGE,
       IS_ADMIN: false,
-      IS_SUPER_ADMIN: false,
-      paramsSet: {}
+      IS_SUPER_ADMIN: false
     };
   },
   watch: {
@@ -102,7 +101,6 @@ 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",
@@ -120,7 +118,6 @@ 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);

+ 22 - 12
src/modules/mark/components/MarkAction.vue

@@ -154,23 +154,21 @@
       >
         <FormItem prop="score" label="分数" :show-message="false">
           <InputNumber
-            :max="manualMaxScore"
-            :min="manualMinScore"
             :precision="0"
             v-model="manualScoreModel.score"
           ></InputNumber>
         </FormItem>
-        <FormItem>
+        <FormItem class="mark-input-confirm">
           <Button type="primary" size="small" @click="toInputScore">
             确定
           </Button>
         </FormItem>
+        <p class="tips-info">
+          <Icon type="md-alert" />分数必须介于{{ manualMinScore }}和{{
+            manualMaxScore
+          }}之间
+        </p>
       </Form>
-      <p class="tips-info">
-        <Icon type="md-alert" />分数必须介于{{ manualMinScore }}和{{
-          manualMaxScore
-        }}之间
-      </p>
     </div>
     <div class="action-grade-pass" v-if="rights.levelList" @click="toPass">
       跳过
@@ -301,6 +299,10 @@ export default {
         ...initRights
       },
       roleRight: {
+        SUPER_ADMIN: {
+          done: ["search", "markHis", "gradeInfo", "markInfo"],
+          shift: ["search", "gradeChangeSearch", "gradeChange"]
+        },
         ADMIN: {
           done: ["search", "markHis", "gradeInfo", "markInfo"],
           shift: ["search", "gradeChangeSearch", "gradeChange"]
@@ -331,8 +333,18 @@ export default {
         score: [
           {
             validator: (rule, value, callback) => {
+              console.log(value);
               if (value === null) {
                 callback(new Error("请输入分数"));
+              } else if (
+                value < this.manualMinScore ||
+                value > this.manualMaxScore
+              ) {
+                callback(
+                  new Error(
+                    `分数必须介于${this.manualMinScore}和${this.manualMaxScore}之间`
+                  )
+                );
               } else {
                 callback();
               }
@@ -363,9 +375,7 @@ export default {
   },
   computed: {
     IS_ADMIN() {
-      return (
-        this.userRole === "ADMIN" || this.curUserRoleType === "SUPER_ADMIN"
-      );
+      return this.userRole === "ADMIN" || this.userRole === "SUPER_ADMIN";
     },
     IS_MARKER() {
       return this.userRole === "MARKER";
@@ -480,7 +490,7 @@ export default {
 
       // 科组长改档 / 评卷同意改档
       this.$emit("on-leader-level", {
-        paperId: this.curPaperOrTask.id,
+        paperId: this.curPaperOrTask.paperId,
         curLevel: this.curPaperOrTask.level,
         selectedLevel: level.name
       });