修复图表时间轴不全与城市决策卡模型补齐卡顿

- 后端 Open-Meteo 请求加 past_days=1,小时数据从 00:00 开始
- 前端图表层填充完整 00:00-23:00 时间轴,缺失时段置空
- 城市深度分析门槛从 >1 降为 >=1,单模型城市不再被拦
- hydration 队列加最大重试 3 次,防止永久卡在等待模型补齐
- 移除右侧面板历史对账按钮
This commit is contained in:
2569718930@qq.com
2026-05-16 20:14:05 +08:00
parent b27bedbca3
commit 2e02133696
5 changed files with 37 additions and 38 deletions
+12 -4
View File
@@ -376,10 +376,18 @@ export function getTemperatureChartData(
value: Number(rawTemps[index]),
}))
.filter((entry) => entry.tail !== "");
const times = validEntries.map((entry) => entry.tail);
const temps = validEntries.map((entry) =>
Number.isFinite(entry.value) ? entry.value : null,
);
const dataByHour = new Map<string, number | null>();
validEntries.forEach((entry) => {
dataByHour.set(entry.tail, Number.isFinite(entry.value) ? entry.value : null);
});
const times: string[] = [];
const temps: Array<number | null> = [];
for (let h = 0; h < 24; h++) {
const hh = String(h).padStart(2, "0");
const key = `${hh}:00`;
times.push(key);
temps.push(dataByHour.has(key) ? dataByHour.get(key)! : null);
}
const suppressAnkaraMgmObservation = isTurkishMgmCity(detail);
if (!times.length) return null;