fix: 所有里程数据添加 km 单位
实时监控:全屏表格、车辆卡片的今日/累计里程添加 km 统计报表:全屏表格、考核详情、侧滑面板的里程值添加 km 统一使用小写 km Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -366,7 +366,7 @@ export default function MonitoringView() {
|
|||||||
<div className="w-1.5 h-1.5 rounded-full bg-amber-400 animate-pulse"></div>
|
<div className="w-1.5 h-1.5 rounded-full bg-amber-400 animate-pulse"></div>
|
||||||
)}
|
)}
|
||||||
<span className={`text-sm font-mono font-bold ${v.isDataSynced ? 'text-blue-400' : 'text-amber-400'}`}>
|
<span className={`text-sm font-mono font-bold ${v.isDataSynced ? 'text-blue-400' : 'text-amber-400'}`}>
|
||||||
{v.dailyKm?.toLocaleString()}
|
{v.dailyKm?.toLocaleString()} <span className="text-[8px] text-slate-500 font-bold">km</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
{!v.isDataSynced && <span className="text-[8px] text-amber-500/50 font-bold">未对接</span>}
|
{!v.isDataSynced && <span className="text-[8px] text-amber-500/50 font-bold">未对接</span>}
|
||||||
@@ -375,7 +375,7 @@ export default function MonitoringView() {
|
|||||||
<td className="p-4 text-right">
|
<td className="p-4 text-right">
|
||||||
<div className="flex flex-col items-end">
|
<div className="flex flex-col items-end">
|
||||||
<span className={`text-sm font-mono font-bold ${v.isDataSynced ? 'text-slate-300' : 'text-amber-400/70'}`}>
|
<span className={`text-sm font-mono font-bold ${v.isDataSynced ? 'text-slate-300' : 'text-amber-400/70'}`}>
|
||||||
{v.totalKm?.toLocaleString()}
|
{v.totalKm?.toLocaleString()} <span className="text-[8px] text-slate-500 font-bold">km</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@@ -746,12 +746,12 @@ export default function MonitoringView() {
|
|||||||
<div className="w-2 h-2 rounded-full bg-amber-400 animate-pulse" title="未对接车机数据"></div>
|
<div className="w-2 h-2 rounded-full bg-amber-400 animate-pulse" title="未对接车机数据"></div>
|
||||||
)}
|
)}
|
||||||
<div className={`text-sm font-black leading-none ${v.isDataSynced ? 'text-blue-600' : 'text-amber-600'}`}>
|
<div className={`text-sm font-black leading-none ${v.isDataSynced ? 'text-blue-600' : 'text-amber-600'}`}>
|
||||||
{v.dailyKm?.toLocaleString()}
|
{v.dailyKm?.toLocaleString()} <span className="text-[8px] text-slate-400">km</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center gap-1">
|
<div className="flex items-center gap-1">
|
||||||
<span className="text-[8px] font-bold text-slate-300">
|
<span className="text-[8px] font-bold text-slate-300">
|
||||||
{v.totalKm?.toLocaleString()}
|
{v.totalKm?.toLocaleString()} km
|
||||||
</span>
|
</span>
|
||||||
{!v.isDataSynced && (
|
{!v.isDataSynced && (
|
||||||
<span className="text-[7px] font-bold text-amber-500/70 bg-amber-50 px-1 rounded">未同步</span>
|
<span className="text-[7px] font-bold text-amber-500/70 bg-amber-50 px-1 rounded">未同步</span>
|
||||||
|
|||||||
@@ -271,11 +271,11 @@ export default function StatisticsView() {
|
|||||||
</div>
|
</div>
|
||||||
<div className="space-y-0.5">
|
<div className="space-y-0.5">
|
||||||
<p className="text-[8px] font-bold text-slate-400 uppercase tracking-wider">总考核里程</p>
|
<p className="text-[8px] font-bold text-slate-400 uppercase tracking-wider">总考核里程</p>
|
||||||
<p className="text-[10px] font-black text-slate-700 landscape:text-slate-300">{fmtKm(target.totalMileagePerVehicle * target.vehicleCount)} KM</p>
|
<p className="text-[10px] font-black text-slate-700 landscape:text-slate-300">{fmtKm(target.totalMileagePerVehicle * target.vehicleCount)} km</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="space-y-0.5">
|
<div className="space-y-0.5">
|
||||||
<p className="text-[8px] font-bold text-slate-400 uppercase tracking-wider">年考核任务/辆</p>
|
<p className="text-[8px] font-bold text-slate-400 uppercase tracking-wider">年考核任务/辆</p>
|
||||||
<p className="text-[10px] font-black text-slate-700 landscape:text-slate-300">{fmtKm(target.annualMileagePerVehicle)} KM</p>
|
<p className="text-[10px] font-black text-slate-700 landscape:text-slate-300">{fmtKm(target.annualMileagePerVehicle)} km</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="space-y-0.5">
|
<div className="space-y-0.5">
|
||||||
<p className="text-[8px] font-bold text-slate-400 uppercase tracking-wider">50%达标数</p>
|
<p className="text-[8px] font-bold text-slate-400 uppercase tracking-wider">50%达标数</p>
|
||||||
@@ -283,19 +283,19 @@ export default function StatisticsView() {
|
|||||||
</div>
|
</div>
|
||||||
<div className="space-y-0.5">
|
<div className="space-y-0.5">
|
||||||
<p className="text-[8px] font-bold text-slate-400 uppercase tracking-wider">本年需完成</p>
|
<p className="text-[8px] font-bold text-slate-400 uppercase tracking-wider">本年需完成</p>
|
||||||
<p className="text-[10px] font-black text-slate-700 landscape:text-slate-300">{fmtKm(target.currentYearTarget)} KM</p>
|
<p className="text-[10px] font-black text-slate-700 landscape:text-slate-300">{fmtKm(target.currentYearTarget)} km</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="space-y-0.5">
|
<div className="space-y-0.5">
|
||||||
<p className="text-[8px] font-bold text-slate-400 uppercase tracking-wider">已完成(截止3.31)</p>
|
<p className="text-[8px] font-bold text-slate-400 uppercase tracking-wider">已完成(截止3.31)</p>
|
||||||
<p className="text-[10px] font-black text-emerald-600">{fmtKm(target.currentYearCompleted)} KM</p>
|
<p className="text-[10px] font-black text-emerald-600">{fmtKm(target.currentYearCompleted)} km</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="space-y-0.5">
|
<div className="space-y-0.5">
|
||||||
<p className="text-[8px] font-bold text-slate-400 uppercase tracking-wider">未完成总数</p>
|
<p className="text-[8px] font-bold text-slate-400 uppercase tracking-wider">未完成总数</p>
|
||||||
<p className="text-[10px] font-black text-rose-500">{fmtKm(target.remaining)} KM</p>
|
<p className="text-[10px] font-black text-rose-500">{fmtKm(target.remaining)} km</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="space-y-0.5">
|
<div className="space-y-0.5">
|
||||||
<p className="text-[8px] font-bold text-slate-400 uppercase tracking-wider">日均需完成</p>
|
<p className="text-[8px] font-bold text-slate-400 uppercase tracking-wider">日均需完成</p>
|
||||||
<p className="text-[10px] font-black text-blue-500">{target.dailyTarget} KM</p>
|
<p className="text-[10px] font-black text-blue-500">{fmtKm(target.dailyTarget)} km</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="col-span-2 flex items-center justify-between bg-slate-50 landscape:bg-slate-800 p-2 rounded-lg">
|
<div className="col-span-2 flex items-center justify-between bg-slate-50 landscape:bg-slate-800 p-2 rounded-lg">
|
||||||
<span className="text-[9px] font-bold text-slate-500">剩余考核天数</span>
|
<span className="text-[9px] font-bold text-slate-500">剩余考核天数</span>
|
||||||
@@ -437,8 +437,8 @@ export default function StatisticsView() {
|
|||||||
<tr key={idx} className="hover:bg-slate-800/30 transition-colors">
|
<tr key={idx} className="hover:bg-slate-800/30 transition-colors">
|
||||||
<td className="p-4 text-sm font-bold text-white sticky left-0 bg-slate-900 z-10 border-r border-slate-800">{target.targetName}</td>
|
<td className="p-4 text-sm font-bold text-white sticky left-0 bg-slate-900 z-10 border-r border-slate-800">{target.targetName}</td>
|
||||||
<td className="p-4 text-xs text-slate-300">{target.vehicleCount}</td>
|
<td className="p-4 text-xs text-slate-300">{target.vehicleCount}</td>
|
||||||
<td className="p-4 text-xs text-slate-300">{fmtKm(target.totalMileagePerVehicle * target.vehicleCount)}</td>
|
<td className="p-4 text-xs text-slate-300">{fmtKm(target.totalMileagePerVehicle * target.vehicleCount)} km</td>
|
||||||
<td className="p-4 text-xs text-slate-300">{fmtKm(target.cumulativeTotal)}</td>
|
<td className="p-4 text-xs text-slate-300">{fmtKm(target.cumulativeTotal)} km</td>
|
||||||
<td className="p-4">
|
<td className="p-4">
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<div className="flex-1 h-1.5 bg-slate-800 rounded-full overflow-hidden min-w-[60px]">
|
<div className="flex-1 h-1.5 bg-slate-800 rounded-full overflow-hidden min-w-[60px]">
|
||||||
@@ -451,15 +451,15 @@ export default function StatisticsView() {
|
|||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td className="p-4 text-[10px] text-slate-400">{target.periods.join('\n')}</td>
|
<td className="p-4 text-[10px] text-slate-400">{target.periods.join('\n')}</td>
|
||||||
<td className="p-4 text-xs text-slate-300">{target.annualMileagePerVehicle}</td>
|
<td className="p-4 text-xs text-slate-300">{fmtKm(target.annualMileagePerVehicle)} km</td>
|
||||||
<td className="p-4 text-xs font-bold text-emerald-400">{target.yearQualifiedCount}</td>
|
<td className="p-4 text-xs font-bold text-emerald-400">{target.yearQualifiedCount}</td>
|
||||||
<td className="p-4 text-xs font-bold text-blue-400">{target.halfQualifiedCount}</td>
|
<td className="p-4 text-xs font-bold text-blue-400">{target.halfQualifiedCount}</td>
|
||||||
<td className="p-4 text-xs font-bold text-white">{fmtKm(target.todayTotal)}</td>
|
<td className="p-4 text-xs font-bold text-white">{fmtKm(target.todayTotal)} km</td>
|
||||||
<td className="p-4 text-xs text-slate-300">{fmtKm(target.currentYearTarget)}</td>
|
<td className="p-4 text-xs text-slate-300">{fmtKm(target.currentYearTarget)} km</td>
|
||||||
<td className="p-4 text-xs text-slate-300">{fmtKm(target.currentYearCompleted)}</td>
|
<td className="p-4 text-xs text-slate-300">{fmtKm(target.currentYearCompleted)} km</td>
|
||||||
<td className="p-4 text-xs font-bold text-rose-400">{fmtKm(target.remaining)}</td>
|
<td className="p-4 text-xs font-bold text-rose-400">{fmtKm(target.remaining)} km</td>
|
||||||
<td className="p-4 text-xs text-slate-300">{target.daysLeft}</td>
|
<td className="p-4 text-xs text-slate-300">{target.daysLeft}</td>
|
||||||
<td className="p-4 text-xs font-bold text-blue-400">{target.dailyTarget}</td>
|
<td className="p-4 text-xs font-bold text-blue-400">{target.dailyTarget} km</td>
|
||||||
</tr>
|
</tr>
|
||||||
))}
|
))}
|
||||||
</tbody>
|
</tbody>
|
||||||
@@ -552,7 +552,7 @@ export default function StatisticsView() {
|
|||||||
</div>
|
</div>
|
||||||
<div className="text-right">
|
<div className="text-right">
|
||||||
<div className="text-sm font-black text-blue-600">{tv.todayMileage} <span className="text-[9px] text-slate-400">KM</span></div>
|
<div className="text-sm font-black text-blue-600">{tv.todayMileage} <span className="text-[9px] text-slate-400">KM</span></div>
|
||||||
<div className="text-[9px] font-bold text-slate-400 mt-0.5">累计: {fmtKm(tv.totalMileage || 0)}</div>
|
<div className="text-[9px] font-bold text-slate-400 mt-0.5">累计: {fmtKm(tv.totalMileage || 0)} km</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
|
|||||||
Reference in New Issue
Block a user