111
This commit is contained in:
+28
-10
@@ -53,7 +53,7 @@ const ageDisplay = computed(() => {
|
||||
return age
|
||||
})
|
||||
|
||||
// 根据评估答案提取体质标签
|
||||
// 健康评估只展示生活习惯画像;体质由中医四诊独立判定。
|
||||
const profileTags = computed(() => {
|
||||
const ans = assessment.value?.answers
|
||||
if (!ans || !assessment.value?.hasCompletedAssessment) return []
|
||||
@@ -61,25 +61,25 @@ const profileTags = computed(() => {
|
||||
const list: { label: string; desc: string; type: 'gold' | 'blue' | 'green' | 'purple' }[] = []
|
||||
|
||||
if (ans.temperaturePreference === 'heat_fear') {
|
||||
list.push({ label: '体感燥热偏温', desc: '除湿机清爽48% · 床垫低档加热', type: 'blue' })
|
||||
list.push({ label: '夜间偏热感', desc: '自述夜间较容易感到闷热', type: 'blue' })
|
||||
} else if (ans.temperaturePreference === 'cold_fear') {
|
||||
list.push({ label: '体质畏寒怕冷', desc: '除湿机温润58% · 床垫加强加热', type: 'gold' })
|
||||
list.push({ label: '夜间偏冷感', desc: '自述睡眠时较容易感到寒冷', type: 'gold' })
|
||||
} else {
|
||||
list.push({ label: '冷热适中平衡', desc: '标准舒适温湿度', type: 'green' })
|
||||
list.push({ label: '冷热感受适中', desc: '自述夜间温度感受较平稳', type: 'green' })
|
||||
}
|
||||
|
||||
if (ans.fallingAsleepSpeed === 'hard') {
|
||||
list.push({ label: '睡前敏感易失眠', desc: '2200K超暖暗光 · 音箱睡眠模式', type: 'purple' })
|
||||
list.push({ label: '入睡较慢', desc: '可关注睡前作息和放松习惯', type: 'purple' })
|
||||
} else if (ans.fallingAsleepSpeed === 'fast') {
|
||||
list.push({ label: '快速深度睡眠', desc: '自然转场柔光', type: 'green' })
|
||||
list.push({ label: '入睡较快', desc: '通常能较快进入睡眠', type: 'green' })
|
||||
}
|
||||
|
||||
if (ans.muscleFatigueArea === 'waist_back' || ans.muscleFatigueArea === 'back_neck') {
|
||||
list.push({ label: '脊柱腰背劳损', desc: '床垫启用智能腰托模式', type: 'gold' })
|
||||
list.push({ label: '腰背疲劳感', desc: '自述腰背或颈部容易疲劳', type: 'gold' })
|
||||
}
|
||||
|
||||
if (ans.lateNightEating === 'often' || ans.lateNightEating === 'sometimes' || ans.flavorPreference === 'heavy') {
|
||||
list.push({ label: '晚间进食空气净化', desc: '除湿机UV紫外消杀已启用', type: 'purple' })
|
||||
list.push({ label: '关注晚间饮食', desc: '可逐步调整夜宵与重口味习惯', type: 'purple' })
|
||||
}
|
||||
|
||||
return list
|
||||
@@ -174,7 +174,7 @@ onMounted(() => {
|
||||
</div>
|
||||
|
||||
<div v-else class="empty-state">
|
||||
<p>您尚未完成身体健康评估,全屋智能家具当前使用出厂默认参数运行。</p>
|
||||
<p>您尚未完成身体健康评估;一键舒睡还需完成中医四诊,生成体质倾向。</p>
|
||||
<VanButton
|
||||
type="primary"
|
||||
size="small"
|
||||
@@ -187,6 +187,24 @@ onMounted(() => {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="profile-card">
|
||||
<div class="card-head">
|
||||
<h3>中医四诊体质倾向</h3>
|
||||
<span class="status-indicator" :class="{ done: dashboard?.tcmResult?.hasCompleted }">
|
||||
{{ dashboard?.tcmResult?.hasCompleted ? '已生成' : '未评估' }}
|
||||
</span>
|
||||
</div>
|
||||
<template v-if="dashboard?.tcmResult?.hasCompleted">
|
||||
<p class="plan-summary-text">{{ dashboard.tcmResult.constitutionName }}{{ dashboard.tcmResult.secondaryName ? ` · 兼${dashboard.tcmResult.secondaryName}` : '' }}</p>
|
||||
<p class="plan-summary-text">{{ dashboard.tcmResult.summary }}</p>
|
||||
<p class="plan-summary-text">香型建议:{{ dashboard.tcmResult.aromaRecommendation }};音乐建议:{{ dashboard.tcmResult.musicRecommendation }}</p>
|
||||
</template>
|
||||
<p v-else class="plan-summary-text">完成四诊后,才能一键启动体质相关的设备预设。</p>
|
||||
<VanButton type="primary" size="small" round color="#0c5045" @click="router.push('/tcm-assessment')">
|
||||
{{ dashboard?.tcmResult?.hasCompleted ? '重新评估体质' : '去完成四诊' }}
|
||||
</VanButton>
|
||||
</section>
|
||||
|
||||
<!-- 当前健康方案 -->
|
||||
<section class="profile-card" v-if="dashboard?.currentPlan">
|
||||
<div class="card-head">
|
||||
@@ -225,7 +243,7 @@ onMounted(() => {
|
||||
</div>
|
||||
<div class="menu-text">
|
||||
<strong>重新进行健康评估</strong>
|
||||
<small>更新身体指标,重新智能推导家具启动参数</small>
|
||||
<small>更新身体指标与睡眠、运动、饮食情况</small>
|
||||
</div>
|
||||
</div>
|
||||
<span class="arrow">></span>
|
||||
|
||||
Reference in New Issue
Block a user