From 6ba4b8ee6abfd48595efa914eecebff5998cd5d7 Mon Sep 17 00:00:00 2001 From: Abizrh Date: Tue, 9 Dec 2025 23:23:07 +0700 Subject: [PATCH] enhance (soapi): get detail --- app/components/content/soapi/form-rehab.vue | 8 +++++++- app/components/content/soapi/form.vue | 5 +++-- app/handlers/encounter-init.handler.ts | 4 +--- 3 files changed, 11 insertions(+), 6 deletions(-) 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)