扩展氢能站点、加氢记录与台账原型链路,新增工作台、车辆资产 H5、自营物流等原型,并同步导航注册、PRD 资源与交付技能。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
65
docs/superpowers/plans/2026-07-20-h5-vehicle-assets.md
Normal file
65
docs/superpowers/plans/2026-07-20-h5-vehicle-assets.md
Normal file
@@ -0,0 +1,65 @@
|
||||
# 车辆资产 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) |
|
||||
Reference in New Issue
Block a user