Fix Bug #509: [门诊医生站-手术申请] 提交申请后列表未实时刷新展示数据,且提示语需优化
1. getList() 增加 res.code === 200 校验,避免API返回错误数据时静默赋值导致列表不更新 2. 父组件 @saved 事件处理器增加 surgeryRef?.getList(),确保提交后父组件侧也触发列表刷新 3. 统一响应处理模式,与 inspectionApplication 等组件保持一致 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -626,14 +626,19 @@ function getList() {
|
||||
loading.value = false
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
loading.value = true
|
||||
getSurgeryPage({
|
||||
pageNo: 1,
|
||||
pageSize: 100,
|
||||
encounterId: props.patientInfo.encounterId
|
||||
}).then((res) => {
|
||||
surgeryList.value = res.data.records || []
|
||||
if (res.code === 200) {
|
||||
surgeryList.value = res.data?.records || []
|
||||
} else {
|
||||
proxy.$modal.msgError(res.msg || '数据加载失败,请稍后重试')
|
||||
surgeryList.value = []
|
||||
}
|
||||
}).catch(error => {
|
||||
console.error('获取手术列表失败:', error)
|
||||
proxy.$modal.msgError('数据加载失败,请稍后重试')
|
||||
|
||||
Reference in New Issue
Block a user