quanyawei
2024-09-12 293a5597a6823edc5c64372ec41b1024c9f87ee0
src/views/toCarryOutLegislativeReforms/summaryPage/index.vue
@@ -397,13 +397,12 @@
      })
    },
    getPeriods (month) {
      const now = new Date()
      const today = new Date()
      const end = new Date(new Date())
      const today = new Date(now.getFullYear(), now.getMonth(), now.getDate())
      // 获取近一个月的时间段
      const oneMonthAgo = new Date(today)
      oneMonthAgo.setMonth(oneMonthAgo.getMonth() - month)
      const startTime = oneMonthAgo.toISOString().split('T')[0]
      const startTime = oneMonthAgo.toISOString().substring(0, 10)
      const endTime = end.toISOString().substring(0, 10)
      console.log('startTime', startTime, 'endTime', endTime)
      return [startTime, endTime]