Forráskód Böngészése

提交调卷规则bug

weiwenhai 6 éve
szülő
commit
09af18018d

+ 25 - 17
src/modules/questions/views/ExtractPaperInfo.vue

@@ -549,6 +549,12 @@ export default {
               this.$notify({ type: "error", message: response.data.desc });
             }
           );
+      } else {
+        this.$notify({
+          message: "试卷类型没有制定试卷",
+          type: "error",
+          duration: 2000
+        });
       }
     },
     //音频播放次数校验
@@ -601,17 +607,18 @@ export default {
             // $(".errorMsg_" + i + "_" + j)
             //   .text("试卷不能为空")
             //   .show();
-            document.getElementById("errorMsg_" + i + "_" + j).innerHTML =
-              "试卷不能为空";
-            document.getElementById("errorMsg_" + i + "_" + j).style.display =
-              "block";
+            document.getElementsByClassName(
+              "errorMsg_" + i + "_" + j
+            )[0].innerHTML = "试卷不能为空";
+            document.getElementsByClassName(
+              "errorMsg_" + i + "_" + j
+            )[0].style.display = "block";
             break;
           } else {
             //$(".errorMsg_" + i + "_" + j).hide();
-            if (document.getElementById("errorMsg_" + i + "_" + j)) {
-              document.getElementById("errorMsg_" + i + "_" + j).style.display =
-                "none";
-            }
+            document.getElementsByClassName(
+              "errorMsg_" + i + "_" + j
+            )[0].style.display = "none";
           }
           var reg = /^([1]?\d{1,2})$/;
           if (
@@ -622,16 +629,19 @@ export default {
             // $(".errorMsg_" + i + "_" + j)
             //   .text("请输入1-100的整数")
             //   .show();
-            document.getElementById("errorMsg_" + i + "_" + j).innerHTML =
-              "请输入1-100的整数";
-            document.getElementById("errorMsg_" + i + "_" + j).style.display =
-              "block";
+            document.getElementsByClassName(
+              "errorMsg_" + i + "_" + j
+            )[0].innerHTML = "请输入1-100的整数";
+            document.getElementsByClassName(
+              "errorMsg_" + i + "_" + j
+            )[0].style.display = "block";
             break;
           } else {
             //$(".errorMsg_" + i + "_" + j).hide();
-            if (document.getElementById("errorMsg_" + i + "_" + j)) {
-              document.getElementById("errorMsg_" + i + "_" + j).style.display =
-                "none";
+            if (document.getElementsByClassName("errorMsg_" + i + "_" + j)) {
+              document.getElementsByClassName(
+                "errorMsg_" + i + "_" + j
+              )[0].style.display = "none";
             }
             weightCount += parseInt(_paperInfoList[j].weight);
             selectedPaperIds.push(_paperInfoList[j].paper.id);
@@ -671,8 +681,6 @@ export default {
     },
     //返回
     back() {
-      console.log("aaa");
-      console.log("this.isInsert:", this.isInsert);
       if (this.isInsert) {
         this.$router.push({
           path: "/questions/extract_paper_rule/1"

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

@@ -372,7 +372,10 @@ export default {
     //修改调卷规则
     updateRules(row) {
       sessionStorage.setItem("extract_paper_examId", row.examId);
-      sessionStorage.setItem("extract_paper_courseNo", row.courseCode);
+      sessionStorage.setItem(
+        "extract_paper_courseNo",
+        this.formSearch.courseNo
+      );
       sessionStorage.setItem("extract_paper_currentPage", this.currentPage);
       this.$router.push({
         name: "extract_paper_info_edit",