Browse Source

标准卷管理调整

zhangjie 4 years ago
parent
commit
57986c8d39

+ 1 - 1
src/assets/styles/main.less

@@ -533,7 +533,7 @@
 }
 .check-grade {
   flex-grow: 2;
-  min-height: 500px;
+  min-height: 400px;
   display: flex;
   justify-content: space-between;
 

+ 3 - 3
src/assets/styles/mark.less

@@ -339,7 +339,7 @@
 
   .detail-body {
     flex-grow: 2;
-    min-height: 500px;
+    min-height: 400px;
     display: flex;
     justify-content: space-between;
 
@@ -381,7 +381,7 @@
     flex-grow: 2;
     display: flex;
     justify-content: space-between;
-    min-height: 500px;
+    min-height: 400px;
 
     &-carousel {
       position: relative;
@@ -1024,7 +1024,7 @@
     color: @dark-color-lighter;
   }
   .standard-papers-list {
-    min-height: 500px;
+    min-height: 400px;
 
     .image-view-list .image-view {
       height: 400px;

+ 16 - 1
src/modules/grading-set/GradingRuleSet.vue

@@ -99,6 +99,20 @@
           ></Option>
         </Select>
       </FormItem>
+      <FormItem label="是否显示标准卷管理:">
+        <Select
+          v-model="modalForm.showStandardPaperManage"
+          :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"
@@ -140,7 +154,8 @@ export default {
         autoCallback: 0,
         majority: 0,
         levelShowAllPaper: 0,
-        propDenominator: 1
+        propDenominator: 1,
+        showStandardPaperManage: 1
       },
       modalFormCanEdit: false,
       modalForm: {},

+ 19 - 2
src/modules/grading/Grading.vue

@@ -61,7 +61,7 @@
 </template>
 
 <script>
-import { subjectDetail, gradingProgressDetail } from "@/api";
+import { subjectDetail, gradingProgressDetail, getParamsSet } from "@/api";
 import { grading, main } from "@/constants/authority";
 import menuMixins from "@/components/homeMenuMixins";
 import { SUBJECT_STAGE } from "@/constants/enumerate";
@@ -73,10 +73,12 @@ export default {
   data() {
     return {
       subjectId: this.$route.params.subjectId,
+      workId: this.$route.params.workId,
       navs: [],
       curNav: {},
       curSubject: { name: "" },
       SUBJECT_STAGE,
+      paramsSet: {},
       IS_ADMIN: true,
       stepName: "",
       stepProgress: ""
@@ -113,11 +115,24 @@ export default {
           this.curSubject.test === 2
             ? "试评"
             : this.SUBJECT_STAGE[this.curSubject.stage];
+      } else {
+        await this.getParamsSetInfo();
+        if (
+          this.$route.name === "GradingStandardPaperManage" &&
+          !this.paramsSet.showStandardPaperManage
+        ) {
+          this.$Message.error("非法操作!");
+          this.$router.replace({ name: "Login" });
+          return;
+        }
       }
 
       this.buildNavs();
       this.actSubNav();
     },
+    async getParamsSetInfo() {
+      this.paramsSet = await getParamsSet(this.workId);
+    },
     async getProgressDetail() {
       const data = await gradingProgressDetail({
         workId: this.curSubject.workId,
@@ -130,7 +145,9 @@ export default {
       if (this.IS_ADMIN) {
         this.navs = [...main.slice(0, 2), ...this.navs.slice(0, -2)];
       } else {
-        this.navs.splice(3, 2);
+        this.paramsSet.showStandardPaperManage
+          ? this.navs.splice(3, 2)
+          : this.navs.splice(3, 3);
       }
     },
     actSubNav() {

+ 8 - 8
src/modules/grading/GradingStandardPaperManage.vue

@@ -129,7 +129,7 @@
 <script>
 import {
   paperList,
-  subjectDetail,
+  // subjectDetail,
   sampleAreaList,
   workLevelList,
   cancelStandardPaper,
@@ -145,7 +145,7 @@ export default {
       workId: this.$route.params.workId,
       subjectId: this.$route.params.subjectId,
       subject: "",
-      canCancel: false,
+      canCancel: true,
       questionId: "",
       lastQuestionId: "",
       curLevel: "",
@@ -169,12 +169,12 @@ export default {
   },
   methods: {
     async initData() {
-      this.curSubject = await subjectDetail(this.subjectId);
-      const isLevelOrScore =
-        (this.curSubject.stage === "LEVEL" ||
-          this.curSubject.stage === "SCORE") &&
-        this.curSubject.test === 0;
-      this.canCancel = !isLevelOrScore;
+      // this.curSubject = await subjectDetail(this.subjectId);
+      // const isLevelOrScore =
+      //   (this.curSubject.stage === "LEVEL" ||
+      //     this.curSubject.stage === "SCORE") &&
+      //   this.curSubject.test === 0;
+      // this.canCancel = !isLevelOrScore;
 
       await this.getAreaList();
       this.questionId = this.areas[0] && this.areas[0].id;