Quellcode durchsuchen

Merge branch '03/23resetCourse' into test

wolyshaw vor 4 Jahren
Ursprung
Commit
faea963114

+ 6 - 1
src/views/teamDetail/components/modals/classroom-preview.vue

@@ -38,6 +38,12 @@
         <span slot-scope="scope">{{courseTypeListByName[scope.row.type]}}</span>
       </el-table-column>
       <el-table-column
+        label="周次"
+        key="week"
+      >
+        <span slot-scope="scope">{{dayjs(scope.row.startClassTime).day()}}</span>
+      </el-table-column>
+      <el-table-column
         label="开始时间"
         prop="startClassTime"
       ></el-table-column>
@@ -134,7 +140,6 @@ export default {
   methods: {
     getTimers (item) {
       const time = diffTimerFormMinute(dayjs(item.classDate).format('YYYY-MM-DD'), dayjs(item.startClassTime).format('HH:mm'), dayjs(item.endClassTime).format('HH:mm'))
-      console.log(time, item)
       return time
     }
   }

+ 5 - 3
src/views/teamDetail/components/modals/classroom-setting-item.vue

@@ -384,9 +384,11 @@ export default {
           ? (num = row.dayOfWeek - date.getDay())
           : (num = row.dayOfWeek - date.getDay() + 7);
           let end = dayjs(val).add(num+(row.expectCourseNum*7), 'day')
-          for (const d of this.holidays) {
-            if (dayjs(d).isBetween(row.startDate, end.format('YYYY-MM-DD'), null, '[]')) {
-              end = end.add(7, 'day')
+          if (row.holiday) {
+            for (const d of this.holidays) {
+              if (dayjs(d).isBetween(row.startDate, end.format('YYYY-MM-DD'), null, '[]')) {
+                end = end.add(7, 'day')
+              }
             }
           }
           this.$set(