feat: 課程建議

This commit is contained in:
skytek_xinliang
2026-08-05 15:45:45 +08:00
parent c9c7363dc8
commit 889e44f68e
13 changed files with 538 additions and 104 deletions
+9 -97
View File
@@ -54,18 +54,18 @@
</v-col>
</v-row>
<!-- 功能儲備與運動處方簡介 -->
<!-- 課程建議入口 -->
<v-card-text class="bg-primary">
<div class="font-weight-bold text-accent-light">
<v-list-item append-icon="mdi-chevron-right" class="bg-primary py-4" to="/course">
<v-list-item-title class="font-weight-bold text-accent-light">
<v-icon icon="mdi-notebook-check-outline" size="16" />
運動處方建議
</div>
課程建議
</v-list-item-title>
<p class="text-white mt-2">
{{ currentWeeklyPrescription }}
</p>
</v-card-text>
<v-list-item-subtitle class="text-white mt-2">
依你的體適能組別查看一週的每日課表
</v-list-item-subtitle>
</v-list-item>
</v-card>
<!-- 中間功能指標與五維雷達圖 -->
@@ -110,82 +110,6 @@
title="預約"
to="/appointment"
/>
<!-- 運動處方對話框 -->
<v-dialog v-model="prescriptionDialog" max-width="500">
<v-card class="rounded-xl">
<v-card-title class="bg-primary text-white font-weight-bold d-flex align-center">
<v-icon class="mr-2" icon="mdi-dumbbell" />
本週運動處方明細
</v-card-title>
<v-card-text class="pt-4 text-body-1">
<h4 class="font-weight-bold text-primary mb-2">每週訓練任務進度</h4>
<div class="mb-4">
<div class="d-flex justify-space-between align-center text-caption mb-1">
<span>任務完成度 (2/7堂課)</span>
<span>28%</span>
</div>
<v-progress-linear color="secondary" height="6" model-value="28" rounded />
</div>
<!-- 動作說明清單 -->
<v-list class="pa-0" density="comfortable">
<v-list-item class="bg-teal-lighten-5 rounded-lg mb-2 py-2">
<template #prepend>
<v-icon color="secondary" icon="mdi-numeric-1-circle" size="24" />
</template>
<v-list-item-title class="font-weight-bold">下肢肌力坐站起立訓練</v-list-item-title>
<v-list-item-subtitle class="text-caption mt-1">
每週 2 每次 3 每組 10-12 <br />
<span class="text-error font-weight-bold">* 扶手保護站起時吐氣</span>
</v-list-item-subtitle>
</v-list-item>
<v-list-item class="bg-teal-lighten-5 rounded-lg mb-2 py-2">
<template #prepend>
<v-icon color="secondary" icon="mdi-numeric-2-circle" size="24" />
</template>
<v-list-item-title class="font-weight-bold">靜態平衡扶椅單腳站立</v-list-item-title>
<v-list-item-subtitle class="text-caption mt-1">
每週 3 左右腳各 30 重複 3 <br />
<span class="text-grey-darken-1">手輕扶椅背確保安全</span>
</v-list-item-subtitle>
</v-list-item>
<v-list-item class="bg-teal-lighten-5 rounded-lg py-2">
<template #prepend>
<v-icon color="secondary" icon="mdi-numeric-3-circle" size="24" />
</template>
<v-list-item-title class="font-weight-bold">心肺耐力每日快走</v-list-item-title>
<v-list-item-subtitle class="text-caption mt-1">
每日 20-30 分鐘達到微喘但仍可說話的強度<br />
<span class="text-error font-weight-bold">* 若感覺頭暈或膝蓋疼痛請暫停</span>
</v-list-item-subtitle>
</v-list-item>
</v-list>
</v-card-text>
<v-card-actions class="justify-end px-4 pb-4">
<v-btn
class="rounded-lg px-4"
color="primary"
variant="flat"
@click="prescriptionDialog = false"
>
確認關閉
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</template>
<template v-else>
@@ -268,7 +192,6 @@ import ModuleRouterCard from '@/components/ModuleRouterCard.vue'
import { useAppStore } from '@/stores/app'
const store = useAppStore()
const prescriptionDialog = ref(false)
const displayedHealthScore = ref(1)
let healthScoreTimer: number | undefined
@@ -325,17 +248,6 @@ const todayTimeString = computed(() => {
return `${date} ${time}`
})
// 每週處方文字
const currentWeeklyPrescription = computed(() => {
if (store.healthScore >= 80) {
return '1次肌力循環 + 1次平衡課 + 每日20分鐘快走'
} else if (store.healthScore >= 65) {
return '2次肌力循環 + 1次平衡課 + 每日20分鐘快走'
} else {
return '3次防跌平衡引導 + 每日15分鐘扶椅坐站與慢走'
}
})
</script>
<style scoped>