From b57eac8a2962546ab20f21cfdd76d57628d57221 Mon Sep 17 00:00:00 2001 From: wikiboss Date: Wed, 28 Oct 2026 17:32:32 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=90=8C=E6=AD=A5=E9=A2=84=E6=B5=8B?= =?UTF-8?q?=E5=9B=BE=E8=A1=A8=E4=BA=A7=E7=89=A9=E4=B8=8E=E6=8C=87=E6=A0=87?= =?UTF-8?q?=E5=81=8F=E5=A5=BD=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data.sql | 2 +- public/screen/js/grain_monitor_core.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data.sql b/data.sql index 4d56d67..b6f03fa 100644 --- a/data.sql +++ b/data.sql @@ -904,4 +904,4 @@ UNLOCK TABLES; -- Dump completed on 2024-11-24 22:58:20 -- Persist per-indicator warning direction after seed inserts. -ALTER TABLE `fa_testing_params` ADD COLUMN `direction` varchar(5) DEFAULT NULL COMMENT '预警方向:upper高值预警、lower低值预警'; +ALTER TABLE `fa_testing_params` ADD COLUMN `direction` varchar(5) DEFAULT NULL COMMENT '指标偏好:upper越小越好(高值预警)、lower越大越好(低值预警)'; diff --git a/public/screen/js/grain_monitor_core.js b/public/screen/js/grain_monitor_core.js index 1c43e6a..4db298c 100644 --- a/public/screen/js/grain_monitor_core.js +++ b/public/screen/js/grain_monitor_core.js @@ -1379,7 +1379,7 @@ export function buildForecastCompareChartOption(grainType, currentItems = [], fu const delta = current !== null && future !== null ? Number((future - current).toFixed(2)) : null; return {...f, current, future, unit, scale, delta}; }); - const datum = (r, value) => ({value: value === null ? null : value / r.scale * 100, rawValue: value, unit: r.unit}); + const datum = (r, value) => ({value: value === null ? 0 : value / r.scale * 100, rawValue: value, unit: r.unit}); return { animationDuration: 350, aria: {enabled: true, description: '每个指标独立对比当前实测与未来预测,柱长仅可在同一指标内比较。'}, tooltip: {...forecastTooltip, axisPointer: {type: 'shadow', shadowStyle: {color: '#94adc808'}}, formatter: params => {