Эх сурвалжийг харах

Merge branch 'master' of http://git.qmth.com.cn/ExamCloud-3/examcloud-web-admin

chenken 6 жил өмнө
parent
commit
c9ed332019

+ 3 - 3
src/modules/portal/views/tips/Tips.vue

@@ -94,7 +94,7 @@ const ALL_INSTRUCTIONS = {
       menu2: [
         {
           name: "题库管理——导入试卷管理",
-          // link: "/basic/campus",
+          link: "/questions/import_paper/0",
           detail: "可以将word版试卷导入题库,由题库按课程、题型形成题库。"
         }
       ]
@@ -104,7 +104,7 @@ const ALL_INSTRUCTIONS = {
       menu2: [
         {
           name: "卷库管理——考试试卷管理",
-          // link: "/basic/campus",
+          link: "/questions/gen_paper/0",
           detail:
             "可按需求将XX课程的所有试题,按分数、题量、题型结构、章节等多种方式进行随机组合,生成若干套试卷。"
         }
@@ -115,7 +115,7 @@ const ALL_INSTRUCTIONS = {
       menu2: [
         {
           name: "考试管理——调卷规则",
-          // link: "/basic/campus",
+          link: "/questions/extract_paper_rule/0",
           detail: "来指定在本次考试中使用卷库中的哪一套试卷,及抽卷的比例。"
         }
       ]

+ 15 - 2
src/modules/questions/views/BluePaperStructure.vue

@@ -159,7 +159,8 @@ export default {
       formSearch: {
         name: "",
         courseNo: "",
-        type: "BLUEPRINT"
+        type: "BLUEPRINT",
+        courseName: ""
       },
       currentPage: 1,
       pageSize: 10,
@@ -246,8 +247,16 @@ export default {
         return val + "(难)";
       }
     },
+    getCourseName(courseNo) {
+      for (let course of this.courseList) {
+        if (course.code == courseNo) {
+          this.formSearch.courseName = course.name;
+        }
+      }
+    },
     //修改
     editStruct(row) {
+      this.getCourseName(this.formSearch.courseNo);
       sessionStorage.setItem(
         "blue_paper_stucture",
         JSON.stringify(this.formSearch)
@@ -328,7 +337,8 @@ export default {
         this.formSearch = {
           name: "",
           courseNo: "",
-          type: "BLUEPRINT"
+          type: "BLUEPRINT",
+          courseName: ""
         };
         this.currentPage = 1;
       } else {
@@ -339,6 +349,9 @@ export default {
           sessionStorage.getItem("blue_paper_stucture_currentPage")
         );
       }
+      if (this.formSearch.courseName) {
+        this.getCourses(this.formSearch.courseName);
+      }
       this.searchAll();
     }
   },

+ 1 - 1
src/modules/questions/views/CourseProperty.vue

@@ -136,7 +136,7 @@
               <el-button
                 v-if="!scope.row.enable"
                 size="mini"
-                type="success"
+                type="primary"
                 plain
                 @click="openCourseProperty(scope.row)"
               >

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

@@ -135,7 +135,7 @@
                 type="primary"
                 @click="updateRules(scope.row)"
                 plain
-                ><i class="el-icon-edit"></i>修改
+                ><i class="el-icon-edit"></i>编辑
               </el-button>
               <el-button
                 v-if="scope.row.ifFinish == 1"
@@ -278,7 +278,8 @@ export default {
       isClear: 0,
       formSearch: {
         examId: "",
-        courseNo: ""
+        courseNo: "",
+        courseName: ""
       },
       tableData: [],
       currentPage: 1,
@@ -374,13 +375,25 @@ export default {
         name: "extract_paper_info_add"
       });
     },
-    //修改调卷规则
+    getCourseName(courseNo) {
+      for (let course of this.courseList) {
+        if (course.code == courseNo) {
+          this.formSearch.courseName = course.name;
+        }
+      }
+    },
+    //编辑调卷规则
     updateRules(row) {
+      this.getCourseName(this.formSearch.courseNo);
       sessionStorage.setItem("extract_paper_examId", row.examId);
       sessionStorage.setItem(
         "extract_paper_courseNo",
         this.formSearch.courseNo
       );
+      sessionStorage.setItem(
+        "extract_paper_courseName",
+        this.formSearch.courseName
+      );
       sessionStorage.setItem("extract_paper_currentPage", this.currentPage);
       this.$router.push({
         name: "extract_paper_info_edit",
@@ -592,6 +605,7 @@ export default {
     //查询所有课程
     getCourses(query) {
       query = query.trim();
+      console.log("query:", query);
       if (query) {
         if (!(query.indexOf("(") > -1 && query.indexOf(")") > -1)) {
           this.courseLoading = true;
@@ -599,6 +613,7 @@ export default {
             .get(CORE_API + "/course/query?name=" + query + "&enable=true")
             .then(response => {
               this.courseList = response.data;
+              console.log("this.courseList:", this.courseList);
               this.courseLoading = false;
             });
         }
@@ -629,13 +644,18 @@ export default {
         this.getExams("");
         this.formSearch = {
           examId: "",
-          courseNo: ""
+          courseNo: "",
+          courseName: ""
         };
       } else {
         this.formSearch.courseNo =
           sessionStorage.getItem("extract_paper_courseNo") == "null"
             ? ""
             : sessionStorage.getItem("extract_paper_courseNo");
+        this.formSearch.courseName =
+          sessionStorage.getItem("extract_paper_courseName") == "null"
+            ? ""
+            : sessionStorage.getItem("extract_paper_courseName");
         this.formSearch.examId =
           sessionStorage.getItem("extract_paper_examId") == ""
             ? ""
@@ -647,6 +667,9 @@ export default {
         if (this.formSearch.examId) {
           this.initialize(this.formSearch.examId);
         }
+        if (this.formSearch.courseName) {
+          this.getCourses(this.formSearch.courseName);
+        }
       }
     }
   },

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

@@ -632,9 +632,7 @@ export default {
     },
     openPrint(row) {
       this.dialogModel = true;
-      this.printFrom.examId = "";
       this.rowId = row.id;
-      console.log("this.examList:", this.examList);
     },
     cancel(formData) {
       this.resetForm2(formData);
@@ -650,7 +648,7 @@ export default {
         if (valid) {
           var orgId = "";
           for (let exam of this.examList) {
-            if ((exam.id = this.printFrom.examId)) {
+            if (exam.id == this.printFrom.examId) {
               orgId = exam.rootOrgId;
             }
           }
@@ -668,6 +666,7 @@ export default {
               message: "已推送",
               type: "success"
             });
+            this.resetForm2(formData);
             this.dialogModel = false;
           }
         } else {

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

@@ -764,7 +764,9 @@ export default {
             ? 1
             : parseInt(sessionStorage.getItem("import_paper_currentPage"));
       }
-      this.getCourses(this.formSearch.courseName);
+      if (this.formSearch.courseName) {
+        this.getCourses(this.formSearch.courseName);
+      }
       this.searchImportPaper();
     }
   },

+ 1 - 0
src/modules/questions/views/InsertPaperStructure.vue

@@ -256,6 +256,7 @@ export default {
       var paperStructStorge = sessionStorage.getItem("paperStruct");
       if (typeof paperStructStorge == "string") {
         var paperStruct = JSON.parse(paperStructStorge);
+        this.getCourses(paperStruct.courseName);
         this.paperStruct = paperStruct;
         this.paperDetailStructs = paperStruct.paperDetailStructs;
       }

+ 15 - 2
src/modules/questions/views/PaperStructure.vue

@@ -181,7 +181,8 @@ export default {
         name: "",
         creator: "",
         courseNo: "ALL",
-        type: "EXACT"
+        type: "EXACT",
+        courseName: ""
       },
       paperStructId: "",
       loading: false,
@@ -228,7 +229,15 @@ export default {
       });
       this.selectedList = selectedList;
     },
+    getCourseName(courseNo) {
+      for (let course of this.courseList) {
+        if (course.code == courseNo) {
+          this.formSearch.courseName = course.name;
+        }
+      }
+    },
     editPaperStruct(row) {
+      this.getCourseName(this.formSearch.courseNo);
       sessionStorage.setItem("paper_stucture", JSON.stringify(this.formSearch));
       sessionStorage.setItem("paper_stucture_currentPage", this.currentPage);
       sessionStorage.setItem("paperStruct", JSON.stringify(row));
@@ -343,7 +352,8 @@ export default {
           name: "",
           creator: "",
           courseNo: "ALL",
-          type: "EXACT"
+          type: "EXACT",
+          courseName: ""
         };
         this.currentPage = 1;
       } else {
@@ -352,6 +362,9 @@ export default {
           sessionStorage.getItem("paper_stucture_currentPage")
         );
       }
+      if (this.formSearch.courseName) {
+        this.getCourses(this.formSearch.courseName);
+      }
       this.searchPaperStructs();
     }
   },