From 39c8b288ec8294e026459dfb1955f0bbc49ebb52 Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期一, 19 十月 2026 11:10:40 +0800
Subject: [PATCH] 测试完成
---
src/views/Satisfaction/sfstatistics/components/SatisfactionStatistics.vue | 56 +++++++++++++++++++++++++++++++++++---------------------
1 files changed, 35 insertions(+), 21 deletions(-)
diff --git a/src/views/Satisfaction/sfstatistics/components/SatisfactionStatistics.vue b/src/views/Satisfaction/sfstatistics/components/SatisfactionStatistics.vue
index 3ff1958..5646d6b 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" />
@@ -104,13 +106,13 @@
<h3 class="chart-title">{{ getChartTitle() }}</h3>
<div class="statistic-info">
<div class="statistic-item">
- <span class="statistic-label">鍙戦�侀棶鍗锋�婚噺锛�</span>
+ <span class="statistic-label">鍙戦�侀鐩�婚噺锛�</span>
<span class="statistic-value">{{
totalSendCount.toLocaleString()
}}</span>
</div>
<div class="statistic-item">
- <span class="statistic-label">鍥炴敹闂嵎鎬婚噺锛�</span>
+ <span class="statistic-label">鍥炴敹棰樼洰鎬婚噺锛�</span>
<span class="statistic-value">{{
totalReceiveCount.toLocaleString()
}}</span>
@@ -139,6 +141,8 @@
<div
id="satisfactionBarChart"
+ v-loading="loading"
+ element-loading-text="缁熻鍔犺浇涓�..."
style="width: 100%; height: 400px"
></div>
</div>
@@ -290,7 +294,7 @@
</el-table>
<!-- 缁煎悎寰楀垎琛� -->
- <div class="summary-row">
+ <!-- <div class="summary-row">
<div class="summary-content">
<div class="summary-item">
<span class="label">鎬荤瓟棰樹汉鏁帮細</span>
@@ -303,7 +307,7 @@
}}</span>
</div>
</div>
- </div>
+ </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,
};
});
@@ -2067,7 +2081,7 @@
const num = parseFloat(value);
if (isNaN(num)) return "-";
// 濡傛灉鍊煎皬浜�1锛岃涓烘槸灏忔暟姣斾緥锛岄渶瑕佷箻浠�100
- const percentValue = num < 1 ? num * 100 : num;
+ const percentValue = num <= 1 ? num * 100 : num;
return `${percentValue.toFixed(2)}%`;
},
--
Gitblit v1.9.3