From ec38056995178c94bea0689d6c6fd64ed5da8014 Mon Sep 17 00:00:00 2001
From: quanyawei <401863037@qq.com>
Date: Wed, 27 Dec 2023 15:38:28 +0800
Subject: [PATCH] fix:日期限制取消

---
 src/views/hotMap/components/selectHour.vue |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/src/views/hotMap/components/selectHour.vue b/src/views/hotMap/components/selectHour.vue
index 13839ff..b044d22 100644
--- a/src/views/hotMap/components/selectHour.vue
+++ b/src/views/hotMap/components/selectHour.vue
@@ -21,7 +21,7 @@
 <script>
 // ���������������������������������������������������������js������������������js���json������������������������������
 // ���������import������������������from'������������������';
-
+import dayjs from 'dayjs'
 export default {
 // import ���������������������������������������������������
   components: {},
@@ -63,6 +63,11 @@
         this.endPlaceholderData = '������������������'
         this.format = 'yyyy-MM-dd HH'
         this.valueFormat = 'yyyy-MM-dd HH'
+        let starTime = dayjs().subtract(1, 'day').format('YYYY-MM-DD')
+        this.value1 = [
+          `${starTime} 00`,
+          dayjs().format('YYYY-MM-DD HH')
+        ]
       } else if (nv === 'daterange') {
         this.startPlaceholderData = '������������'
         this.endPlaceholderData = '������������'
@@ -78,7 +83,15 @@
   },
   // ������������ - ��������������������������������� this ���������
   created () {
+    console.log('this.value1', this.value1)
     // this.currentHour()
+    if (this.dataType === 'datetimerange') {
+      let starTime = dayjs().subtract(1, 'day').format('YYYY-MM-DD')
+      this.value1 = [
+        `${starTime} 00`,
+        dayjs().format('YYYY-MM-DD HH')
+      ]
+    }
   },
   methods: {
     sendPicker () {

--
Gitblit v1.8.0