fix: 考核区间支持多批次显示
190辆冷链车有3个不同考核区间(40台、50台、100台), 恒运有2个。后端改为查询每个target的不同考核区间并返回 periods数组,前端换行显示每个区间及其车辆数。 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -260,7 +260,9 @@ export default function StatisticsView() {
|
||||
<div className="pt-3 mt-2 border-t border-slate-50 landscape:border-slate-800 grid grid-cols-2 gap-x-4 gap-y-3">
|
||||
<div className="space-y-0.5">
|
||||
<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">{target.period}</p>
|
||||
{target.periods.map((p, i) => (
|
||||
<p key={i} className="text-[10px] font-black text-slate-700 landscape:text-slate-300">{p}</p>
|
||||
))}
|
||||
</div>
|
||||
<div className="space-y-0.5">
|
||||
<p className="text-[8px] font-bold text-slate-400 uppercase tracking-wider">总考核里程</p>
|
||||
@@ -443,7 +445,7 @@ export default function StatisticsView() {
|
||||
<span className="text-[10px] font-bold text-white">{target.avgCompletion.toFixed(1)}%</span>
|
||||
</div>
|
||||
</td>
|
||||
<td className="p-4 text-[10px] text-slate-400">{target.period}</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 font-bold text-emerald-400">{target.yearQualifiedCount}</td>
|
||||
<td className="p-4 text-xs font-bold text-blue-400">{target.halfQualifiedCount}</td>
|
||||
|
||||
@@ -23,7 +23,7 @@ export interface TargetSummary {
|
||||
totalMileagePerVehicle: number;
|
||||
annualMileagePerVehicle: number;
|
||||
assessmentYears: number;
|
||||
period: string;
|
||||
periods: string[];
|
||||
todayTotal: number;
|
||||
cumulativeTotal: number;
|
||||
avgCompletion: number;
|
||||
|
||||
Reference in New Issue
Block a user