From c83d9b4976e4dad63ad4a52ca3e48c014ccd951f Mon Sep 17 00:00:00 2001
From: Euni4U <958079825@qq.com>
Date: Wed, 26 Mar 2025 13:00:35 +0800
Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=85=AC=E5=8D=AB=E6=82=A3?=
=?UTF-8?q?=E8=80=85=E4=BF=A1=E6=81=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/inspect/inspectpatient/index.ts | 4 +++
.../Inspection-checklist.vue | 33 ++++++++++++++++++-
2 files changed, 36 insertions(+), 1 deletion(-)
diff --git a/src/api/inspect/inspectpatient/index.ts b/src/api/inspect/inspectpatient/index.ts
index 1732fef..a1452b4 100644
--- a/src/api/inspect/inspectpatient/index.ts
+++ b/src/api/inspect/inspectpatient/index.ts
@@ -119,5 +119,9 @@ export const PatientApi = {
//根据体检编号&姓名&身份证号获取患者信息
getPatientInfoByMedicalSn: async (searchKey: string) => {
return await request.get({ url: `/inspect/patient/PatientBySearchKey?searchKey=` + searchKey })
+ },
+ //获取公卫患者信息
+ getGwPatientInfo: async (idCard: string) => {
+ return await request.get({ url: `/inspect/patient/GetApiPatientInfo?idCard=` + idCard })
}
}
diff --git a/src/views/Inspection-checklist/Inspection-checklist.vue b/src/views/Inspection-checklist/Inspection-checklist.vue
index ebe76fd..9d53b0c 100644
--- a/src/views/Inspection-checklist/Inspection-checklist.vue
+++ b/src/views/Inspection-checklist/Inspection-checklist.vue
@@ -120,7 +120,10 @@ v-loading.fullscreen.lock="fullscreenLoading"
-
+
+
+ 获取公卫患者信息
+
{
const day = String(date.getDate()).padStart(2, '0')
return `${year}-${month}-${day}`
}
+
+// 处理获取公卫患者信息
+const handleGwPatientInfo = async () => {
+ if (!addForm.cardId) {
+ message.warning('请先输入身份证号')
+ return
+ }
+
+ try {
+ loading.value = true
+ // 调用API获取公卫患者信息
+ const result = await PatientApi.getGwPatientInfo(addForm.cardId)
+ console.log('获取到的公卫患者信息:', result);
+ if (result) {
+ // 填充表单数据
+ addForm.name = result.name || ''
+ addForm.phone = result.telephone || ''
+ addForm.address = result.addree || ''
+ message.success('成功获取公卫患者信息')
+ } else {
+ message.warning('未找到该患者的公卫信息')
+ }
+ } catch (error) {
+ message.error('获取公卫患者信息失败: ' + (error.message || '未知错误'))
+ } finally {
+ loading.value = false
+ }
+}