fix: 实时监控显示优化
1. KPI 总里程不保留小数 2. 车辆卡片先展示部门再展示客户名称,客户名称不截断 3. 无部门时展示租赁状态(自营/租赁/挂靠等) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -358,7 +358,7 @@ export default function MonitoringView() {
|
||||
</div>
|
||||
</td>
|
||||
<td className="p-4 text-xs text-slate-400">{v.customer}</td>
|
||||
<td className="p-4 text-xs text-slate-400">{v.department}</td>
|
||||
<td className="p-4 text-xs text-slate-400">{v.department || v.rentStatus || ''}</td>
|
||||
<td className="p-4 text-right">
|
||||
<div className="flex flex-col items-end">
|
||||
<div className="flex items-center gap-1.5">
|
||||
@@ -685,7 +685,7 @@ export default function MonitoringView() {
|
||||
{sortBy === 'today' ? '今日' : '累计'}总里程 (KM)
|
||||
</div>
|
||||
<div className="text-2xl font-black tracking-tighter flex items-baseline gap-1">
|
||||
{(sortBy === 'today' ? stats.totalToday : stats.totalAll).toLocaleString()}
|
||||
{Math.round(sortBy === 'today' ? stats.totalToday : stats.totalAll).toLocaleString()}
|
||||
{sortBy === 'today' && <span className="text-blue-400 text-[10px] font-bold">{'\u2191'}12%</span>}
|
||||
</div>
|
||||
<div className="absolute -right-4 -bottom-4 w-12 h-12 bg-blue-500/10 rounded-full blur-xl"></div>
|
||||
@@ -735,8 +735,8 @@ export default function MonitoringView() {
|
||||
</span>
|
||||
</div>
|
||||
<div className="flex items-center gap-1.5">
|
||||
<span className="text-[9px] font-bold text-slate-600 truncate max-w-[80px]">{v.customer || '未分配'}</span>
|
||||
<span className="text-[8px] text-slate-300 font-bold uppercase">{v.department?.replace('业务', '')}</span>
|
||||
<span className="text-[8px] text-slate-300 font-bold">{v.department ? v.department.replace('业务', '') : v.rentStatus || ''}</span>
|
||||
<span className="text-[9px] font-bold text-slate-600 truncate">{v.customer || '未分配'}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -9,6 +9,7 @@ export interface MonitoringVehicle {
|
||||
customer: string | null;
|
||||
department: string | null;
|
||||
manager: string | null;
|
||||
rentStatus: string | null;
|
||||
}
|
||||
|
||||
export interface MonitoringStats {
|
||||
|
||||
Reference in New Issue
Block a user