Browse Source

提交题库页面bug修改

weiwenhai 6 years ago
parent
commit
dcb6a862de

+ 2 - 2
src/modules/questions/views/ExportStructure.vue

@@ -593,7 +593,7 @@ export default {
         this.$http
         this.$http
           .get(
           .get(
             EXAM_WORK_API +
             EXAM_WORK_API +
-              "/exam/queryByNameLike?name=&examType=" +
+              "/exam/queryByNameLike?name=&examTypes=" +
               this.exportStructure.examType
               this.exportStructure.examType
           )
           )
           .then(response => {
           .then(response => {
@@ -646,7 +646,7 @@ export default {
         this.$http
         this.$http
           .get(
           .get(
             EXAM_WORK_API +
             EXAM_WORK_API +
-              "/exam/queryByNameLike?name=&examType=" +
+              "/exam/queryByNameLike?name=&examTypes=" +
               this.exportStructureCopy.examType
               this.exportStructureCopy.examType
           )
           )
           .then(response => {
           .then(response => {

+ 8 - 4
src/modules/questions/views/ExtractPaperRule.vue

@@ -369,6 +369,7 @@ export default {
     },
     },
     //制定调卷规则
     //制定调卷规则
     markRules() {
     markRules() {
+      sessionStorage.setItem("extract_paper_examId", this.formSearch.examId);
       this.$router.push({
       this.$router.push({
         name: "extract_paper_info_add"
         name: "extract_paper_info_add"
       });
       });
@@ -635,14 +636,17 @@ export default {
           sessionStorage.getItem("extract_paper_courseNo") == "null"
           sessionStorage.getItem("extract_paper_courseNo") == "null"
             ? ""
             ? ""
             : sessionStorage.getItem("extract_paper_courseNo");
             : sessionStorage.getItem("extract_paper_courseNo");
-        this.formSearch.examId = parseInt(
-          sessionStorage.getItem("extract_paper_examId")
-        );
+        this.formSearch.examId =
+          sessionStorage.getItem("extract_paper_examId") == ""
+            ? ""
+            : parseInt(sessionStorage.getItem("extract_paper_examId"));
         this.currentPage =
         this.currentPage =
           sessionStorage.getItem("extract_paper_currentPage") == null
           sessionStorage.getItem("extract_paper_currentPage") == null
             ? 1
             ? 1
             : parseInt(sessionStorage.getItem("extract_paper_currentPage"));
             : parseInt(sessionStorage.getItem("extract_paper_currentPage"));
-        this.initialize(this.formSearch.examId);
+        if (this.formSearch.examId) {
+          this.initialize(this.formSearch.examId);
+        }
       }
       }
     }
     }
   },
   },

+ 2 - 1
src/modules/questions/views/GenPaper.vue

@@ -441,6 +441,7 @@ export default {
       );
       );
     },
     },
     editGenPaper(row) {
     editGenPaper(row) {
+      this.getCourseName(this.formSearch.courseNo);
       sessionStorage.setItem("gen_paper", JSON.stringify(this.formSearch));
       sessionStorage.setItem("gen_paper", JSON.stringify(this.formSearch));
       sessionStorage.setItem("gen_paper_currentPage", this.currentPage);
       sessionStorage.setItem("gen_paper_currentPage", this.currentPage);
       this.$router.push({
       this.$router.push({
@@ -723,7 +724,7 @@ export default {
             ? 1
             ? 1
             : parseInt(sessionStorage.getItem("gen_paper_currentPage"));
             : parseInt(sessionStorage.getItem("gen_paper_currentPage"));
       }
       }
-      this.getCourses(this.formSearch.courseNo);
+      this.getCourses(this.formSearch.courseName);
       this.searchGenPaper();
       this.searchGenPaper();
     }
     }
   },
   },

+ 11 - 1
src/modules/questions/views/ImportPaper.vue

@@ -355,6 +355,7 @@ export default {
       quesLoading: false,
       quesLoading: false,
       formSearch: {
       formSearch: {
         courseNo: "",
         courseNo: "",
+        courseName: "",
         level: "",
         level: "",
         name: ""
         name: ""
       },
       },
@@ -421,8 +422,17 @@ export default {
       this.currentPage = val;
       this.currentPage = val;
       this.searchImportPaper();
       this.searchImportPaper();
     },
     },
+    getCourseName(courseNo) {
+      for (let course of this.courseList) {
+        if (course.code == courseNo) {
+          this.formSearch.courseName = course.name;
+          this.formSearch.level = course.level;
+        }
+      }
+    },
     editImportPaper(row) {
     editImportPaper(row) {
       //缓存查询对象
       //缓存查询对象
+      this.getCourseName(this.formSearch.courseNo);
       sessionStorage.setItem("import_paper", JSON.stringify(this.formSearch));
       sessionStorage.setItem("import_paper", JSON.stringify(this.formSearch));
       sessionStorage.setItem("import_paper_currentPage", this.currentPage);
       sessionStorage.setItem("import_paper_currentPage", this.currentPage);
       this.$router.push({
       this.$router.push({
@@ -754,7 +764,7 @@ export default {
             ? 1
             ? 1
             : parseInt(sessionStorage.getItem("import_paper_currentPage"));
             : parseInt(sessionStorage.getItem("import_paper_currentPage"));
       }
       }
-      this.getCourses(this.formSearch.courseNo);
+      this.getCourses(this.formSearch.courseName);
       this.searchImportPaper();
       this.searchImportPaper();
     }
     }
   },
   },