feat(platform): align quality issues with vehicle service
This commit is contained in:
28
vehicle-data-platform/apps/web/src/domain/qualityIssue.ts
Normal file
28
vehicle-data-platform/apps/web/src/domain/qualityIssue.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
const issueLabels: Record<string, string> = {
|
||||
NO_SOURCE: '暂无数据来源',
|
||||
VIN_MISSING: 'VIN 缺失',
|
||||
LINK_GAP: '链路间断',
|
||||
FIELD_MISSING: '字段缺失'
|
||||
};
|
||||
|
||||
const protocolLabels: Record<string, string> = {
|
||||
VEHICLE_SERVICE: '车辆服务',
|
||||
GB32960: 'GB32960',
|
||||
JT808: 'JT808',
|
||||
YUTONG_MQTT: '宇通 MQTT'
|
||||
};
|
||||
|
||||
export const qualityProtocolOptions = [
|
||||
{ value: 'VEHICLE_SERVICE', label: protocolLabels.VEHICLE_SERVICE },
|
||||
{ value: 'GB32960', label: protocolLabels.GB32960 },
|
||||
{ value: 'JT808', label: protocolLabels.JT808 },
|
||||
{ value: 'YUTONG_MQTT', label: protocolLabels.YUTONG_MQTT }
|
||||
];
|
||||
|
||||
export function qualityIssueLabel(issueType: string) {
|
||||
return issueLabels[issueType] ?? issueType;
|
||||
}
|
||||
|
||||
export function qualityProtocolLabel(protocol: string) {
|
||||
return protocolLabels[protocol] ?? protocol;
|
||||
}
|
||||
Reference in New Issue
Block a user