From a9d2b856e0f6be6475319c2dc36bf405c2f908fc Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期二, 22 九月 2026 14:04:52 +0800
Subject: [PATCH] 测试完成

---
 src/views/sfstatistics/percentage/index.vue |   35 +++++++++++++++++++++++++++++------
 1 files changed, 29 insertions(+), 6 deletions(-)

diff --git a/src/views/sfstatistics/percentage/index.vue b/src/views/sfstatistics/percentage/index.vue
index b6cb27c..39b83e2 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"
@@ -57,8 +58,7 @@
 
         <el-form-item label="鏈嶅姟绫诲瀷" prop="userName">
           <el-select
-            v-model="queryParams.serviceType"
-            multiple
+            v-model="serviceTypeSingle"
             placeholder="璇烽�夋嫨"
           >
             <el-option
@@ -254,8 +254,8 @@
       options: this.$store.getters.tasktypes,
       queryParams: {
         serviceType: [2],
-        dateRange: this.getLastMonthRange(),
-        dateRangecy: [],
+        dateRange: [],
+        dateRangecy: this.getLastMonthRange(),
         statisticaltype:
           localStorage.getItem("orgname") == "缂欎簯鍘夸汉姘戝尰闄�" ||
           localStorage.getItem("orgname") == "鏅畞鐣叉棌鑷不鍘夸汉姘戝尰闄�"
@@ -317,6 +317,18 @@
         pageSize: 10,
       },
     };
+  },
+  computed: {
+    // 鏈嶅姟绫诲瀷鍗曢�夛細UI 缁戝畾鍗曞�硷紝鍐呴儴浠嶄互鏁扮粍褰㈠紡浼犵粰鍚庣
+    serviceTypeSingle: {
+      get() {
+        const st = this.queryParams.serviceType;
+        return Array.isArray(st) ? st[0] : st;
+      },
+      set(val) {
+        this.queryParams.serviceType = val == null || val === "" ? [] : [val];
+      },
+    },
   },
   created() {
     this.getDeptTree();
@@ -395,6 +407,9 @@
     },
 
     handleQuery() {
+      if (!this.queryParams.dateRange) this.queryParams.dateRange = [];
+      if (!this.queryParams.dateRangecy) this.queryParams.dateRangecy = [];
+
       this.queryParams.startTime = this.parseTime(
         this.queryParams.dateRange[0]
       );
@@ -475,8 +490,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) => {
@@ -512,6 +533,8 @@
 
     SeedetailsgGo(row) {
       this.SeedetailsVisible = false;
+      this.infotitleVisible = false;
+
       let type = "";
       if (row.preachformson && row.preachformson.includes("3")) {
         type = 1;

--
Gitblit v1.9.3