feat(platform): align quality issues with vehicle service

This commit is contained in:
lingniu
2026-07-04 04:38:09 +08:00
parent 669390e8bb
commit 7ed5d7620b
4 changed files with 138 additions and 5 deletions

View 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;
}