Fix Bug #520: [住院医生工作站-检验申请] 检验申请列表点击详情按钮界面无响应
根因:getLocationInfo() 缺少 try-catch,当 getDepartmentList() API 失败时, 未捕获的异常向上传播导致 handleViewDetail 在设置 detailDialogVisible=true 前终止, 详情弹窗永远无法打开。 修复:为 getLocationInfo() 添加 try-catch 错误处理,API 失败时降级为空数组, 确保 handleViewDetail 的后续代码(设置 currentDetail 和打开弹窗)能正常执行。 与 examineApplication.vue 的已有修复保持一致。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -409,8 +409,13 @@ const hasMatchedFields = computed(() => {
|
|||||||
|
|
||||||
/** 查询科室 */
|
/** 查询科室 */
|
||||||
const getLocationInfo = async () => {
|
const getLocationInfo = async () => {
|
||||||
|
try {
|
||||||
const res = await getDepartmentList();
|
const res = await getDepartmentList();
|
||||||
orgOptions.value = res.data || [];
|
orgOptions.value = Array.isArray(res.data) ? res.data : [];
|
||||||
|
} catch (e) {
|
||||||
|
console.warn('科室列表加载失败:', e.message);
|
||||||
|
orgOptions.value = [];
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const recursionFun = (targetDepartment) => {
|
const recursionFun = (targetDepartment) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user