feat(platform): surface overview consistency

This commit is contained in:
lingniu
2026-07-04 04:06:54 +08:00
parent db70f58a7c
commit 7b801b6f71
9 changed files with 83 additions and 24 deletions

View File

@@ -11,7 +11,7 @@ import {
} from '@douyinfe/semi-icons';
import type { ReactNode } from 'react';
import { useState } from 'react';
import type { VehicleServiceStatus } from '../api/types';
import type { VehicleSourceConsistency, VehicleServiceStatus } from '../api/types';
export type PageKey = 'dashboard' | 'vehicles' | 'realtime' | 'detail' | 'history' | 'mileage' | 'quality';
@@ -37,6 +37,7 @@ export function AppShell({
linkIssueCount,
currentVehicleStatus,
currentVehicleLabel,
currentVehicleConsistency,
onChange,
onVehicleSearch,
children
@@ -45,6 +46,7 @@ export function AppShell({
linkIssueCount: number | null;
currentVehicleStatus?: VehicleServiceStatus;
currentVehicleLabel?: string;
currentVehicleConsistency?: VehicleSourceConsistency;
onChange: (page: PageKey) => void;
onVehicleSearch: (keyword: string) => void | Promise<void>;
children: ReactNode;
@@ -97,6 +99,11 @@ export function AppShell({
{currentVehicleStatus.title}
</Tag>
) : null}
{currentVehicleConsistency ? (
<Tag color={currentVehicleConsistency.onlineSourceCount === currentVehicleConsistency.sourceCount ? 'green' : 'orange'}>
{currentVehicleConsistency.onlineSourceCount}/{currentVehicleConsistency.sourceCount}
</Tag>
) : null}
<Tag color="blue"></Tag>
<Tag color="grey"> / </Tag>
<Button size="small" className={linkHealthClassName(linkIssueCount)} onClick={() => onChange('quality')}>