refactor(inhospitalnursestation): 优化入院护士站应用的数据库查询性能

- 将CTE查询重构为子查询以提高执行效率
- 为位置和医生查询添加LIMIT 1约束以减少数据量
- 移除不必要的GROUP BY子句以简化查询逻辑
- 在前端组件中实现异步数据加载和错误处理机制
- 使用可选链操作符处理空值情况避免报错
- 添加防抖机制解决单击双击冲突问题
- 优化患者列表和床位列表的并行加载逻辑
- 清理调试用的console.log语句并替换为有意义的信息
This commit is contained in:
2026-01-19 22:36:04 +08:00
parent aa3beb848b
commit 803e4d0bb5
14 changed files with 234 additions and 171 deletions

View File

@@ -44,16 +44,15 @@ const thirdRef = ref();
onBeforeMount(() => {});
onMounted(() => {});
defineExpose({ state });
const test = () => {
nextTick(() => {
if (activeTabName.value == 'first') {
firstRef?.value?.refreshTap();
} else if (activeTabName.value == 'second') {
secondRef?.value?.refreshTap();
} else if (activeTabName.value == 'third') {
thirdRef?.value?.refreshTap();
}
});
const test = async () => {
await nextTick();
if (activeTabName.value == 'first') {
await firstRef?.value?.refreshTap();
} else if (activeTabName.value == 'second') {
await secondRef?.value?.refreshTap();
} else if (activeTabName.value == 'third') {
await thirdRef?.value?.refreshTap();
}
};
const activeTabName = ref('first');