修复釜山 AMOS 数据获取 + 跑道面板容错

AMOS 页面用 JS 切换机场,GET 参数无效。新增策略:
- 先 GET 建立 session,再 POST form data 切换机场
- 尝试多种 form data 组合(icao/stn/airport/code)
- 回退到 GET 参数尝试

跑道面板容错:
- 无温度数据时仍展示跑道风/能见度/RVR
- 温度缺失显示 "--" 而非隐藏整行
- analysis_service 输出条件放宽:有 temp_c 或 runway_obs 即可

Tested: python -m ruff check ., npx tsc --noEmit
This commit is contained in:
2569718930@qq.com
2026-05-10 18:39:37 +08:00
parent 13a67cdc85
commit e23a90a961
3 changed files with 78 additions and 42 deletions
@@ -24,9 +24,14 @@ export function AmosRunwayPanel({
const runwayVis = amos.runway_obs?.visibility_mor;
const runwayRvr = amos.runway_obs?.rvr;
if (!runwayPairs || !runwayTemps || runwayPairs.length === 0) return null;
if (!runwayPairs || runwayPairs.length === 0) return null;
const pairs = runwayPairs.slice(0, runwayTemps.length);
const maxItems = Math.max(
runwayPairs.length,
runwayTemps?.length || 0,
runwayWinds?.length || 0,
);
const pairs = runwayPairs.slice(0, maxItems);
return (
<div className="scan-amos-runway-panel">
@@ -49,17 +54,15 @@ export function AmosRunwayPanel({
<div className="scan-amos-runway-label">
{rwyA}/{rwyB}
</div>
{temps ? (
<div className={`scan-amos-runway-temp ${runwayTempClass(temps[0])}`}>
{temps[0].toFixed(1)}{tempSymbol}
{temps[1] != null ? (
<small>
{isEn ? " Dew " : " 露点 "}
{temps[1].toFixed(1)}{tempSymbol}
</small>
) : null}
</div>
) : null}
<div className={`scan-amos-runway-temp ${runwayTempClass(temps?.[0])}`}>
{temps?.[0] != null ? `${temps[0].toFixed(1)}${tempSymbol}` : "--"}
{temps?.[1] != null ? (
<small>
{isEn ? " Dew " : " 露点 "}
{temps[1].toFixed(1)}{tempSymbol}
</small>
) : null}
</div>
{vis != null && vis > 0 ? (
<div className="scan-amos-runway-detail">
{isEn ? "Vis " : "能见度 "}