feat: Implement core PolyWeather application with city weather query service, trend analysis, data collection, and dashboard UI.

This commit is contained in:
2569718930@qq.com
2026-03-11 10:49:35 +08:00
parent d2a40462c5
commit 1958b2764b
17 changed files with 24 additions and 279 deletions
@@ -552,18 +552,8 @@ export function ModelForecast({
}) {
const { locale, t } = useI18n();
const view = getModelView(detail, targetDate);
const fallbackMeteoblue = detail.source_forecasts?.meteoblue?.today_high;
const modelsMap = { ...view.models };
// 强行插入 Meteoblue,防止 helper 函数或日期对齐导致其被剔除
if (
modelsMap["Meteoblue"] == null &&
fallbackMeteoblue != null &&
(!targetDate || targetDate === detail.local_date)
) {
modelsMap["Meteoblue"] = fallbackMeteoblue;
}
const modelEntries = Object.entries(modelsMap).filter(
([, value]) =>
value !== null && value !== undefined && Number.isFinite(Number(value)),
@@ -591,12 +581,6 @@ export function ModelForecast({
? Math.max(...comparisonValues) + 1
: 1;
const range = Math.max(maxValue - minValue, 1);
const getModelDisplayName = (name: string) => {
if (String(name).trim().toLowerCase() === "meteoblue") {
return "Meteoblue";
}
return name;
};
return (
<section className="models-section">
@@ -615,7 +599,7 @@ export function ModelForecast({
return (
<div key={name} className="model-row">
<div className="model-name" title={name}>
{getModelDisplayName(name)}
{name}
</div>
<div className="model-bar-track">
<div