feat(mileage): 区域与车牌列表级联,并自动剔除越界车牌
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

- 后端: 选中 region 时基于该区域车辆重算 filters,车牌列表只展示该区域
- 前端: filterOptions.plates 收窄后自动从已选车牌中剔除不属于新区域的项

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
kkfluous
2026-04-29 15:31:12 +08:00
parent e0c609168e
commit cab86556f3
2 changed files with 14 additions and 0 deletions

View File

@@ -100,6 +100,12 @@ app.get('/', async (c) => {
filters = buildDateFilters(allVehicles); // 重算筛选选项以匹配权限范围
}
// 区域级联:选中运营区域时,下游筛选选项(车牌等)只展示该区域车辆
if (filterParams.region) {
const regionScope = allVehicles.filter(v => v.region === filterParams.region);
filters = buildDateFilters(regionScope);
}
const filtered = applyFilters(allVehicles, filterParams);
const stats = {