From e404e88eb4a40915a3f7eb66c3d0e5729878e88d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E4=BA=91?= <赵云@gentronhealth.com> Date: Thu, 14 May 2026 02:10:35 +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 中列表刷新从 $nextTick 改为 setTimeout(500), 确保后端事务完全提交且父组件状态更新完成后再刷新手术列表, 避免并发 API 请求冲突导致的数据加载失败。 Co-Authored-By: Claude Opus 4.7 --- .../components/surgery/surgeryApplication.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 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 79ee08254..62d25c0b8 100755 --- a/openhis-ui-vue3/src/views/doctorstation/components/surgery/surgeryApplication.vue +++ b/openhis-ui-vue3/src/views/doctorstation/components/surgery/surgeryApplication.vue @@ -1138,12 +1138,12 @@ function submitForm() { sessionStorage.setItem('anesthesiaType', form.value.anesthesiaTypeEnum) open.value = false emit('saved') // 通知父组件刷新医嘱列表 - // 刷新手术申请列表,使用 nextTick 确保数据一致性 - proxy.$nextTick(() => { + // 延迟刷新手术申请列表,确保后端事务提交且父组件状态更新完成 + setTimeout(() => { if (props.patientInfo?.encounterId) { getList() } - }) + }, 500) } else { proxy.$modal.msgError(res.msg || '新增手术失败,请检查表单信息') } @@ -1160,12 +1160,12 @@ function submitForm() { sessionStorage.setItem('anesthesiaType', form.value.anesthesiaTypeEnum) open.value = false emit('saved') // 通知父组件刷新医嘱列表 - // 刷新手术申请列表,使用 nextTick 确保数据一致性 - proxy.$nextTick(() => { + // 延迟刷新手术申请列表,确保后端事务提交且父组件状态更新完成 + setTimeout(() => { if (props.patientInfo?.encounterId) { getList() } - }) + }, 500) } else { proxy.$modal.msgError(res.msg || '更新手术失败,请检查表单信息') }