Files
OneOS1.2/docs/superpowers/plans/2026-07-20-h5-vehicle-assets.md

66 lines
2.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 车辆资产 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`(及各记录 utilsUI 不复用 `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 | 12 |
| Nav + PRD | 3 |
| KPI/anomaly口径 = PC | 1 (shared utils) |