lex 2 gadi atpakaļ
vecāks
revīzija
06edb3aae0

+ 2 - 1
src/school/train-planning/component/practice-detail/index.tsx

@@ -270,12 +270,13 @@ export default defineComponent({
           v-model:modelValue={forms.classStatus}
           position="bottom"
           style={{ background: '#f6f6f6' }}
+          destroy
         >
           <PracticeClass
             onClose={() => (forms.classStatus = false)}
             classType={f.selectItem.classType}
+            selectItem={f.selectItem.classIdList}
             onConfirm={(val: any) => {
-              console.log(val, 'val')
               f.selectItem.classIdList = val
             }}
           />

+ 1 - 1
src/school/train-planning/component/standard/index.tsx

@@ -151,7 +151,7 @@ export default defineComponent({
     }
 
     onMounted(() => {
-      getList()
+      getList(forms.calendarDate || new Date())
       getClasses()
       getStandardCourseNum()
     })

+ 12 - 0
src/school/train-planning/modal/calendar/index.tsx

@@ -81,6 +81,17 @@ export default defineComponent({
       return dayjs(this.currentDate).format('YYYY-MM-DD')
     }
   },
+  watch: {
+    calendarDate() {
+      // 初始化标题和最大显示日期
+      this.subtitle = dayjs(this.calendarDate || new Date()).format('YYYY年MM月')
+      this.maxDate = dayjs(this.calendarDate || new Date())
+        .endOf('month')
+        .toDate()
+      this.minDate = dayjs(this.calendarDate || new Date()).toDate()
+      this.currentDate = dayjs(this.calendarDate || new Date()).toDate()
+    }
+  },
   mounted() {
     // 初始化标题和最大显示日期
     this.subtitle = dayjs(this.calendarDate || new Date()).format('YYYY年MM月')
@@ -88,6 +99,7 @@ export default defineComponent({
       .endOf('month')
       .toDate()
     this.minDate = dayjs(this.calendarDate || new Date()).toDate()
+    this.currentDate = dayjs(this.calendarDate || new Date()).toDate()
 
     console.log(this.list, 'this.list')
     console.log(this.calendarDate, 'calendarDate')

+ 4 - 5
src/school/train-planning/modal/timer/index.tsx

@@ -45,7 +45,7 @@ export default defineComponent({
     }
 
     const onFilter = (type: any, option: any) => {
-      console.log(type, option)
+      // console.log(type, option)
       // 时间
       if (type === 'hour') {
         const hour: any = []
@@ -56,7 +56,7 @@ export default defineComponent({
             }
           })
         })
-        console.log(hour, 'hour')
+        // console.log(hour, 'hour')
         return hour
       }
       return option
@@ -65,7 +65,6 @@ export default defineComponent({
     // 时间切换时
     // [6:30, 12:00] [15:00, 18:00]
     const onChange = (val: any) => {
-      console.log(val, 'val')
       // 判断是否选择小时
       if (val.columnIndex === 1) return
 
@@ -168,8 +167,8 @@ export default defineComponent({
       const useFormat = onFormatTimer(useTimer)
       state.useTimerFormat = useFormat
       state.usedTimer = [...usedTimer]
-      console.log(onFormatTimer(useTimer), 'onFormatTimer')
-      console.log(state.useTimer, state.usedTimer, 'onUseTimer')
+      // console.log(onFormatTimer(useTimer), 'onFormatTimer')
+      // console.log(state.useTimer, state.usedTimer, 'onUseTimer')
 
       // 判断有可排课数据
       if (useFormat.length > 0) {