From c6955011f393ff1c0fc36ce17cbd9d800d04640b Mon Sep 17 00:00:00 2001 From: liuyunqin Date: Thu, 4 Jun 2026 14:20:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=E8=B6=8B=E5=8A=BF?= =?UTF-8?q?=E5=9B=BETooltip=E6=98=BE=E7=A4=BA=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 空气质量指数: 仅显示对应等级名称(带颜色圆点) - 其他指标: 显示数值+单位 --- .../environment/device-detail.html | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/employee-app/health-monitor/environment/device-detail.html b/employee-app/health-monitor/environment/device-detail.html index b10a414..e66fe8e 100644 --- a/employee-app/health-monitor/environment/device-detail.html +++ b/employee-app/health-monitor/environment/device-detail.html @@ -578,14 +578,19 @@ function showTrendTip(e, el) { var val = td.points[idx]; var unit = td.unit || ''; var color = td.isAQI ? getAqiColor(val) : chartLine; - var levelHtml = td.isAQI ? ' ' + getAqiLevel(val) + '' : ''; document.getElementById('tooltipDate').textContent = dateStr; - document.getElementById('tooltipBody').innerHTML = - '
' + - '' + - '数值' + - '' + val + (unit ? ' ' + unit : '') + '' + - levelHtml + '
'; + if (td.isAQI) { + var level = getAqiLevel(val); + document.getElementById('tooltipBody').innerHTML = + '
' + + '' + + '' + level + '
'; + } else { + document.getElementById('tooltipBody').innerHTML = + '
' + + '数值' + + '' + val + (unit ? ' ' + unit : '') + '
'; + } showTooltip(el); }