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/Satisfaction/sfstatistics/components/SatisfactionStatistics.vue |   46 ++++++++++++++++++++++++++++++----------------
 1 files changed, 30 insertions(+), 16 deletions(-)

diff --git a/src/views/Satisfaction/sfstatistics/components/SatisfactionStatistics.vue b/src/views/Satisfaction/sfstatistics/components/SatisfactionStatistics.vue
index 3ff1958..9ec0011 100644
--- a/src/views/Satisfaction/sfstatistics/components/SatisfactionStatistics.vue
+++ b/src/views/Satisfaction/sfstatistics/components/SatisfactionStatistics.vue
@@ -16,6 +16,8 @@
               v-model="queryParams.type"
               placeholder="璇烽�夋嫨缁熻绫诲瀷"
               clearable
+            @change="handleSearch"
+
               style="width: 100%"
             >
               <el-option label="闂嵎绫诲瀷" :value="2" />
@@ -139,6 +141,8 @@
 
           <div
             id="satisfactionBarChart"
+            v-loading="loading"
+            element-loading-text="缁熻鍔犺浇涓�..."
             style="width: 100%; height: 400px"
           ></div>
         </div>
@@ -856,6 +860,12 @@
       }
       return this.wardList.map((ward) => ward.value);
     },
+
+    // 闂缁村害闆嗗悎锛氫粠 dimensionality_type 瀛楀吀鍙栫淮搴︾紪鐮侊紝鏌ョ淮搴︽椂蹇呬紶
+    dimensionList() {
+      const dict = this.dict && this.dict.type && this.dict.type.dimensionality_type;
+      return dict ? dict.map((d) => String(d.value)) : [];
+    },
   },
 
   mounted() {
@@ -976,6 +986,9 @@
         deptcodes: this.deptCodes, // 浣跨敤璁$畻灞炴��
         hospitaldistrictcodes: this.hospitalDistrictCodes, // 浣跨敤璁$畻灞炴��
         templateid: this.templateId,
+        questionType: this.queryParams.type || null,
+        serviceTypes: this.defaultServiceTypes,
+        dimensionList: this.dimensionList, // 闂缁村害闆嗗悎锛屾煡缁村害鏃跺繀浼�
       };
 
       const response = await satisfactionGraphDimension(params);
@@ -1151,14 +1164,14 @@
         return {
           scriptContent: item.scriptContent || "",
           scriptType: 1,
-          answerPerson: item.answerPerson || 0,
-          noAnswerPerson: item.noAnswerPerson || 0,
-          answerCount: item.answerPerson || 0,
-          averageScore: item.averageScore || 0,
-          maxScore: item.maxScore || 0,
-          minScore: item.minScore || 0,
-          answerRate: item.answerRate || 0,
-          totalCount: (item.answerPerson || 0) + (item.noAnswerPerson || 0),
+          answerPerson: Number(item.answerPerson) || 0,
+          noAnswerPerson: Number(item.noAnswerPerson) || 0,
+          answerCount: Number(item.answerPerson) || 0,
+          averageScore: Number(item.averageScore) || 0,
+          maxScore: Number(item.maxScore) || 0,
+          minScore: Number(item.minScore) || 0,
+          answerRate: Number(item.answerRate) || 0,
+          totalCount: (Number(item.answerPerson) || 0) + (Number(item.noAnswerPerson) || 0),
           options: options,
         };
       });
@@ -1187,6 +1200,7 @@
           templateid: this.templateId,
           questionType: this.queryParams.type || null,
           serviceTypes: this.defaultServiceTypes,
+          dimensionList: this.dimensionList, // 闂缁村害闆嗗悎锛屾煡缁村害鏃跺繀浼�
         };
 
         const response = await statisticsByDimension(params);
@@ -1236,14 +1250,14 @@
           dimension: item.dimension || "0", // 缁村害浠g爜
           dimensionName: this.getDimensionLabel(item.dimension || "0"), // 缁村害鍚嶇О
           scriptType: 1,
-          answerPerson: item.answerPerson || 0,
-          noAnswerPerson: item.noAnswerPerson || 0,
-          answerCount: item.answerPerson || 0,
-          averageScore: item.averageScore || 0,
-          maxScore: item.maxScore || 0,
-          minScore: item.minScore || 0,
-          answerRate: item.answerRate || 0,
-          totalCount: (item.answerPerson || 0) + (item.noAnswerPerson || 0),
+          answerPerson: Number(item.answerPerson) || 0,
+          noAnswerPerson: Number(item.noAnswerPerson) || 0,
+          answerCount: Number(item.answerPerson) || 0,
+          averageScore: Number(item.averageScore) || 0,
+          maxScore: Number(item.maxScore) || 0,
+          minScore: Number(item.minScore) || 0,
+          answerRate: Number(item.answerRate) || 0,
+          totalCount: (Number(item.answerPerson) || 0) + (Number(item.noAnswerPerson) || 0),
           options: options,
         };
       });

--
Gitblit v1.9.3