# 综合健康调研(Comprehensive Survey)实现计划 > **日期:** 2026-10-16 > **状态:** 待执行 > **前置设计:** `docs/superpowers/specs/2026-10-16-comprehensive-health-survey-design.md`(已定稿 commit `564e29eab`) > **执行方式:** 按 superpowers:subagent-driven-development 逐任务实现,或 superpowers:executing-plans 内联执行 > **技术栈:** uni-app 微信小程序(Vue2 Options API)+ Spring Boot 后端零改动 --- ## 一、目标 新建 `ComprehensiveSurvey.vue` 组件承载 8 模块 step 式综合调研(基本情况/当前状态/饮食偏好/疾病史/排便及运动/睡眠情况/用药情况/过敏源),首页新增独立调研页(URL `modules=` 控制模块子集),方案制定页 Step2 同步替换旧向导,实现「调研与方案制定共享组件和数据」。 ## 二、方案选型(已确认,详见设计文档 §二) | # | 决策 | |---|------| | 1 | **组件化替换**:新建 `ComprehensiveSurvey.vue`,首页新页面与方案制定页 Step2 嵌入同一组件 | | 2 | 模块由调用方传参(URL query `modules=`,8 key 逗号分隔子集;方案制定页传全量 8 模块) | | 3 | 仅当前成员维度(`currentChildId`/`currentMemberId` 快照),方案制定页多成员 tab 由父页切换传快照 | | 4 | `index-home` 无待填调研分支 + `health-main` 两处 `goSelfTest` 改跳新页 | | 5 | 新字段(`currentStatus`/`exerciseFrequency`/`exerciseDuration`)走 `health_status.lifestyle` JSON 自由 key | | 6 | 过敏原独立成 `allergy` 模块:过敏原多选 → `diet_preferences.allergies`、过敏症状多选 → `lifestyle.allergySymptoms` | | 7 | 饮食偏好模块补采 `vegetableFruit/dairy/sugaryDrinks`(后端 DTO 已有,页面漏采) | | 8 | 旧 `HealthQuestionnaireWizard.vue` + 5 子 step 标记 DEPRECATED,保留文件不删 | ## 三、文件结构 | 文件 | 操作 | 职责 | |------|------|------| | `cfc-frontend/pages/health/components/ComprehensiveSurvey.vue` | **新增** | 核心组件:8 模块 step 问卷、进度条、合并式增量保存、暖灶主题样式(预计 1000-1200 行) | | `cfc-frontend/pages/health/health-survey.vue` | **新增** | 独立调研包装页:解析 URL modules + 单成员快照 + 会员门槛 + 保存返回(预计 200 行) | | `cfc-frontend/pages.json` | 修改 | 注册 `health/health-survey` 到 health 分包 | | `cfc-frontend/pages/index-home/index.vue` | 修改 | `goSelfTest` 无待填调研分支改跳新页(L1639-1648) | | `cfc-frontend/pages/health-main/index.vue` | 修改 | `goSelfTest` 改跳新页(L518) | | `cfc-frontend/pages/health/health-plan-summary.vue` | 修改 | Step2 替换 Wizard 为 ComprehensiveSurvey;新增 `update-survey` 事件处理;`memberFormMap` 结构不变(lifestyle 全量存快照) | | `cfc-frontend/pages/health/components/HealthQuestionnaireWizard.vue` + 5 子 step | 标记 | 文件头加 DEPRECATED 注释,保留不删 | | 后端任何文件 | 不改 | 零后端、零 DDL | **字段归属:** - `basic` → health_status 列:`heightCm/weightKg/bloodPressure/bloodGlucose/bloodLipids` - `status` → lifestyle:`currentStatus/menstrualCycle/specialPeriod/growthDevelopment/pickyEating/osteoporosisRisk/fallRisk/screenTime/teenMood`(含人群专属条件渲染) - `diet` → diet_preferences 13 key(**不含 allergies**,含补采 3 项) - `disease` → health_status 列:`diseaseHistory`(JSON 数组) - `bowel` → lifestyle:`bowelFrequency/bowelForm/exerciseFrequency/exerciseDuration` - `sleep` → lifestyle:`sleepDuration/bedtime` - `med` → health_status 列:`medications`(JSON 数组) - `allergy` → diet_preferences:`allergies` + lifestyle:`allergySymptoms`(双写) --- ## 任务 1:创建核心组件 `ComprehensiveSurvey.vue` **文件:** - 创建:`cfc-frontend/pages/health/components/ComprehensiveSurvey.vue` **目标:** 8 模块 step 问卷组件,支持按 `modules` props 渲染子集,合并式增量保存,暖灶主题。 --- ### 步骤 1.1:组件骨架 + props/events + 数据层 创建文件,写入以下内容(**完整代码,非占位**): ```vue