From c899dff1fce7f8054008cd9887a9729cdffd88cb Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期四, 19 十一月 2026 11:34:32 +0800
Subject: [PATCH] 测试完成

---
 src/views/followvisit/zysatisfaction/index.vue |   46 +++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 39 insertions(+), 7 deletions(-)

diff --git a/src/views/followvisit/zysatisfaction/index.vue b/src/views/followvisit/zysatisfaction/index.vue
index 3edb9ba..54ea141 100644
--- a/src/views/followvisit/zysatisfaction/index.vue
+++ b/src/views/followvisit/zysatisfaction/index.vue
@@ -87,6 +87,7 @@
             clearable
             placeholder="璇烽�夋嫨鐐逛綅"
             style="width: 240px"
+            @change="handlePointLocationChange"
           >
             <el-option
               v-for="item in pointOptions"
@@ -1249,6 +1250,8 @@
       checkboxlist: [],
       // 鐐逛綅鍒楄〃锛堝悓寰烽櫌鍖猴紝deptType=3锛�
       pointOptions: [],
+      // 鐐逛綅閫夋嫨鍘嗗彶鍊硷紙鐢ㄤ簬鈥滃叏閮�/鍏蜂綋鐐逛綅鈥濅簰鏂ュ垽鏂級
+      pointPrevLocations: [],
       // 琛ㄥ崟鏍¢獙
       rules: {},
     };
@@ -1426,8 +1429,30 @@
           });
         };
         walk(response && response.data);
-        this.pointOptions = flat;
+        this.pointOptions = [{ label: "鍏ㄩ儴", value: "all" }, ...flat];
+        // 杩涘叆椤甸潰榛樿鏌ヨ鍏ㄩ儴鐐逛綅
+        this.topqueryParams.pointLocations = ["all"];
+        this.pointPrevLocations = ["all"];
+        if (!this.errtype) {
+          this.getList(1);
+        }
       });
+    },
+    // 鐐逛綅閫夋嫨锛氬叏閮ㄤ笌鍏蜂綋鐐逛綅浜掓枼
+    handlePointLocationChange(val) {
+      const all = "all";
+      const hasAll = val.includes(all);
+      if (hasAll && val.length > 1) {
+        const prev = this.pointPrevLocations || [];
+        if (prev.includes(all)) {
+          // 涔嬪墠宸查�夆�滃叏閮ㄢ�濓紝鏈鏂板鍏蜂綋鐐逛綅 鈫� 鍘绘帀鈥滃叏閮ㄢ��
+          this.topqueryParams.pointLocations = val.filter((v) => v !== all);
+        } else {
+          // 鏈鏂板鈥滃叏閮ㄢ�� 鈫� 鍙繚鐣欌�滃叏閮ㄢ��
+          this.topqueryParams.pointLocations = [all];
+        }
+      }
+      this.pointPrevLocations = [...this.topqueryParams.pointLocations];
     },
 
     // 鐐逛綅鍚嶇О锛氬皢 pointLocation 缂栫爜鏄犲皠涓虹偣浣嶅悕绉�
@@ -1627,10 +1652,15 @@
     // 鏋勯�犳煡璇�/瀵煎嚭鍙傛暟锛氶�夋嫨鐐逛綅鏃剁瀹�/鐥呭尯浼� null锛屽惁鍒欎繚鎸佸師鍊�
     buildQueryParams() {
       const params = { ...this.topqueryParams };
-      if (
-        this.topqueryParams.pointLocations &&
-        this.topqueryParams.pointLocations.length > 0
-      ) {
+      let locations = this.topqueryParams.pointLocations || [];
+      // 鈥滃叏閮ㄢ�濈偣浣嶏細灞曞紑涓烘墍鏈夊疄闄呯偣浣嶇紪鐮�
+      if (locations.includes("all")) {
+        locations = this.pointOptions
+          .filter((p) => p.value !== "all")
+          .map((p) => p.value);
+      }
+      params.pointLocations = locations;
+      if (locations.length > 0) {
         params.leaveldeptcodes = null;
         params.leavehospitaldistrictcodes = null;
       }
@@ -1671,8 +1701,9 @@
         scopetype: [],
         leaveldeptcodes: [],
         leavehospitaldistrictcodes: [],
-        pointLocations: [],
+        pointLocations: ["all"],
       };
+      this.pointPrevLocations = ["all"];
       this.handleQuery(1);
     },
     /** 閲嶇疆鎸夐挳鎿嶄綔 */
@@ -1693,8 +1724,9 @@
         scopetype: [],
         leaveldeptcodes: [],
         leavehospitaldistrictcodes: [],
-        pointLocations: [],
+        pointLocations: ["all"],
       };
+      this.pointPrevLocations = ["all"];
     },
     handleSelectionChange(rows) {
       this.selectedRows = rows.map((row) => {

--
Gitblit v1.9.3