mo 2 years ago
parent
commit
0e1fc2aad5
1 changed files with 12 additions and 1 deletions
  1. 12 1
      src/views/abnormalCourse/index.vue

+ 12 - 1
src/views/abnormalCourse/index.vue

@@ -237,7 +237,18 @@ export default {
         );
         let currentStartDate = new Date(value),
           currentEndDate = new Date(value);
-
+        let currentStartDateStr = this.getDateInfo(currentStartDate);
+        let currentEndDateStr = this.getDateInfo(currentEndDate);
+        const starTime1 = currentStartDateStr
+          ? Number(currentStartDateStr.split(":")[0])
+          : 0;
+        const starTime2 = currentStartDateStr
+          ? Number(currentStartDateStr.split(":")[1])
+          : 0;
+        if (starTime1 < 6) {
+          this.$toast("课程安排开始时间不可早于06:00");
+          return;
+        }
         currentEndDate.setMinutes(currentStartDate.getMinutes() + m);
         if (currentStartDate.toDateString() !== currentEndDate.toDateString()) {
           this.$toast("课时调整不允许跨天调整");