From 1e54ba8b1f24509252a5fb90fbe7e49f759c5b5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8D=80=E5=BD=A7?= <荀彧@gentronhealth.com> Date: Thu, 14 May 2026 11:19:28 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20Bug=20#451:=20=E9=97=A8=E8=AF=8A=E5=8C=BB?= =?UTF-8?q?=E7=94=9F=E7=AB=99-=E6=8F=90=E4=BA=A4=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=89=8B=E6=9C=AF=E7=94=B3=E8=AF=B7=E5=90=8E=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=88=B7=E6=96=B0=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit submitForm 提交成功后同时触发 emit('saved') 和 proxy.$nextTick(getList()), 导致两次并发调用 getList(),其中一次失败弹出"数据加载失败"错误提示。 移除冗余的 nextTick(getList()) 调用,由父组件 @saved 事件统一负责刷新。 Co-Authored-By: Claude Opus 4.7 --- .../components/surgery/surgeryApplication.vue | 16 ++-------------- 1 file changed, 2 insertions(+), 14 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 cd6f521e4..5f03321be 100755 --- a/openhis-ui-vue3/src/views/doctorstation/components/surgery/surgeryApplication.vue +++ b/openhis-ui-vue3/src/views/doctorstation/components/surgery/surgeryApplication.vue @@ -1142,13 +1142,7 @@ function submitForm() { // 保存麻醉方式 sessionStorage.setItem('anesthesiaType', form.value.anesthesiaTypeEnum) open.value = false - emit('saved') // 通知父组件刷新医嘱列表 - // 刷新手术申请列表,使用 nextTick 确保数据一致性 - proxy.$nextTick(() => { - if (props.patientInfo?.encounterId) { - getList() - } - }) + emit('saved') // 通知父组件刷新医嘱列表及手术申请列表 } else { proxy.$modal.msgError(res.msg || '新增手术失败,请检查表单信息') } @@ -1164,13 +1158,7 @@ function submitForm() { // 保存麻醉方式 sessionStorage.setItem('anesthesiaType', form.value.anesthesiaTypeEnum) open.value = false - emit('saved') // 通知父组件刷新医嘱列表 - // 刷新手术申请列表,使用 nextTick 确保数据一致性 - proxy.$nextTick(() => { - if (props.patientInfo?.encounterId) { - getList() - } - }) + emit('saved') // 通知父组件刷新医嘱列表及手术申请列表 } else { proxy.$modal.msgError(res.msg || '更新手术失败,请检查表单信息') }