From 0647fd26414fc8a3ab077d355f50da6e3e36ad63 Mon Sep 17 00:00:00 2001
From: wujingjing <gersonwu@qq.com>
Date: 星期三, 15 一月 2025 17:40:57 +0800
Subject: [PATCH] 实现原本功能

---
 src/components/chat/chatComponents/summaryCom/components/recordSet/RecordSet.vue |   28 +++++++++++++++++++---------
 1 files changed, 19 insertions(+), 9 deletions(-)

diff --git a/src/components/chat/chatComponents/summaryCom/components/recordSet/RecordSet.vue b/src/components/chat/chatComponents/summaryCom/components/recordSet/RecordSet.vue
index 23bd8e5..2f082a3 100644
--- a/src/components/chat/chatComponents/summaryCom/components/recordSet/RecordSet.vue
+++ b/src/components/chat/chatComponents/summaryCom/components/recordSet/RecordSet.vue
@@ -100,9 +100,9 @@
 		type: String,
 		required: false,
 	},
-	tableHeight:{
-		type:Number,
-		default:document.body.clientHeight * 0.7,
+	tableHeight: {
+		type: Number,
+		default: document.body.clientHeight * 0.7,
 	},
 	showFilter: {
 		type: Boolean,
@@ -112,7 +112,7 @@
 		type: Boolean,
 		default: false,
 	},
-	reportIndex:{
+	reportIndex: {
 		type: Number,
 		default: 0,
 	},
@@ -136,7 +136,7 @@
 const getVisibleParams = (data) => {
 	// const visibleList = props.data?.params?.filter((item) => !item?.hide) ?? [];
 	// index 浣滀负 id
-	const dataFilter =  data?.filter ?? [];
+	const dataFilter = data?.filter ?? [];
 	const visibleList = (data?.filter ?? []).map((item, index) => {
 		// 涓嶄慨鏀瑰師濮嬪湴鍧�
 		item.id = index + '';
@@ -284,8 +284,6 @@
 			  }
 			: axisLabelFormatter;
 
-
-	
 	const tooltipValueFormatter = (value) => {
 		const realValue = originChartType === ChartTypeEnum.Score ? scoreMap[value] : value;
 		return realValue + (props.data.unit ? ` ${props.data.unit}` : '');
@@ -704,7 +702,7 @@
 			return `${name}锛�${props.data.unit}锛塦;
 		}
 		return name;
-	}
+	};
 	const cols = currentSeries.value.map((item, index) => ({
 		title: getColName(item.name ?? `鍊�${index + 1}`),
 		type: 'text',
@@ -767,13 +765,25 @@
 	updateCurrent(summary?.[props.summaryIndex], true);
 };
 
+const clearChart = () => {
+	chartInstance.value.setOption(
+		{
+			title: {
+				text: '',
+			},
+			series: [],
+		},
+		true
+	);
+};
+
 defineExpose({
 	drawChart,
 	isMultiCompare,
 	handleMultiCompare,
 	handleData,
 	updateAll,
-
+	clearChart,
 	updateIndexSummary,
 });
 </script>

--
Gitblit v1.9.3