feat(surgery): 增加手术室确认信息和次要手术功能
- 添加手术室确认时间和确认人字段显示 - 实现次要手术的添加、编辑和删除功能 - 增加急诊标志和植入高值耗材开关选项 - 添加手术费用和麻醉费用计算功能 - 实现手术和麻醉项目的远程搜索功能 - 增加第一助手和第二助手选择功能 - 优化医生列表加载逻辑,支持多接口获取 - 添加按钮图标提升界面体验 - 修复encounterId为空时的接口调用问题
This commit is contained in:
@@ -595,13 +595,21 @@ function initData() {
|
||||
|
||||
// 获取检验申请单列表
|
||||
function getInspectionList() {
|
||||
// 如果没有encounterId,不调用接口
|
||||
if (!queryParams.encounterId) {
|
||||
console.warn('【检验】encounterId为空,不调用接口')
|
||||
return
|
||||
}
|
||||
|
||||
loading.value = true
|
||||
|
||||
// 调用真实的API,只传递 encounterId 参数
|
||||
console.log('【检验】调用API,encounterId:', queryParams.encounterId)
|
||||
getInspectionApplicationList({ encounterId: queryParams.encounterId }).then((res) => {
|
||||
if (res.code === 200) {
|
||||
inspectionList.value = res.data || []
|
||||
total.value = res.data?.length || 0
|
||||
console.log('【检验】获取数据成功,数量:', inspectionList.value.length)
|
||||
} else {
|
||||
inspectionList.value = []
|
||||
total.value = 0
|
||||
@@ -977,6 +985,15 @@ watch(() => props.activeTab, (newVal) => {
|
||||
}
|
||||
})
|
||||
|
||||
// 监听patientInfo变化,确保encounterId及时更新
|
||||
watch(() => props.patientInfo, (newVal) => {
|
||||
console.log('【检验】patientInfo变化:', newVal)
|
||||
if (newVal && newVal.encounterId) {
|
||||
queryParams.encounterId = newVal.encounterId
|
||||
console.log('【检验】更新encounterId:', queryParams.encounterId)
|
||||
}
|
||||
}, { deep: true, immediate: true })
|
||||
|
||||
// 初始化
|
||||
onMounted(() => {
|
||||
initData()
|
||||
|
||||
Reference in New Issue
Block a user