fix: 按部门下钻车辆数与列表不一致,补充 category=Operating 过滤
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
dept-stats 只统计 Operating 车辆,但下钻弹窗调用 /list 时未传 category 参数,导致返回了非运营状态车辆(如业务二部显示233但下钻显示237)。 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1335,7 +1335,7 @@ export default function AssetsModule() {
|
|||||||
<div className="m-2 bg-slate-800 rounded-xl p-3 text-white shadow-lg">
|
<div className="m-2 bg-slate-800 rounded-xl p-3 text-white shadow-lg">
|
||||||
<div className="grid grid-cols-2 sm:grid-cols-4 gap-4">
|
<div className="grid grid-cols-2 sm:grid-cols-4 gap-4">
|
||||||
<div className="flex flex-col cursor-pointer hover:opacity-80 transition-opacity"
|
<div className="flex flex-col cursor-pointer hover:opacity-80 transition-opacity"
|
||||||
onClick={() => setShowPlateNumbers({ batch: 'All', model: 'All', location: 'All', source: 'department', title: '部门运营统计' })}>
|
onClick={() => setShowPlateNumbers({ batch: 'All', model: 'All', location: 'All', category: 'Operating', source: 'department', title: '部门运营统计' })}>
|
||||||
<span className="text-[9px] opacity-50 uppercase font-bold tracking-widest mb-0.5">总运营车辆</span>
|
<span className="text-[9px] opacity-50 uppercase font-bold tracking-widest mb-0.5">总运营车辆</span>
|
||||||
<span className="text-xl font-black">{deptData.reduce((s, d) => s + d.totalAssets, 0)}</span>
|
<span className="text-xl font-black">{deptData.reduce((s, d) => s + d.totalAssets, 0)}</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -1457,7 +1457,7 @@ export default function AssetsModule() {
|
|||||||
<button
|
<button
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
setShowPlateNumbers({ batch: 'All', model: 'All', location: 'All', department: dept.department, source: 'department', title: `部门运营统计 - ${dept.department}` });
|
setShowPlateNumbers({ batch: 'All', model: 'All', location: 'All', department: dept.department, category: 'Operating', source: 'department', title: `部门运营统计 - ${dept.department}` });
|
||||||
}}
|
}}
|
||||||
className="text-gray-800 hover:underline font-black"
|
className="text-gray-800 hover:underline font-black"
|
||||||
>
|
>
|
||||||
@@ -1659,7 +1659,7 @@ export default function AssetsModule() {
|
|||||||
</div>
|
</div>
|
||||||
<div className="grid grid-cols-3 gap-2">
|
<div className="grid grid-cols-3 gap-2">
|
||||||
<div className="text-center cursor-pointer hover:bg-gray-50 rounded p-1"
|
<div className="text-center cursor-pointer hover:bg-gray-50 rounded p-1"
|
||||||
onClick={(e) => { e.stopPropagation(); setShowPlateNumbers({ batch: 'All', model: 'All', location: 'All', department: dept.department, source: 'department', title: `部门运营统计 - ${dept.department}` }); }}>
|
onClick={(e) => { e.stopPropagation(); setShowPlateNumbers({ batch: 'All', model: 'All', location: 'All', department: dept.department, category: 'Operating', source: 'department', title: `部门运营统计 - ${dept.department}` }); }}>
|
||||||
<div className="text-[8px] text-gray-400 uppercase font-bold mb-0.5">总运营</div>
|
<div className="text-[8px] text-gray-400 uppercase font-bold mb-0.5">总运营</div>
|
||||||
<div className="text-xs font-black text-gray-800">{dept.totalAssets}</div>
|
<div className="text-xs font-black text-gray-800">{dept.totalAssets}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user