diff --git a/app/components/content/soapi/form-rehab.vue b/app/components/content/soapi/form-rehab.vue index 4754fb6a..15531e5e 100644 --- a/app/components/content/soapi/form-rehab.vue +++ b/app/components/content/soapi/form-rehab.vue @@ -68,6 +68,7 @@ const model = ref({ weight: '', height: '', }) +const formKey = ref(0) const isLoading = reactive({ isTableLoading: false, @@ -95,7 +96,11 @@ async function getDetail() { isLoading.isTableLoading = true const resp = await xfetch(`/api/v1/soapi/${recordId.value}`) if (resp.success) { - diagnoses.value = (resp.body as Record).data + const raw = (resp.body as Record).data + const values = JSON.parse(raw.value) + console.log('values', values) + model.value = values + formKey.value++ // Force re-render with new data } isLoading.isTableLoading = false } @@ -158,6 +163,7 @@ provide('icdPreview', icdPreview)