Jelajahi Sumber

审批完成

1
mo 2 tahun lalu
induk
melakukan
2114a1626a

+ 1 - 0
src/router/index.ts

@@ -49,6 +49,7 @@ router.onError((error) => {
   if (error instanceof Error) {
     const isChunkLoadFailed = error.name.indexOf('chunk')
     const targetPath = router.currentRoute.value.fullPath
+    console.log(error)
     if (isChunkLoadFailed && !isOpen) {
       isOpen = true
       Dialog.alert({

+ 8 - 0
src/router/routes-school.ts

@@ -204,6 +204,14 @@ export default [
         meta: {
           title: '审批详情'
         }
+      },
+      {
+        path: '/course-adjust',
+        name: 'course-adjust',
+        component: () => import('@/school/approval-manage/course-adjust'),
+        meta: {
+          title: '课程调整'
+        }
       }
       //
     ]

+ 17 - 2
src/school/approval-manage/components/approval-item.tsx

@@ -5,9 +5,10 @@ import passIcon from '../images/pass-icon.png'
 import unpassIcon from '../images/unpass-icon.png'
 import defaultIcon from '@/school/images/default-icon.jpg'
 import msgIcon from '@/school/images/msg-icon.png'
-import { Icon, ActionSheet } from 'vant'
+import { Icon, ActionSheet, showToast } from 'vant'
 import dayjs from 'dayjs'
 import { useRouter } from 'vue-router'
+import { postMessage } from '@/helpers/native-message'
 export default defineComponent({
   props: ['item', 'type'],
   name: 'approval-item',
@@ -16,6 +17,20 @@ export default defineComponent({
     const gotoStudentDetail = () => {
       // router.push({ path: '/student-att-day', query: { time: props.item.time } })
     }
+    const gotoMsg = async () => {
+      console.log(props.item)
+      try {
+        await postMessage({
+          api: 'joinChatGroup',
+          content: {
+            type: 'single', // single 单人 multi 多人
+            id: props.item.imUserId
+          }
+        })
+      } catch (e) {
+        showToast('发起聊天失败')
+      }
+    }
     return () => (
       <>
         <div class={styles.itemWrap} onClick={gotoStudentDetail}>
@@ -41,7 +56,7 @@ export default defineComponent({
               </div>
             ) : null}
             {props.type == 'doing' && props.item.status == 'DOING' ? (
-              <div class={styles.itemWrapTopRight}>
+              <div class={styles.itemWrapTopRight} onClick={gotoMsg}>
                 <Icon class={styles.msgIcon} name={msgIcon}></Icon>
               </div>
             ) : null}

+ 7 - 1
src/school/approval-manage/components/end-approval.tsx

@@ -61,6 +61,10 @@ export default defineComponent({
     onMounted(() => {
       getList()
     })
+    const gotoDetail = (row: any) => {
+      // leaveCategoryId 1请假 2退团
+      router.push({ path: '/student-leave', query: { id: row.id, type: 'end' } })
+    }
     return () => (
       <>
         <div class={styles.approvalWrap}>
@@ -73,7 +77,9 @@ export default defineComponent({
                 onLoad={getList}
               >
                 {list.value.map((item: any) => (
-                  <ApprovalItem item={item} type="end"></ApprovalItem>
+                  <div onClick={() => gotoDetail(item)}>
+                    <ApprovalItem item={item} type="end"></ApprovalItem>
+                  </div>
                 ))}
               </List>
             </PullRefresh>

+ 13 - 6
src/school/approval-manage/components/student-course-item.tsx

@@ -13,8 +13,8 @@ export default defineComponent({
   name: 'student-course-item',
   setup(props) {
     const router = useRouter()
-    const gotoStudentDetail = () => {
-      // router.push({ path: '/student-att-day', query: { time: props.item.time } })
+    const onAdjust = () => {
+      router.push({ path: '/course-adjust', query: { id: props.item.id } })
     }
     return () => (
       <>
@@ -31,10 +31,17 @@ export default defineComponent({
             </div>
           </div>
           <div class={styles.itemWrapBottom}>
-            <p class={styles.itemWrapBottomMain}>
-              {props.item.className}-{props.item.teacherName}
-            </p>
-            <p class={styles.itemWrapBottomSub}>{props.item.orchestraName}</p>
+            <div>
+              <p class={styles.itemWrapBottomMain}>
+                {props.item.className}-{props.item.teacherName}
+              </p>
+              <p class={styles.itemWrapBottomSub}>{props.item.orchestraName}</p>
+            </div>
+            <div class={styles.itemWrapBottomRight}>
+              <div class={styles.rejectBtn} onClick={onAdjust}>
+                调整
+              </div>
+            </div>
           </div>
         </div>
       </>

+ 7 - 0
src/school/approval-manage/components/student-leave.module.less

@@ -77,4 +77,11 @@
       border-radius: 22px;
     }
   }
+  :global {
+    .van-field__word-limit {
+      position: absolute;
+      top: -30px;
+      right: 0;
+    }
+  }
 }

+ 83 - 36
src/school/approval-manage/components/student-leave.tsx

@@ -11,9 +11,12 @@ import dateICon from '../images/date-icon.png'
 import eiditICon from '../images/eidit-icon.png'
 import questICon from '../images/quest-icon.png'
 import StudentCourseItem from './student-course-item'
+import dayjs from 'dayjs'
 const activeName = ref('wait')
 const item = ref({} as any)
 const courseScheduleList = ref([] as any)
+const leaveReason = ref('')
+const isEnd = ref(false)
 export default defineComponent({
   name: 'approval-manage',
   setup() {
@@ -29,6 +32,7 @@ export default defineComponent({
         )
         item.value = data
         courseScheduleList.value = data.courseScheduleList || []
+        leaveReason.value = item.value.approvalComments
       } catch (e: any) {
         // console.log(e, 'e')
         const message = e.message
@@ -36,53 +40,94 @@ export default defineComponent({
       }
     }
     onMounted(() => {
+      leaveReason.value = ''
+      isEnd.value = route.query.type == 'end' ? true : false
       getLeaveDetail()
     })
+
+    const approval = async (val: string) => {
+      if (!leaveReason.value) {
+        showToast('请输入审批原因')
+      }
+      try {
+        const { data } = await request.post(`/api-school/userLeaveRecord/approval`, {
+          data: {
+            id: route.query.id,
+            approvalComments: leaveReason.value,
+            status: val
+          }
+        })
+        showToast('提交成功')
+        router.push('/approval-manage')
+      } catch (e: any) {
+        showToast(e.message || '提交失败')
+      }
+    }
     return () => (
       <>
         <div class={styles.leaveWrap}>
           <OSticky>
             <OHeader isBack={true}></OHeader>
           </OSticky>
-          <ApprovalItem item={item.value} type="doing"></ApprovalItem>
-          <div class={styles.leaveInfo}>
-            <p class={styles.subTitle}>
-              <Icon class={styles.subTitleIcon} name={dateICon}></Icon>
-              <span>请假日期</span>
-            </p>
-            <p class={styles.leaveDate}>2022-10-25 - 2022-10-28</p>
-            <p class={styles.subTitle}>
-              <Icon class={styles.subTitleIcon} name={questICon}></Icon>
-              <span>请假原因</span>
-            </p>
-            <p class={styles.leaveReason}>请假</p>
-          </div>
+          <ApprovalItem item={item.value} type={route.query.type}></ApprovalItem>
+          {item.value.leaveCategoryId == 1 ? (
+            <div>
+              <div class={styles.leaveInfo}>
+                <p class={styles.subTitle}>
+                  <Icon class={styles.subTitleIcon} name={dateICon}></Icon>
+                  <span>请假日期</span>
+                </p>
+                <p class={styles.leaveDate}>
+                  {dayjs(item.value.startTime).format('YYYY年MM月DD日')} -{' '}
+                  {dayjs(item.value.endTime).format('YYYY年MM月DD日')}
+                </p>
+                <p class={styles.subTitle}>
+                  <Icon class={styles.subTitleIcon} name={questICon}></Icon>
+                  <span>请假原因</span>
+                </p>
+                <p class={styles.leaveReason}>{item.value.leaveReason}</p>
+              </div>
 
-          <div class={styles.courseWrap}>
-            <div class={styles.courseWrapTitlte}>
-              {' '}
-              <p class={styles.subTitle}>
-                <Icon class={styles.subTitleIcon} name={cardICon}></Icon>
-                <span>涉及课程</span>
-              </p>
-            </div>
+              <div class={styles.courseWrap}>
+                <div class={styles.courseWrapTitlte}>
+                  {' '}
+                  <p class={styles.subTitle}>
+                    <Icon class={styles.subTitleIcon} name={cardICon}></Icon>
+                    <span>涉及课程</span>
+                  </p>
+                </div>
 
-            <div class={styles.courseList}>
-              {courseScheduleList.value.map((item) => (
-                <StudentCourseItem item={item}></StudentCourseItem>
-              ))}
-              {/* {item.value?.courseScheduleList} */}
+                <div class={styles.courseList}>
+                  {courseScheduleList.value.map((item) => (
+                    <StudentCourseItem item={item}></StudentCourseItem>
+                  ))}
+                  {/* {item.value?.courseScheduleList} */}
+                </div>
+              </div>
             </div>
-          </div>
-
+          ) : null}
+          {item.value.leaveCategoryId == 2 ? (
+            <div>
+              <div class={styles.leaveInfo}>
+                <p class={styles.subTitle}>
+                  <Icon class={styles.subTitleIcon} name={questICon}></Icon>
+                  <span>退团原因</span>
+                </p>
+                <p class={styles.leaveReason}>{item.value.leaveReason}</p>
+              </div>
+            </div>
+          ) : null}
           <div class={styles.reasonWrap}>
             <Field
               label-align="top"
               maxlength={400}
+              v-model={leaveReason.value}
               autosize
               type="textarea"
               rows={5}
+              show-word-limit
               placeholder="请输入你的审批意见"
+              disabled={isEnd.value}
             >
               {{
                 label: () => (
@@ -96,14 +141,16 @@ export default defineComponent({
               }}
             </Field>
           </div>
-          <div class={['btnGroup btnMore', styles.btnWrap]}>
-            <Button color="#ccc" class={styles.unpassBtn}>
-              拒绝
-            </Button>
-            <Button color="#FF8057" class={styles.unpassBtn}>
-              通过
-            </Button>
-          </div>
+          {isEnd.value ? null : (
+            <div class={['btnGroup btnMore', styles.btnWrap]}>
+              <Button color="#ccc" class={styles.unpassBtn} onClick={() => approval('UNPASS')}>
+                拒绝
+              </Button>
+              <Button color="#FF8057" class={styles.unpassBtn} onClick={() => approval('PASS')}>
+                通过
+              </Button>
+            </div>
+          )}
         </div>
       </>
     )

+ 20 - 0
src/school/approval-manage/components/studnet-course-item.module.less

@@ -1,4 +1,5 @@
 .itemWrap {
+  margin-bottom: 12px;
   padding: 12px 15px 15px;
   border-radius: 10px;
   background-color: #fff;
@@ -57,6 +58,10 @@
   }
   .itemWrapBottom {
     padding-top: 15px;
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+    justify-content: space-between;
     .itemWrapBottomMain {
       margin-bottom: 4px;
       font-size: 16px;
@@ -70,5 +75,20 @@
       color: #777777;
       line-height: 20px;
     }
+    .rejectBtn {
+      font-size: 14px;
+      font-family: PingFangSC-Medium, PingFang SC;
+      font-weight: 500;
+      color: #f67146;
+      line-height: 30px;
+      height: 30px;
+      background: #ffffff;
+      border-radius: 15px;
+      border: 1px solid #ff8057;
+      padding: 0 28px;
+      &:active {
+        opacity: 0.7;
+      }
+    }
   }
 }

+ 1 - 11
src/school/approval-manage/components/wait-approval.tsx

@@ -61,18 +61,8 @@ export default defineComponent({
     }
 
     const gotoDetail = (row: any) => {
-      console.log(row)
       // leaveCategoryId 1请假 2退团
-      if (row.clientType == 'STUDENT') {
-        if (row.leaveCategoryId == 1) {
-          // 请假
-          router.push({ path: '/student-leave', query: { id: row.id } })
-        } else {
-          // 退团
-        }
-      } else {
-        console.log('老师请假')
-      }
+      router.push({ path: '/student-leave', query: { id: row.id, type: 'doing' } })
     }
     onMounted(() => {
       getList()

+ 34 - 0
src/school/approval-manage/course-adjust.module.less

@@ -0,0 +1,34 @@
+.courseInfo {
+  margin-top: 12px;
+  :global {
+    .van-cell {
+      padding: 0 12px;
+      font-size: 16px;
+      font-weight: 400;
+      color: #333333;
+      line-height: 58px;
+      display: flex;
+      flex-direction: row;
+      align-items: center;
+      .van-cell__value {
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+        font-size: 16px;
+        font-weight: 400;
+        color: #333333;
+      }
+    }
+  }
+}
+.wall {
+  height: 60px;
+}
+.btnWrap {
+  position: fixed;
+  width: 85%;
+  bottom: 60px;
+  .unpassBtn {
+    border-radius: 22px;
+  }
+}

+ 234 - 0
src/school/approval-manage/course-adjust.tsx

@@ -0,0 +1,234 @@
+import OHeader from '@/components/o-header'
+import OSticky from '@/components/o-sticky'
+import {
+  CellGroup,
+  Cell,
+  Button,
+  Popup,
+  DatePicker,
+  DatePickerColumnType,
+  TimePicker,
+  TimePickerColumnType,
+  ActionSheet,
+  showToast
+} from 'vant'
+import { defineComponent, reactive, ref, onMounted } from 'vue'
+import { postMessage } from '@/helpers/native-message'
+import styles from './course-adjust.module.less'
+import { useRouter, useRoute } from 'vue-router'
+import request from '@/helpers/request'
+import dayjs from 'dayjs'
+import { courseEmnu } from '@/constant'
+import { state as globalState } from '@/state'
+import { browser } from '@/helpers/utils'
+const columnsType = ref<DatePickerColumnType[]>(['year', 'month', 'day'])
+const columnsTypeTime = ref<TimePickerColumnType[]>(['hour', 'minute'])
+const schoolId = (globalState.user.data.schoolInfos || [])
+  .map((item: any) => {
+    return item.id
+  })
+  .join(',')
+export default defineComponent({
+  name: 'course-adjust',
+  setup() {
+    const router = useRouter()
+    const route = useRoute()
+    const state = reactive({
+      id: route.query.id,
+      showPopoverTime: false,
+      showPopoverCourseTime: false,
+      showPopoverTeacher: false,
+      currentDate: [] as any,
+      currentCourseDate: [] as any,
+      teachers: [] as any
+    })
+    const forms = reactive({
+      classDate: '',
+      teacherId: '',
+      courseScheduleId: '',
+      startTime: '',
+      endTime: ''
+    })
+    const courseDetail = ref({} as any)
+    const getDetail = async () => {
+      const { data } = await request.get(`/api-school/courseSchedule/detail/${route.query.id}`, {})
+      courseDetail.value = { ...data }
+      state.currentDate = [
+        dayjs(courseDetail.value.classDate).format('YYYY'),
+        dayjs(courseDetail.value.classDate).format('MM'),
+        dayjs(courseDetail.value.classDate).format('DD')
+      ]
+
+      state.currentCourseDate = [
+        dayjs(courseDetail.value.startTime).format('hh'),
+        dayjs(courseDetail.value.startTime).format('mm')
+      ]
+      forms.classDate = courseDetail.value.classDate
+      forms.teacherId = courseDetail.value.teacherId
+      forms.courseScheduleId = courseDetail.value.id
+      forms.startTime = courseDetail.value.startTime
+      forms.endTime = courseDetail.value.endTime
+      /**
+       *   classDate: '',
+      teacherId: '',
+      courseScheduleId: '',
+      startTime: '',
+      endTime: ''
+       */
+    }
+
+    const getTeacherList = async () => {
+      try {
+        const { data } = await request.post(`/api-school/teacher/page`, {
+          data: {
+            schoolId,
+            page: 1,
+            rows: 99999
+          }
+        })
+        state.teachers = data.rows.map((item) => {
+          return {
+            name: item.nickname,
+            value: item.id as string
+          }
+        })
+      } catch (e: any) {
+        showToast(e.message)
+      }
+    }
+
+    const checkTeacher = (val: any) => {
+      console.log(val)
+      courseDetail.value.teacherName = val.name
+      forms.teacherId = val.id
+    }
+    onMounted(() => {
+      getDetail()
+      getTeacherList()
+    })
+    const reset = () => {
+      getDetail()
+    }
+
+    const submit = async () => {
+      console.log(forms)
+      try {
+        const { data } = await request.post(`/api-school/courseSchedule/adjust`, {
+          data: {
+            ...forms
+          }
+        })
+        if (browser().iPhone) {
+          postMessage({ api: 'back' })
+        } else {
+          this.$router.back()
+        }
+        showToast('调整成功')
+      } catch (e: any) {
+        showToast(e.message)
+      }
+      console.log('课程调整')
+    }
+    const checkTimer = (val: any) => {
+      // forms.practiceMonth = val.selectedValues[0] + val.selectedValues[1]
+      // forms.practiceMonthName = val.selectedValues[0] + '年' + val.selectedValues[1] + '月'
+      forms.classDate =
+        val.selectedValues[0] + '-' + val.selectedValues[1] + '-' + val.selectedValues[2]
+      courseDetail.value.classDate =
+        val.selectedValues[0] + '-' + val.selectedValues[1] + '-' + val.selectedValues[2]
+      state.showPopoverTime = false
+    }
+
+    const checkCourseTimer = (val: any) => {
+      forms.startTime =
+        forms.classDate + ' ' + val.selectedValues[0] + ':' + val.selectedValues[1] + ':00'
+      forms.endTime = dayjs(forms.startTime)
+        .add(courseDetail.value.singleCourseTime, 'minute')
+        .format('YYYY-MM-DD hh:mm:ss')
+
+      courseDetail.value.startTime = forms.startTime
+      state.showPopoverCourseTime = false
+    }
+
+    return () => (
+      <>
+        <div class={styles.courseWrap}>
+          <OHeader isBack={true} border={false}></OHeader>
+          <div class={styles.courseInfo}>
+            <CellGroup inset border={false}>
+              <Cell title="乐团名称" value={courseDetail.value.orchestraName} />
+              <Cell title="课程类型" value={courseEmnu[courseDetail.value.type]} />
+              <Cell
+                title="课程开始日期"
+                value={dayjs(courseDetail.value.classDate).format('YYYY-MM-DD')}
+                is-link
+                onClick={() => (state.showPopoverTime = true)}
+              />
+              <Cell
+                title="课程开始时间"
+                value={dayjs(courseDetail.value.startTime).format('hh:mm')}
+                is-link
+                onClick={() => {
+                  state.showPopoverCourseTime = true
+                }}
+              />
+              <Cell title="课程时长" value={courseDetail.value.singleCourseTime + '分钟'} />
+              <Cell
+                title="授课老师"
+                value={courseDetail.value.teacherName}
+                onClick={() => {
+                  state.showPopoverTeacher = true
+                }}
+                is-link
+              />
+            </CellGroup>
+          </div>
+          <div class={styles.wall}></div>
+          <div class={['btnGroup btnMore', styles.btnWrap]}>
+            <Button color="#ccc" class={styles.unpassBtn} onClick={() => reset()}>
+              取消
+            </Button>
+            <Button color="#FF8057" class={styles.unpassBtn} onClick={() => submit()}>
+              确认调整
+            </Button>
+          </div>
+          <Popup v-model:show={state.showPopoverTime} position="bottom" style="{ height: '30%' }">
+            <DatePicker
+              onCancel={() => {
+                state.showPopoverTime = false
+              }}
+              onConfirm={checkTimer}
+              v-model={state.currentDate}
+              title="选择年月日"
+              columnsType={columnsType.value}
+            />
+          </Popup>
+
+          <Popup
+            v-model:show={state.showPopoverCourseTime}
+            position="bottom"
+            style="{ height: '30%' }"
+          >
+            <TimePicker
+              onCancel={() => {
+                state.showPopoverCourseTime = false
+              }}
+              onConfirm={checkCourseTimer}
+              v-model={state.currentCourseDate}
+              title="选择开课时间"
+              columnsType={columnsTypeTime.value}
+            />
+          </Popup>
+          <ActionSheet
+            style={{ height: '40%' }}
+            close-on-click-action
+            v-model:show={state.showPopoverTeacher}
+            title="选择老师"
+            actions={state.teachers}
+            onSelect={checkTeacher}
+          ></ActionSheet>
+        </div>
+      </>
+    )
+  }
+})

+ 2 - 2
src/school/attendance/components/attend-student.tsx

@@ -40,8 +40,8 @@ export default defineComponent({
       page: 1,
       rows: 20
     })
-    const minDate = ref(new Date(dayjs().subtract(5, 'year').format('YYYY-MM-DD')))
-    const maxDate = ref(new Date(dayjs().add(5, 'year').format('YYYY-MM-DD')))
+    const minDate = ref(new Date(dayjs().subtract(10, 'year').format('YYYY-MM-DD')))
+    const maxDate = ref(new Date(dayjs().add(10, 'year').format('YYYY-MM-DD')))
     const columnsType = ref<DatePickerColumnType[]>(['year', 'month'])
     const refreshing = ref(false)
     const loading = ref(false)

+ 2 - 2
src/school/attendance/components/attend-teacher.tsx

@@ -42,8 +42,8 @@ export default defineComponent({
       page: 1,
       rows: 20
     })
-    const minDate = ref(new Date(dayjs().subtract(5, 'year').format('YYYY-MM-DD')))
-    const maxDate = ref(new Date(dayjs().add(5, 'year').format('YYYY-MM-DD')))
+    const minDate = ref(new Date(dayjs().subtract(10, 'year').format('YYYY-MM-DD')))
+    const maxDate = ref(new Date(dayjs().add(10, 'year').format('YYYY-MM-DD')))
     const columnsType = ref<DatePickerColumnType[]>(['year', 'month'])
     const refreshing = ref(false)
     const loading = ref(false)

+ 2 - 2
src/school/attendance/student-att-day.tsx

@@ -40,8 +40,8 @@ export default defineComponent({
     })
 
     const columnsType = ref<DatePickerColumnType[]>(['year', 'month', 'day'])
-    const minDate = ref(new Date(dayjs().subtract(5, 'year').format('YYYY-MM-DD')))
-    const maxDate = ref(new Date(dayjs().add(5, 'year').format('YYYY-MM-DD')))
+    const minDate = ref(new Date(dayjs().subtract(10, 'year').format('YYYY-MM-DD')))
+    const maxDate = ref(new Date(dayjs().add(10, 'year').format('YYYY-MM-DD')))
     const refreshing = ref(false)
     const loading = ref(false)
     const finished = ref(false)

+ 2 - 2
src/school/exercise-record/exercis-detail.tsx

@@ -53,8 +53,8 @@ export default defineComponent({
       clientType: 'STUDENT'
     })
     const showTip = ref(false)
-    const minDate = ref(new Date(dayjs().subtract(5, 'year').format('YYYY-MM-DD')))
-    const maxDate = ref(new Date(dayjs().add(5, 'year').format('YYYY-MM-DD')))
+    const minDate = ref(new Date(dayjs().subtract(10, 'year').format('YYYY-MM-DD')))
+    const maxDate = ref(new Date(dayjs().add(10, 'year').format('YYYY-MM-DD')))
     const columnsType = ref<DatePickerColumnType[]>(['year', 'month'])
     const refreshing = ref(false)
     const loading = ref(false)

+ 2 - 2
src/school/exercise-record/index.tsx

@@ -62,8 +62,8 @@ export default defineComponent({
       rows: 20
     })
 
-    const minDate = ref(new Date(dayjs().subtract(5, 'year').format('YYYY-MM-DD')))
-    const maxDate = ref(new Date(dayjs().add(5, 'year').format('YYYY-MM-DD')))
+    const minDate = ref(new Date(dayjs().subtract(10, 'year').format('YYYY-MM-DD')))
+    const maxDate = ref(new Date(dayjs().add(10, 'year').format('YYYY-MM-DD')))
     const columnsType = ref<DatePickerColumnType[]>(['year', 'month'])
     const refreshing = ref(false)
     const loading = ref(false)

+ 2 - 2
src/school/ranking-list/components/day-bang.tsx

@@ -42,8 +42,8 @@ export default defineComponent({
       rows: 50,
       sortType: 'PRACTICE_DAY'
     })
-    const minDate = ref(new Date(dayjs().subtract(5, 'year').format('YYYY-MM-DD')))
-    const maxDate = ref(new Date(dayjs().add(5, 'year').format('YYYY-MM-DD')))
+    const minDate = ref(new Date(dayjs().subtract(10, 'year').format('YYYY-MM-DD')))
+    const maxDate = ref(new Date(dayjs().add(10, 'year').format('YYYY-MM-DD')))
     const columnsType = ref<DatePickerColumnType[]>(['year', 'month'])
     const refreshing = ref(false)
     const loading = ref(false)

+ 2 - 2
src/school/ranking-list/components/timer-bang.tsx

@@ -42,8 +42,8 @@ export default defineComponent({
       rows: 50,
       sortType: 'PRACTICE_DAY'
     })
-    const minDate = ref(new Date(dayjs().subtract(5, 'year').format('YYYY-MM-DD')))
-    const maxDate = ref(new Date(dayjs().add(5, 'year').format('YYYY-MM-DD')))
+    const minDate = ref(new Date(dayjs().subtract(10, 'year').format('YYYY-MM-DD')))
+    const maxDate = ref(new Date(dayjs().add(10, 'year').format('YYYY-MM-DD')))
     const columnsType = ref<DatePickerColumnType[]>(['year', 'month'])
     const refreshing = ref(false)
     const loading = ref(false)