50 lines
1.4 KiB
TypeScript
50 lines
1.4 KiB
TypeScript
/** 规范字段(英文)→ 中文标签。用于详情页"原始数据"等处把英文键映射为中文。*/
|
|
export const FIELD_LABELS: Record<string, string> = {
|
|
model_code: '型号',
|
|
series: '系列',
|
|
full_name: '车型全称',
|
|
aliases: '别名',
|
|
manufacturer: '生产商',
|
|
country: '制造国/地区',
|
|
country_type: '国别属性',
|
|
first_year: '首产年',
|
|
last_year: '停产年',
|
|
status: '状态',
|
|
usage: '用途',
|
|
production_count: '产量',
|
|
axle_arrangement: '轴列式',
|
|
drive: '传动/供电方式',
|
|
efficiency: '传动效率',
|
|
length: '车长',
|
|
width: '车宽',
|
|
height: '车高',
|
|
wheelbase: '轴距',
|
|
weight: '整备重量',
|
|
axle_load: '轴重',
|
|
load: '载重',
|
|
tractive_start: '起动牵引力',
|
|
tractive_cont: '持续牵引力',
|
|
power_kw: '功率',
|
|
max_speed: '最高时速',
|
|
capacity: '容积',
|
|
car_number: '车号',
|
|
function: '功能',
|
|
depot: '配属',
|
|
livery: '涂装',
|
|
side_mark: '侧标',
|
|
note: '备注',
|
|
location: '存放位置',
|
|
formation: '编组(动力车/拖车)',
|
|
predecessor: '前身',
|
|
lifespan: '使用寿命',
|
|
tour_name: '旅游列车名称',
|
|
tractor_models: '牵引机车常用型号',
|
|
bogie: '转向架型号',
|
|
coupler: '车钩类型',
|
|
};
|
|
|
|
/** 把字段键映射为中文;已是中文或未知则原样返回。*/
|
|
export function labelOf(key: string): string {
|
|
return FIELD_LABELS[key] ?? key;
|
|
}
|