From 51461f369f0b0ad1da96346afee5637302f1525b Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期二, 18 八月 2026 16:38:47 +0800
Subject: [PATCH] 提交

---
 src/views/sfstatistics/percentage/index.vue |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/src/views/sfstatistics/percentage/index.vue b/src/views/sfstatistics/percentage/index.vue
index b6cb27c..d6254f3 100644
--- a/src/views/sfstatistics/percentage/index.vue
+++ b/src/views/sfstatistics/percentage/index.vue
@@ -14,6 +14,7 @@
           <el-select
             v-model="queryParams.statisticaltype"
             placeholder="璇烽�夋嫨缁熻绫诲瀷"
+            @change="handleQuery"
           >
             <el-option
               v-for="item in Statisticallist"
@@ -254,8 +255,8 @@
       options: this.$store.getters.tasktypes,
       queryParams: {
         serviceType: [2],
-        dateRange: this.getLastMonthRange(),
-        dateRangecy: [],
+        dateRange: [],
+        dateRangecy: this.getLastMonthRange(),
         statisticaltype:
           localStorage.getItem("orgname") == "缂欎簯鍘夸汉姘戝尰闄�" ||
           localStorage.getItem("orgname") == "鏅畞鐣叉棌鑷不鍘夸汉姘戝尰闄�"
@@ -395,6 +396,8 @@
     },
 
     handleQuery() {
+      if (!this.queryParams.dateRange) this.queryParams.dateRange = [];
+      if (!this.queryParams.dateRangecy) this.queryParams.dateRange = [];
       this.queryParams.startTime = this.parseTime(
         this.queryParams.dateRange[0]
       );
@@ -475,8 +478,14 @@
         obj.deptcodes = [row.deptcode];
         obj.leavehospitaldistrictcodes = [];
       }
-      obj.endTime = this.queryParams.endTime;
-      obj.startTime = this.queryParams.startTime;
+      if (this.queryParams.endTime) {
+        obj.endTime = this.queryParams.endTime;
+        obj.startTime = this.queryParams.startTime;
+      } else {
+        obj.startTime = this.parseTime(this.queryParams.dateRange[0]);
+        obj.endTime = this.parseTime(this.queryParams.dateRange[1]);
+      }
+
       obj.statisticaltype = this.queryParams.statisticaltype;
 
       getSfStatisticsHyperlink(obj).then((response) => {

--
Gitblit v1.9.3