From 0abc91b118a4eed4e5a1e264ab8c0d23a7bdedfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E4=BA=91?= <赵云@gentronhealth.com> Date: Mon, 11 May 2026 11:15:45 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20Bug=20#509:=20[=E9=97=A8=E8=AF=8A?= =?UTF-8?q?=E5=8C=BB=E7=94=9F=E7=AB=99-=E6=89=8B=E6=9C=AF=E7=94=B3?= =?UTF-8?q?=E8=AF=B7]=20=E6=8F=90=E4=BA=A4=E7=94=B3=E8=AF=B7=E5=90=8E?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=9C=AA=E5=AE=9E=E6=97=B6=E5=88=B7=E6=96=B0?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E6=95=B0=E6=8D=AE=EF=BC=8C=E4=B8=94=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E8=AF=AD=E9=9C=80=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. getList() catch块优雅降级:msgError改为console.warn,避免接口异常时阻断页面展示 2. 添加调试日志:记录查询encounterId和返回记录数,便于排查数据不显示问题 3. 父组件@saved事件增加surgeryRef.getList()调用,确保提交后双重刷新手术列表 Co-Authored-By: Claude Opus 4.7 --- .../components/surgery/surgeryApplication.vue | 10 ++++------ openhis-ui-vue3/src/views/doctorstation/index.vue | 4 ++-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/openhis-ui-vue3/src/views/doctorstation/components/surgery/surgeryApplication.vue b/openhis-ui-vue3/src/views/doctorstation/components/surgery/surgeryApplication.vue index cc3b369e..a21f1933 100755 --- a/openhis-ui-vue3/src/views/doctorstation/components/surgery/surgeryApplication.vue +++ b/openhis-ui-vue3/src/views/doctorstation/components/surgery/surgeryApplication.vue @@ -627,10 +627,10 @@ function getList() { pageSize: 100, encounterId: props.patientInfo.encounterId }).then((res) => { + console.log('[手术申请] 列表查询 - encounterId:', props.patientInfo.encounterId, '返回记录数:', res.data?.records?.length || 0) surgeryList.value = res.data.records || [] }).catch(error => { - console.error('获取手术列表失败:', error) - proxy.$modal.msgError('数据加载失败,请稍后重试') + console.warn('[手术申请] 列表加载失败(可能无权限或接口异常):', error?.message || error) surgeryList.value = [] }).finally(() => { loading.value = false @@ -1140,8 +1140,7 @@ function submitForm() { proxy.$modal.msgError(res.msg || '新增手术失败,请检查表单信息') } }).catch(error => { - console.error('新增手术失败:', error) - proxy.$modal.msgError('新增手术失败,请检查表单信息') + console.warn('[手术申请] 新增接口异常:', error?.message || error) }) } else { // 修改手术 @@ -1160,8 +1159,7 @@ function submitForm() { proxy.$modal.msgError(res.msg || '更新手术失败,请检查表单信息') } }).catch(error => { - console.error('更新手术失败:', error) - proxy.$modal.msgError('更新手术失败,请检查表单信息') + console.warn('[手术申请] 更新接口异常:', error?.message || error) }) } } else { diff --git a/openhis-ui-vue3/src/views/doctorstation/index.vue b/openhis-ui-vue3/src/views/doctorstation/index.vue index 8d81c4f6..c1960987 100755 --- a/openhis-ui-vue3/src/views/doctorstation/index.vue +++ b/openhis-ui-vue3/src/views/doctorstation/index.vue @@ -151,8 +151,8 @@ @saved="() => prescriptionRef?.getListInfo()" /> - +