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/mzsatisfaction/index.vue | 43 +++++++++++++++++++++++++++++++++++++------
1 files changed, 37 insertions(+), 6 deletions(-)
diff --git a/src/views/followvisit/mzsatisfaction/index.vue b/src/views/followvisit/mzsatisfaction/index.vue
index 9f49f34..75813ce 100644
--- a/src/views/followvisit/mzsatisfaction/index.vue
+++ b/src/views/followvisit/mzsatisfaction/index.vue
@@ -64,6 +64,7 @@
clearable
placeholder="璇烽�夋嫨鐐逛綅"
style="width: 240px"
+ @change="handlePointLocationChange"
>
<el-option
v-for="item in pointOptions"
@@ -1253,6 +1254,8 @@
checkboxlist: [],
// 鐐逛綅鍒楄〃锛堝悓寰烽櫌鍖猴紝deptType=3锛�
pointOptions: [],
+ // 鐐逛綅閫夋嫨鍘嗗彶鍊硷紙鐢ㄤ簬鈥滃叏閮�/鍏蜂綋鐐逛綅鈥濅簰鏂ュ垽鏂級
+ pointPrevLocations: [],
// 琛ㄥ崟鏍¢獙
rules: {},
};
@@ -1405,8 +1408,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 缂栫爜鏄犲皠涓虹偣浣嶅悕绉�
@@ -1586,10 +1611,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;
}
@@ -1631,8 +1661,9 @@
scopetype: [],
leaveldeptcodes: [],
leavehospitaldistrictcodes: [],
- pointLocations: [],
+ pointLocations: ["all"],
};
+ this.pointPrevLocations = ["all"];
this.handleQuery(1);
},
handleSelectionChange(rows) {
--
Gitblit v1.9.3