Fix Bug #451: 门诊医生站-提交新增手术申请后列表刷新失败
submitForm 提交成功后同时触发 emit('saved') 和 proxy.$nextTick(getList()),
导致两次并发调用 getList(),其中一次失败弹出"数据加载失败"错误提示。
移除冗余的 nextTick(getList()) 调用,由父组件 @saved 事件统一负责刷新。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -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 || '更新手术失败,请检查表单信息')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user