fix(doctorstation): 修复诊断组件和住院办理功能的数据处理问题

- 修复诊断组件中el-popover模板语法错误,添加template标签
- 优化患者历史数据处理逻辑,确保数组类型安全并正确构建树形结构
- 完善住院办理流程中的组织机构数据获取和筛选逻辑
- 添加详细的控制台日志用于调试住院办理功能
- 修复办理住院按钮的禁用状态计算逻辑
- 优化患者卡片点击事件处理,确保就诊ID正确传递
- 添加诊断信息完整性检查并提供用户引导
- 修复检验申请组件中的监听器和暴露方法逻辑
This commit is contained in:
2026-01-18 00:37:54 +08:00
parent 982ee316f7
commit 2fe6d45ad4
5 changed files with 215 additions and 35 deletions

View File

@@ -1002,6 +1002,18 @@ watch(() => props.activeTab, (newVal) => {
}
})
// 监听patientInfo变化确保在患者信息更新时也更新检验申请单列表
watch(() => props.patientInfo, (newPatientInfo) => {
if (newPatientInfo && Object.keys(newPatientInfo).length > 0) {
// 更新encounterId
queryParams.encounterId = newPatientInfo.encounterId || newPatientInfo.id || newPatientInfo.patientId
// 如果有有效的encounterId则获取检验申请单列表
if (queryParams.encounterId && queryParams.encounterId !== 'undefined' && queryParams.encounterId !== 'null' && queryParams.encounterId !== '') {
getInspectionList()
}
}
}, { deep: true })
// 初始化
onMounted(() => {
initData()
@@ -1009,7 +1021,13 @@ onMounted(() => {
// 暴露方法
defineExpose({
getList: getInspectionList
getList() {
// 在调用getList时先检查是否有有效的patientInfo如果有则更新encounterId
if (props.patientInfo && Object.keys(props.patientInfo).length > 0) {
queryParams.encounterId = props.patientInfo.encounterId || props.patientInfo.id || props.patientInfo.patientId;
}
getInspectionList();
}
})
</script>