You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

23 lines
860 B

// 芯片方案厂商分组,对应后端 DBSolutionProvider.vendor(proto 的 SolutionVendor 枚举)。
// 一个芯片厂商下可能有多套方案,每套方案是一条方案商记录,靠这个分组归拢。
// 新增芯片厂商要三处同步补同一个数值:
// apps/proto/db.proto 的 SolutionVendor
// apps/services/modules/console/api_device.go 的 chipVendorNames
// 本文件的 CHIP_VENDORS
export interface ChipVendor {
value: number
label: string
}
export const CHIP_VENDORS: ChipVendor[] = [
{ value: 1, label: '杰里' },
{ value: 2, label: '蓝汛' },
{ value: 3, label: '恒玄' },
{ value: 4, label: '博通' },
]
export function chipVendorName(v?: number | null): string {
const n = Number(v || 0)
if (!n) return '未分组'
return CHIP_VENDORS.find((x) => x.value === n)?.label ?? ('厂商#' + n)
}