Browse Source

Update list.tsx

lex 2 years ago
parent
commit
a1b699a78d
1 changed files with 7 additions and 1 deletions
  1. 7 1
      src/school/train-report/components/list.tsx

+ 7 - 1
src/school/train-report/components/list.tsx

@@ -59,12 +59,18 @@ export default defineComponent({
       try {
         if (state.isClick) return
         state.isClick = true
+
+        const dateRange = dayjs(state.currentDate[0] + '-' + state.currentDate[1] + '01')
+        const startTime = dateRange.startOf('month').format('YYYY-MM-DD')
+        const endTime = dateRange.endOf('month').format('YYYY-MM-DD')
         const { data } = await request.post('/api-school/orchestraReport/page', {
           data: {
             reportType: props.type,
             page: state.params.page,
             rows: state.params.rows,
-            orchestraId: state.selectOrchestra.value
+            orchestraId: state.selectOrchestra.value,
+            startTime,
+            endTime
           }
         })