xiatian преди 3 години
родител
ревизия
288f178adc
променени са 3 файла, в които са добавени 51 реда и са изтрити 3 реда
  1. 17 1
      src/modules/examwork/view/onlineExam.vue
  2. 17 1
      src/modules/examwork/view/onlineHomework.vue
  3. 17 1
      src/modules/examwork/view/practiceExam.vue

+ 17 - 1
src/modules/examwork/view/onlineExam.vue

@@ -1684,8 +1684,10 @@ export default {
       this.form.properties.EXAM_CYCLE_WEEK = JSON.stringify(
         this.examCycleWeekArr
       );
-      console.log(this.form);
       let url = EXAM_WORK_API + "/exam";
+      if (!this.checkCkeditorVals()) {
+        return false;
+      }
       this.$refs.form.validate((valid) => {
         if (valid) {
           if (this.examId != "add") {
@@ -1722,6 +1724,20 @@ export default {
         }
       });
     },
+    checkCkeditorVals() {
+      if (
+        this.form.properties.SHOW_UNDERTAKING == "true" &&
+        !this.form.properties.UNDERTAKING
+      ) {
+        this.$notify({
+          type: "warning",
+          message: "请输入承诺书说明",
+        });
+        this.activeName = "tab3";
+        return false;
+      }
+      return true;
+    },
     back() {
       this.$router.push({ path: "/examwork/examInfo" });
     },

+ 17 - 1
src/modules/examwork/view/onlineHomework.vue

@@ -1127,7 +1127,9 @@ export default {
       this.form.properties.EXAM_CYCLE_WEEK = JSON.stringify(
         this.examCycleWeekArr
       );
-      console.log(this.form);
+      if (!this.checkCkeditorVals()) {
+        return false;
+      }
       let url = EXAM_WORK_API + "/exam";
       this.$refs.form.validate((valid) => {
         if (valid) {
@@ -1165,6 +1167,20 @@ export default {
         }
       });
     },
+    checkCkeditorVals() {
+      if (
+        this.form.properties.SHOW_UNDERTAKING == "true" &&
+        !this.form.properties.UNDERTAKING
+      ) {
+        this.$notify({
+          type: "warning",
+          message: "请输入承诺书说明",
+        });
+        this.activeName = "tab3";
+        return false;
+      }
+      return true;
+    },
     back() {
       this.$router.push({ path: "/examwork/examInfo" });
     },

+ 17 - 1
src/modules/examwork/view/practiceExam.vue

@@ -726,7 +726,9 @@ export default {
       this.form.properties.EXAM_CYCLE_WEEK = JSON.stringify(
         this.examCycleWeekArr
       );
-      console.log(this.form);
+      if (!this.checkCkeditorVals()) {
+        return false;
+      }
       let url = EXAM_WORK_API + "/exam";
       this.$refs.form.validate((valid) => {
         if (valid) {
@@ -764,6 +766,20 @@ export default {
         }
       });
     },
+    checkCkeditorVals() {
+      if (
+        this.form.properties.SHOW_UNDERTAKING == "true" &&
+        !this.form.properties.UNDERTAKING
+      ) {
+        this.$notify({
+          type: "warning",
+          message: "请输入承诺书说明",
+        });
+        this.activeName = "tab3";
+        return false;
+      }
+      return true;
+    },
     back() {
       this.$router.push({ path: "/examwork/examInfo" });
     },