From c78090da56c047d9eb8f6bc39cf973856bded2fe Mon Sep 17 00:00:00 2001 From: song Date: Mon, 1 Nov 2021 09:34:03 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E5=9B=BE=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/data-search-bar.vue | 4 ++-- src/components/search-bar-data.vue | 4 ++-- src/views/month-data.vue | 24 ++++++++++++++++++------ src/views/statistical-history.vue | 10 ++++------ src/views/statistical-realtime.vue | 14 +++++--------- 5 files changed, 31 insertions(+), 25 deletions(-) diff --git a/src/components/data-search-bar.vue b/src/components/data-search-bar.vue index ce1683b..2220af5 100644 --- a/src/components/data-search-bar.vue +++ b/src/components/data-search-bar.vue @@ -53,8 +53,8 @@ const onSubmit = () => { searchDeviceForm.value.validate(() => { const { deviceId, date } = { ...searchDevice }; if (date) { - const start = dayjs(date[0]).format('X'); - const end = dayjs(date[1]).format('X'); + const start = dayjs(date[0]).valueOf(); + const end = dayjs(date[1]).valueOf(); const daterange = [start, end]; emit('search', { deviceId, date: daterange }); } else { diff --git a/src/components/search-bar-data.vue b/src/components/search-bar-data.vue index b227740..1819b43 100644 --- a/src/components/search-bar-data.vue +++ b/src/components/search-bar-data.vue @@ -55,8 +55,8 @@ const onSubmit = () => { searchDeviceForm.value.validate(() => { const { deviceId, date } = searchDevice; if (date) { - const start = dayjs(date[0]).format('X'); - const end = dayjs(date[1]).format('X'); + const start = dayjs(date[0]).valueOf(); + const end = dayjs(date[1]).valueOf(); const daterange = [start, end]; emit('search', { deviceId, date: daterange }); } else { diff --git a/src/views/month-data.vue b/src/views/month-data.vue index 20c9954..1c9fda3 100644 --- a/src/views/month-data.vue +++ b/src/views/month-data.vue @@ -1,5 +1,5 @@