66 lines
2.4 KiB
Markdown
66 lines
2.4 KiB
Markdown
# 车辆资产 H5 Implementation Plan
|
||
|
||
> **For agentic workers:** Execute task-by-task. Checkboxes track progress. Prefer inline execution in this repo (React prototype, no separate unit-test harness).
|
||
|
||
**Goal:** 新建独立 H5 原型 `oneos-h5-vehicle-assets`:只读查车 + KPI/异常筛选 + 详情多 Tab,口径对齐 PC `vehicle-management`。
|
||
|
||
**Architecture:** PhoneShell 手机壳 + 列表/详情双视图;数据与 KPI 规则复用 PC `vehicles.json` 与 `utils/vehicle.ts`(及各记录 utils);UI 不复用 `vm-page` 宽表 DOM。
|
||
|
||
**Tech Stack:** React + TypeScript、本地 JSON 种子、Axhub annotation、`nav:sync` 注册导航。
|
||
|
||
---
|
||
|
||
## File map
|
||
|
||
| Path | Responsibility |
|
||
|------|----------------|
|
||
| `src/prototypes/oneos-h5-vehicle-assets/index.tsx` | 入口:列表/详情状态、筛选、分页 |
|
||
| `styles/index.css` | H5 样式(ONE-OS 绿) |
|
||
| `components/PhoneShell.tsx` | 手机预览壳 |
|
||
| `components/VehicleList.tsx` | 搜索、KPI、筛选抽屉、卡片 |
|
||
| `components/VehicleCard.tsx` | 单车卡片 |
|
||
| `components/FilterSheet.tsx` | 证照/保险状态抽屉 |
|
||
| `components/VehicleDetail.tsx` | 详情顶栏 + Tab |
|
||
| `components/detailTabs.tsx` | 11 个只读 Tab 内容 |
|
||
| `utils/filter.ts` | 列表过滤封装 |
|
||
| `.spec/requirements-prd.md` | AutoPRD |
|
||
| `annotation-source.json` | 标注目录 |
|
||
| `nav-menu.json` + `nav:sync` | 导航注册 |
|
||
|
||
---
|
||
|
||
### Task 1: Scaffold + list shell
|
||
|
||
- [ ] Create prototype files with PhoneShell, list layout, import vehicles
|
||
- [ ] Wire KPI via `matchKpi` / `countKpi` / `isLicenseExpired`
|
||
- [ ] Search + license/insurance filter + cards + page size 20
|
||
|
||
### Task 2: Detail multi-tab readonly
|
||
|
||
- [ ] Detail view with 11 tabs matching PC `DETAIL_TABS`
|
||
- [ ] Basic/model/license as field grids; record tabs via PC utils filtered by plate
|
||
- [ ] No edit/action buttons
|
||
|
||
### Task 3: Nav + PRD + annotation
|
||
|
||
- [ ] Add nav item under 车辆资产 folder as「车辆资产(H5)」
|
||
- [ ] Full AutoPRD + annotation-source PRD node
|
||
- [ ] Run `npm run nav:sync -- --prototype oneos-h5-vehicle-assets`
|
||
|
||
### Task 4: Smoke check
|
||
|
||
- [ ] Open `/prototypes/oneos-h5-vehicle-assets` and verify list → detail → tabs
|
||
|
||
---
|
||
|
||
## Spec coverage
|
||
|
||
| Spec item | Task |
|
||
|-----------|------|
|
||
| Independent H5 prototype | 1 |
|
||
| Search + KPI + anomaly filter + cards | 1 |
|
||
| Detail 11 tabs readonly | 2 |
|
||
| No edit including admin | 1–2 |
|
||
| Nav + PRD | 3 |
|
||
| KPI/anomaly口径 = PC | 1 (shared utils) |
|