3 changed files with 72 additions and 6 deletions
@ -0,0 +1,23 @@ |
|||
# DeviceDetail Status/Env Cards Plan |
|||
|
|||
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. |
|||
|
|||
**Goal:** 抽出状态矩阵与环境监测展示组件。 |
|||
|
|||
**Spec:** `docs/superpowers/specs/2026-08-28-device-detail-status-env-cards-design.md` |
|||
|
|||
### Task 1 |
|||
|
|||
- Create `src/components/DeviceStatusMatrix.vue` |
|||
- Create `src/components/DeviceEnvironmentValues.vue` |
|||
- Modify `DeviceDetailView.vue`:机巢 overview 两处改用组件;页面用 computed 组装 items |
|||
|
|||
Commit: `refactor: 抽取 DeviceDetail 状态矩阵与环境卡` |
|||
|
|||
### Task 2 冒烟(Main) |
|||
|
|||
设备详情 overview:status-matrix / environment-values 仍在;无 console error。 |
|||
|
|||
## 约束 |
|||
|
|||
跳过全量测试;精确 git add;中文 commit |
|||
@ -0,0 +1,43 @@ |
|||
# DeviceDetail 状态矩阵与环境卡设计 |
|||
|
|||
## 目标 |
|||
|
|||
从 `DeviceDetailView` 概览页抽出两个薄展示组件: |
|||
|
|||
1. `DeviceStatusMatrix.vue` — `.status-matrix`(机巢运行状态 6 格) |
|||
2. `DeviceEnvironmentValues.vue` — `.environment-values`(环境监测 6 格) |
|||
|
|||
页面继续算 `doorText` / `withUnit` / `booleanText` 等,组件只收**已格式化**的条目。 |
|||
|
|||
## 契约 |
|||
|
|||
### DeviceStatusMatrix |
|||
|
|||
```js |
|||
items: Array<{ icon: string, label: string, value: string, ok?: boolean }> |
|||
``` |
|||
|
|||
可选 emit:无(纯展示)。外层 `data-section` + title 仍可由页面包,或组件带可选 `title` + `action` slot。 |
|||
|
|||
推荐:组件只渲染 matrix 本体;section 壳留页面,改动最小。 |
|||
|
|||
### DeviceEnvironmentValues |
|||
|
|||
```js |
|||
items: Array<{ icon: string, label: string, value: string }> |
|||
``` |
|||
|
|||
## 非目标 |
|||
|
|||
- 不抽充电系统 value-table、绑定卡、drone 概览(可后续) |
|||
- 不迁 rt()/doorValue 计算 |
|||
|
|||
## 实现 |
|||
|
|||
1. 两组件 + DeviceDetailView overview 机巢分支接线 |
|||
2. Commit: `refactor: 抽取 DeviceDetail 状态矩阵与环境卡` |
|||
3. 冒烟:打开某机巢详情概览,矩阵/环境格可见 |
|||
|
|||
## 约束 |
|||
|
|||
精确 git add;中文 commit |
|||
Loading…
Reference in new issue