From ae52f9a7cca3ebe8803f720e5891a696714347db Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期二, 04 十一月 2025 13:04:16 +0800
Subject: [PATCH] 基础数据产品-整改清单中,新增按照任意时段和区县进行统计的功能

---
 src/components/search-option/FYOptionTime.vue |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/src/components/search-option/FYOptionTime.vue b/src/components/search-option/FYOptionTime.vue
index 9008260..e1fa691 100644
--- a/src/components/search-option/FYOptionTime.vue
+++ b/src/components/search-option/FYOptionTime.vue
@@ -58,7 +58,20 @@
   },
   mounted() {
     if (this.initValue) {
-      this.date = new Date();
+      switch (this.type) {
+        case RANGE:
+        case RANGE2:
+          this.date = [dayjs().startOf('month').toDate(), dayjs().toDate()];
+          break;
+        case MONTH:
+          this.date = dayjs().startOf('month').toDate();
+          break;
+        case DATE:
+          this.date = dayjs().toDate();
+          break;
+        default:
+          break;
+      }
       this.handleChange(this.date);
     }
   }

--
Gitblit v1.9.3