feat(platform): surface overview consistency
This commit is contained in:
@@ -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')}>
|
||||
|
||||
Reference in New Issue
Block a user