fix: 還原
This commit is contained in:
@@ -25,7 +25,6 @@ export type PainLevel = "none" | "mild" | "moderate" | "severe";
|
||||
|
||||
/** 慢性病項目 */
|
||||
export type ChronicDisease =
|
||||
| "none"
|
||||
| "hypertension"
|
||||
| "diabetes"
|
||||
| "hyperlipidemia"
|
||||
|
||||
@@ -372,9 +372,6 @@
|
||||
color="primary"
|
||||
density="compact"
|
||||
hide-details
|
||||
@update:model-value="
|
||||
handleChronicDiseaseChange(disease.value, $event)
|
||||
"
|
||||
:label="disease.title"
|
||||
:value="disease.value"
|
||||
/>
|
||||
@@ -617,7 +614,6 @@ const improvementsOptions = [
|
||||
},
|
||||
];
|
||||
const diseaseOptions = [
|
||||
{ title: "無", value: "none" as const },
|
||||
{ title: "高血壓", value: "hypertension" as const },
|
||||
{ title: "糖尿病", value: "diabetes" as const },
|
||||
{ title: "高血脂", value: "hyperlipidemia" as const },
|
||||
@@ -626,21 +622,6 @@ const diseaseOptions = [
|
||||
{ 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>({
|
||||
get: () => parseDateString(profileForm.birthday),
|
||||
set: (value) => {
|
||||
|
||||
@@ -49,7 +49,6 @@ const WANTED_IMPROVEMENT_VALUES: WantedImprovement[] = [
|
||||
"bodyComposition",
|
||||
];
|
||||
const CHRONIC_DISEASE_VALUES: ChronicDisease[] = [
|
||||
"none",
|
||||
"hypertension",
|
||||
"diabetes",
|
||||
"hyperlipidemia",
|
||||
|
||||
Reference in New Issue
Block a user