diff --git a/src/views/ems/record/recordIotenvInstant/index.vue b/src/views/ems/record/recordIotenvInstant/index.vue index 41e4f21..4a2dd6d 100644 --- a/src/views/ems/record/recordIotenvInstant/index.vue +++ b/src/views/ems/record/recordIotenvInstant/index.vue @@ -356,15 +356,15 @@ }; }, created() { - // const nowDate = new Date(); - // const today = parseTime(new Date(), '{y}-{m}-{d}') - // const lastDate = new Date(); - // lastDate.setDate(nowDate.getDate() - 1) - // const yesterday = parseTime(lastDate, '{y}-{m}-{d}') - // - // console.log(today,yesterday) - // this.daterangeRecordTime[0] = yesterday+ ' 08:00:00' - // this.daterangeRecordTime[1] = today + ' 08:00:00' + const nowDate = new Date(); + const today = parseTime(new Date(), '{y}-{m}-{d}') + const lastDate = new Date(); + lastDate.setDate(nowDate.getDate() - 1) + const yesterday = parseTime(lastDate, '{y}-{m}-{d}') + this.daterangeRecordTime[0] = yesterday+ ' 08:00:00' + this.daterangeRecordTime[1] = today + ' 08:00:00' + + this.getList(); }, methods: {