Fix Bug #451: 门诊医生站-提交新增手术申请后列表刷新失败
将 submitForm 中列表刷新从 $nextTick 改为 setTimeout(500), 确保后端事务完全提交且父组件状态更新完成后再刷新手术列表, 避免并发 API 请求冲突导致的数据加载失败。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -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 || '更新手术失败,请检查表单信息')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user