fix: 区域运营移动端数据、下钻支持城市/车型、网页标题
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

- 移动端区域运营改用regionData真实数据(去掉Math.floor模拟)
- 区域/城市/车型行数字全部支持点击下钻
- 后端/list支持按车型大类过滤(如4.5T含普货+冷链)
- 网页标题改为"羚牛氢能车辆资产"

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
kkfluous
2026-03-28 18:28:46 +08:00
parent d9568f767a
commit dd01671d9e
3 changed files with 49 additions and 62 deletions

View File

@@ -860,8 +860,14 @@ app.get('/list', async (c) => {
const { batch, model, location, status, category, vehicleType, manager, customer, isColdChain, isTrailer } = c.req.query();
let filtered = vehicles;
if (vehicleType && VEHICLE_TYPE_FILTERS[vehicleType]) {
filtered = filtered.filter(VEHICLE_TYPE_FILTERS[vehicleType]);
if (vehicleType) {
if (VEHICLE_TYPE_FILTERS[vehicleType]) {
filtered = filtered.filter(VEHICLE_TYPE_FILTERS[vehicleType]);
} else if (vehicleType === '4.5T') {
filtered = filtered.filter((v) => v.type === '4.5T');
} else {
filtered = filtered.filter((v) => v.type === vehicleType);
}
}
if (batch && batch !== 'All') {
filtered = filtered.filter((v) => (v.contractNo || '未知') === batch);