10780285f5
## 改动摘要 ### 后端改动 - 新增 `lightning_import.py` schema,定义文件导入批次相关数据结构 - 在 `lightning_service.py` 中实现 `list_lightning_import_batches` 和 `get_lightning_import_batch_events` 函数 - 在 `lightning.py` API 中新增两个端点: - `GET /lightning-currents/import-batches` - 获取文件导入批次列表 - `GET /lightning-currents/import-batches/events` - 获取指定批次的事件明细 ### 前端改动 - 修改 `page.tsx`,将表格展示从单个事件改为文件导入批次 - 新增 `EventsModal` 组件,用于查看批次的事件明细 - 新增 `ScatterModal` 组件,用于查看批次对应的散点图 - 每个批次记录提供「事件明细」和「散点图」按钮 - 更新类型定义,新增 `LightningImportBatchSummary` 等类型 ### 数据分组逻辑 - 按 `source_file_name + create_date + region_id + location_tag + city` 进行分组 - 每个批次显示:文件名、导入时间、事件数、城市、地点标签、最大/平均电流 ## 测试结果 - ✅ Python 语法检查通过(lightning_service.py, lightning.py, lightning_import.py) - ✅ TypeScript 类型定义正确 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: multica-agent <github@multica.ai>