|
|
@@ -1,6 +1,6 @@
|
|
|
# report-confirm 被检测人选择面板整合 Implementation 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.
|
|
|
+> **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 (`- [x]`) syntax for tracking.
|
|
|
|
|
|
**Goal:** 将 `report-confirm.vue` 中被检测人的选择/添加功能整合进"基本信息"卡片:点击被检测人字段原地展开选择面板(候选匹配 + 全量成员 + 新建入口),移除独立"选择家庭成员"卡片与"新建家庭成员表单"卡片。
|
|
|
|
|
|
@@ -30,7 +30,7 @@
|
|
|
**Interfaces:**
|
|
|
- Produces: 新 data 字段 `showMemberPanel: false`、`selectedMemberObj: null`;新计算属性 `memberDisplayText`;新方法 `toggleMemberPanel()`、`selectAndClose(member)`、`syncSelectedMemberObj()`;`loadFamilyMembers()` 成功回调内新增 `syncSelectedMemberObj()` 调用;`doAutoCreate()` 成功分支新增回填+收起逻辑;移除 `selectMember(member)`、`selectCandidate(candidate)`。
|
|
|
|
|
|
-- [ ] **Step 1: 修改 data() — 新增两个字段**
|
|
|
+- [x] **Step 1: 修改 data() — 新增两个字段**
|
|
|
|
|
|
在 `showCandidatesOnly: false,`(约 L308)之后插入:
|
|
|
|
|
|
@@ -41,7 +41,7 @@
|
|
|
selectedMemberObj: null,
|
|
|
```
|
|
|
|
|
|
-- [ ] **Step 2: 修改 computed — 新增 memberDisplayText**
|
|
|
+- [x] **Step 2: 修改 computed — 新增 memberDisplayText**
|
|
|
|
|
|
在 `confidenceDesc()`(约 L351 结束)与 `indicatorGroups()` 之间插入:
|
|
|
|
|
|
@@ -56,7 +56,7 @@
|
|
|
// 指标按类型(category)分组,保持解析顺序,统计需处理(非正常)数量
|
|
|
```
|
|
|
|
|
|
-- [ ] **Step 3: 修改 onLoad — loadFamilyMembers 改为始终调用**
|
|
|
+- [x] **Step 3: 修改 onLoad — loadFamilyMembers 改为始终调用**
|
|
|
|
|
|
将 L427-438 的:
|
|
|
|
|
|
@@ -94,7 +94,7 @@
|
|
|
}
|
|
|
```
|
|
|
|
|
|
-- [ ] **Step 4: 修改 loadFamilyMembers — 成功回调同步选中成员**
|
|
|
+- [x] **Step 4: 修改 loadFamilyMembers — 成功回调同步选中成员**
|
|
|
|
|
|
在 `self.familyMembers = parents.concat(children)` 之后、`.catch` 之前插入 `self.syncSelectedMemberObj()`:
|
|
|
|
|
|
@@ -119,7 +119,7 @@
|
|
|
},
|
|
|
```
|
|
|
|
|
|
-- [ ] **Step 5: 替换 selectMember/selectCandidate — 新增 toggleMemberPanel / selectAndClose / syncSelectedMemberObj**
|
|
|
+- [x] **Step 5: 替换 selectMember/selectCandidate — 新增 toggleMemberPanel / selectAndClose / syncSelectedMemberObj**
|
|
|
|
|
|
删除 `selectMember(member)`(L458-460)与 `selectCandidate(candidate)`(L467-470)两个方法,在原 `selectMember` 位置插入:
|
|
|
|
|
|
@@ -158,7 +158,7 @@
|
|
|
|
|
|
注意:删除 `selectCandidate` 时保留其后的 `// === Phase 2: 候选匹配与新建成员 ===` 注释块位置不变。
|
|
|
|
|
|
-- [ ] **Step 6: 修改 doAutoCreate — 成功分支回填 + 收起面板**
|
|
|
+- [x] **Step 6: 修改 doAutoCreate — 成功分支回填 + 收起面板**
|
|
|
|
|
|
将成功分支(约 L495-502):
|
|
|
|
|
|
@@ -192,7 +192,7 @@
|
|
|
}
|
|
|
```
|
|
|
|
|
|
-- [ ] **Step 7: 修改模板 — 被检测人行可点击 + 内联面板**
|
|
|
+- [x] **Step 7: 修改模板 — 被检测人行可点击 + 内联面板**
|
|
|
|
|
|
将 L30-34 的被检测人字段行:
|
|
|
|
|
|
@@ -287,11 +287,11 @@
|
|
|
</view>
|
|
|
```
|
|
|
|
|
|
-- [ ] **Step 8: 修改模板 — 删除独立"选择家庭成员"卡片与"新建家庭成员表单"卡片**
|
|
|
+- [x] **Step 8: 修改模板 — 删除独立"选择家庭成员"卡片与"新建家庭成员表单"卡片**
|
|
|
|
|
|
删除整个 L57-107(`<!-- 家庭成员绑定(含候选推荐) -->` 卡片,`v-if="needBind"`)与 L109-131(`<!-- 新建家庭成员表单 -->` 卡片,`v-if="showAutoCreateForm"`)。删除后,`<!-- 舌诊指标(只读展示) -->` 注释成为基本信息卡片后的下一块。
|
|
|
|
|
|
-- [ ] **Step 9: 验证脚本层无残留引用**
|
|
|
+- [x] **Step 9: 验证脚本层无残留引用**
|
|
|
|
|
|
```bash
|
|
|
cd cfc-frontend
|
|
|
@@ -301,7 +301,7 @@ grep -n "选择家庭成员\|auto-create-card" pages/health/report-confirm.vue
|
|
|
|
|
|
Expected: 无输出(0 匹配)。若有残留(如 `showCandidatesOnly` 定义仍在 data 中是正常的),逐个确认属于新增逻辑或保留逻辑。
|
|
|
|
|
|
-- [ ] **Step 10: 构建验证**
|
|
|
+- [x] **Step 10: 构建验证**
|
|
|
|
|
|
```bash
|
|
|
cd cfc-frontend
|
|
|
@@ -310,7 +310,7 @@ npm run build:mp-weixin
|
|
|
|
|
|
Expected: 退出码 0,输出无 `ERROR`(允许 3 个既有 `"export 'components' was not found"` warning)。构建产物出现在 `dist/build/mp-weixin/pages/health/`。
|
|
|
|
|
|
-- [ ] **Step 11: 检查编译产物 — 无方法调用泄漏进 WXML 类绑定**
|
|
|
+- [x] **Step 11: 检查编译产物 — 无方法调用泄漏进 WXML 类绑定**
|
|
|
|
|
|
```bash
|
|
|
cd cfc-frontend
|
|
|
@@ -319,7 +319,7 @@ Select-String -Path "dist/build/mp-weixin/pages/health/report-confirm.wxml" -Pat
|
|
|
|
|
|
Expected: `selectAndClose`/`toggleMemberPanel` 以 `data-event-opts` 事件绑定形式存在;`memberDisplayText` 被编译为预计算值(如 `{{...mN}}` 形式,非函数调用);`selectCandidate`/`selectMember` 不出现。
|
|
|
|
|
|
-- [ ] **Step 12: Commit**
|
|
|
+- [x] **Step 12: Commit**
|
|
|
|
|
|
```bash
|
|
|
cd D:\workspace\cfc
|
|
|
@@ -338,7 +338,7 @@ git commit -m "feat: report-confirm 被检测人选择整合进基本信息卡
|
|
|
- Consumes: Task 1 新增的模板类 `member-select-row` / `member-select-arrow` / `member-panel` / `auto-create-inline`
|
|
|
- Produces: 以上 4 个类的基础样式;移除死样式 `.auto-create-card`
|
|
|
|
|
|
-- [ ] **Step 1: 新增被检测人行与面板样式**
|
|
|
+- [x] **Step 1: 新增被检测人行与面板样式**
|
|
|
|
|
|
在 `.field-value.binding-required` 规则(约 L833-835)之后插入:
|
|
|
|
|
|
@@ -363,7 +363,7 @@ git commit -m "feat: report-confirm 被检测人选择整合进基本信息卡
|
|
|
}
|
|
|
```
|
|
|
|
|
|
-- [ ] **Step 2: 移除死样式 .auto-create-card**
|
|
|
+- [x] **Step 2: 移除死样式 .auto-create-card**
|
|
|
|
|
|
删除(约 L1365-1368):
|
|
|
|
|
|
@@ -376,7 +376,7 @@ git commit -m "feat: report-confirm 被检测人选择整合进基本信息卡
|
|
|
|
|
|
将注释改为 `/* ===== Phase 2: 新建成员表单(面板内嵌) ===== */`,保留其后的 `.form-item` 等规则。
|
|
|
|
|
|
-- [ ] **Step 3: 构建验证**
|
|
|
+- [x] **Step 3: 构建验证**
|
|
|
|
|
|
```bash
|
|
|
cd cfc-frontend
|
|
|
@@ -385,7 +385,7 @@ npm run build:mp-weixin
|
|
|
|
|
|
Expected: 退出码 0,无 `ERROR`。
|
|
|
|
|
|
-- [ ] **Step 4: Commit**
|
|
|
+- [x] **Step 4: Commit**
|
|
|
|
|
|
```bash
|
|
|
cd D:\workspace\cfc
|
|
|
@@ -403,7 +403,7 @@ git commit -m "feat: report-confirm 面板样式 + 清理 auto-create-card 死
|
|
|
**Interfaces:**
|
|
|
- Consumes: Task 1-2 全部改动
|
|
|
|
|
|
-- [ ] **Step 1: 全量残留检查**
|
|
|
+- [x] **Step 1: 全量残留检查**
|
|
|
|
|
|
```bash
|
|
|
cd cfc-frontend
|
|
|
@@ -413,7 +413,7 @@ grep -c "showMemberPanel\|selectedMemberObj\|selectAndClose\|toggleMemberPanel\|
|
|
|
|
|
|
Expected: 第一个命令 0 匹配;第二个命令 ≥ 6(每个新符号至少出现 1 次)。
|
|
|
|
|
|
-- [ ] **Step 2: 逻辑核对(人工阅读)**
|
|
|
+- [x] **Step 2: 逻辑核对(人工阅读)**
|
|
|
|
|
|
阅读 `cfc-frontend/pages/health/report-confirm.vue` 确认:
|
|
|
1. `canConfirm` 计算属性未改动(`needBind && !selectedMemberId && !createdMemberId` → false)
|
|
|
@@ -422,7 +422,7 @@ Expected: 第一个命令 0 匹配;第二个命令 ≥ 6(每个新符号至
|
|
|
4. 面板内新建表单提交走 `doAutoCreate`(非 `addFamilyMember` 直调)
|
|
|
5. 无中文 CSS 类名、无可选链 `?.`、无 `:class` 方法调用
|
|
|
|
|
|
-- [ ] **Step 3: 最终构建**
|
|
|
+- [x] **Step 3: 最终构建**
|
|
|
|
|
|
```bash
|
|
|
cd cfc-frontend
|
|
|
@@ -431,7 +431,7 @@ npm run build:mp-weixin
|
|
|
|
|
|
Expected: 退出码 0,无 `ERROR`。
|
|
|
|
|
|
-- [ ] **Step 4: 更新 PROJECT-OVERVIEW.md 计划索引**
|
|
|
+- [x] **Step 4: 更新 PROJECT-OVERVIEW.md 计划索引**
|
|
|
|
|
|
在 `docs/superpowers/PROJECT-OVERVIEW.md` 的"实施计划(plans/)"表格末尾新增:
|
|
|
|
|
|
@@ -447,7 +447,7 @@ git add docs/superpowers/PROJECT-OVERVIEW.md
|
|
|
git commit -m "docs: PROJECT-OVERVIEW 登记 report-confirm 选择面板实现计划"
|
|
|
```
|
|
|
|
|
|
-- [ ] **Step 5: 汇总提交状态**
|
|
|
+- [x] **Step 5: 汇总提交状态**
|
|
|
|
|
|
```bash
|
|
|
cd D:\workspace\cfc
|