d94476f943
P0-1 术语统一: - WeatherDecisionBand 改用"上修/下修/维持"替代"偏高温/暂不追/等待确认" - 与 AI 后端提示词使用的术语体系一致 P0-9 图表"现在"标记: - chart-utils.ts 导出 currentIndex - AiCityTemperatureChart 在 currentIndex 处绘制竖线(蓝色虚线) P0-13 专业术语解释: - DataFreshnessBar 新增 labelTitle 属性(hover tooltip) - METAR → "机场气象观测报文" / "Meteorological Aerodrome Report" - HKO → "香港天文台官方实测" / "Hong Kong Observatory official readings" P0-16 异常行动建议: - primaryReason 追加行动指引(实测突破→建议关注偏高温区间等待确认 / 峰值已过→建议避免追高 / 观测过旧→建议等待新报文) P1-8 DEB 路径分段样式: - 过去部分实线(已确定),未来部分虚线(预测不确定) P1-11 HistoryChart 单位: - tooltip 使用 temp_symbol 替代硬编码 ° Tested: npx tsc --noEmit
41 lines
1.0 KiB
TypeScript
41 lines
1.0 KiB
TypeScript
"use client";
|
|
|
|
import type { StatusTone } from "@/components/dashboard/scan-terminal/CityStatusTags";
|
|
|
|
export type DataFreshnessRow = {
|
|
label: string;
|
|
labelTitle?: string;
|
|
value: string;
|
|
tone: string;
|
|
};
|
|
|
|
export function DataFreshnessBar({
|
|
aiStatusLabel,
|
|
aiStatusTone,
|
|
freshnessSeparator,
|
|
isEn,
|
|
rows,
|
|
}: {
|
|
aiStatusLabel: string;
|
|
aiStatusTone: StatusTone;
|
|
freshnessSeparator: string;
|
|
isEn: boolean;
|
|
rows: DataFreshnessRow[];
|
|
}) {
|
|
return (
|
|
<div className="scan-ai-city-freshness" aria-label={isEn ? "Data freshness" : "数据新鲜度"}>
|
|
<strong>{isEn ? "Data freshness" : "数据新鲜度"}</strong>
|
|
{rows.map((freshness) => (
|
|
<span key={freshness.label} className={freshness.tone}>
|
|
<b title={freshness.labelTitle}>{freshness.label}{freshnessSeparator}</b>
|
|
<em>{freshness.value}</em>
|
|
</span>
|
|
))}
|
|
<span className={aiStatusTone}>
|
|
<b>AI{freshnessSeparator}</b>
|
|
<em>{aiStatusLabel}</em>
|
|
</span>
|
|
</div>
|
|
);
|
|
}
|