From e298b10fb8afa74632bcd9fe2fdc266420e5ff99 Mon Sep 17 00:00:00 2001
From: wujingjing <gersonwu@qq.com>
Date: 星期二, 31 十二月 2024 15:20:15 +0800
Subject: [PATCH] Merge branch 'test' of http://47.103.154.90:83/r/WI/Web.V1.0 into test

---
 src/components/chat/chatComponents/summaryCom/components/recordSet/RecordSet.vue |   23 +++++++++++++++--------
 1 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/src/components/chat/chatComponents/summaryCom/components/recordSet/RecordSet.vue b/src/components/chat/chatComponents/summaryCom/components/recordSet/RecordSet.vue
index b84b1d2..600051f 100644
--- a/src/components/chat/chatComponents/summaryCom/components/recordSet/RecordSet.vue
+++ b/src/components/chat/chatComponents/summaryCom/components/recordSet/RecordSet.vue
@@ -280,12 +280,12 @@
 			  }
 			: axisLabelFormatter;
 
-	const tooltipValueFormatter =
-		originChartType === ChartTypeEnum.Score
-			? (value) => {
-					return scoreMap[value];
-			  }
-			: undefined;
+
+	
+	const tooltipValueFormatter = (value) => {
+		const realValue = originChartType === ChartTypeEnum.Score ? scoreMap[value] : value;
+		return realValue + (props.data.unit ? ` ${props.data.unit}` : '');
+	};
 
 	const scoreYAxisOption: echarts.YAXisComponentOption = {
 		min: 0,
@@ -356,7 +356,8 @@
 				name: timeCol?.title,
 			},
 			yAxis: {
-				name: valueCol?.title,
+				name: props.data.unit ? `${props.data.unit}` : valueCol?.title,
+
 				/** @description 涓嶅己鍒朵繚鐣� */
 				scale: true,
 				...(originChartType === ChartTypeEnum.Score ? scoreYAxisOption : {}),
@@ -694,8 +695,14 @@
 		.toSorted((b, a) => {
 			return b[0].localeCompare(a[0]);
 		});
+	const getColName = (name) => {
+		if (props.data.unit) {
+			return `${name}锛�${props.data.unit}锛塦;
+		}
+		return name;
+	}
 	const cols = currentSeries.value.map((item, index) => ({
-		title: item.name ?? `鍊�${index + 1}`,
+		title: getColName(item.name ?? `鍊�${index + 1}`),
 		type: 'text',
 	}));
 

--
Gitblit v1.9.3