门诊医生站-》开立诊断 页面调整
This commit is contained in:
@@ -145,14 +145,20 @@ const fetchAll = async () => {
|
||||
}
|
||||
loadingCheck.value = true;
|
||||
loadingInspection.value = true;
|
||||
try {
|
||||
await Promise.all([fetchCheckReport(), fetchInspectionReport()]);
|
||||
} catch (e) {
|
||||
proxy.$modal?.msgError?.(e.message || '查询报告失败');
|
||||
} finally {
|
||||
loadingCheck.value = false;
|
||||
loadingInspection.value = false;
|
||||
}
|
||||
|
||||
// 独立处理,互不影响
|
||||
const runFetch = async (fn, loadingRef, name) => {
|
||||
try {
|
||||
await fn();
|
||||
} catch (e) {
|
||||
proxy.$modal?.msgError?.(`${name}查询失败: ${e.message || '未知错误'}`);
|
||||
} finally {
|
||||
loadingRef.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
runFetch(fetchCheckReport, loadingCheck, '检查报告');
|
||||
runFetch(fetchInspectionReport, loadingInspection, '检验报告');
|
||||
};
|
||||
|
||||
const handleRefreshCheck = async () => {
|
||||
|
||||
Reference in New Issue
Block a user