fix: 還原

This commit is contained in:
skytek_xinliang
2026-09-14 11:26:21 +08:00
parent 40a166d420
commit 1cfd948fec
3 changed files with 0 additions and 21 deletions
-1
View File
@@ -25,7 +25,6 @@ export type PainLevel = "none" | "mild" | "moderate" | "severe";
/** 慢性病項目 */ /** 慢性病項目 */
export type ChronicDisease = export type ChronicDisease =
| "none"
| "hypertension" | "hypertension"
| "diabetes" | "diabetes"
| "hyperlipidemia" | "hyperlipidemia"
@@ -372,9 +372,6 @@
color="primary" color="primary"
density="compact" density="compact"
hide-details hide-details
@update:model-value="
handleChronicDiseaseChange(disease.value, $event)
"
:label="disease.title" :label="disease.title"
:value="disease.value" :value="disease.value"
/> />
@@ -617,7 +614,6 @@ const improvementsOptions = [
}, },
]; ];
const diseaseOptions = [ const diseaseOptions = [
{ title: "無", value: "none" as const },
{ title: "高血壓", value: "hypertension" as const }, { title: "高血壓", value: "hypertension" as const },
{ title: "糖尿病", value: "diabetes" as const }, { title: "糖尿病", value: "diabetes" as const },
{ title: "高血脂", value: "hyperlipidemia" as const }, { title: "高血脂", value: "hyperlipidemia" as const },
@@ -626,21 +622,6 @@ const diseaseOptions = [
{ title: "骨質疏鬆", value: "osteoporosis" as const }, { title: "骨質疏鬆", value: "osteoporosis" as const },
]; ];
function handleChronicDiseaseChange(
changedDisease: ChronicDisease,
selectedDiseases: ChronicDisease[] | null,
) {
const normalizedDiseases = selectedDiseases ?? [];
if (changedDisease === "none" && normalizedDiseases.includes("none")) {
assessmentForm.chronicDiseases = ["none"];
} else if (changedDisease !== "none") {
assessmentForm.chronicDiseases = normalizedDiseases.filter(
(disease) => disease !== "none",
);
}
}
const birthdayDate = computed<Date | null>({ const birthdayDate = computed<Date | null>({
get: () => parseDateString(profileForm.birthday), get: () => parseDateString(profileForm.birthday),
set: (value) => { set: (value) => {
@@ -49,7 +49,6 @@ const WANTED_IMPROVEMENT_VALUES: WantedImprovement[] = [
"bodyComposition", "bodyComposition",
]; ];
const CHRONIC_DISEASE_VALUES: ChronicDisease[] = [ const CHRONIC_DISEASE_VALUES: ChronicDisease[] = [
"none",
"hypertension", "hypertension",
"diabetes", "diabetes",
"hyperlipidemia", "hyperlipidemia",