Fix Bug #470: 住院医生工作站-手术申请单加载手术项目耗时过长
移除手术申请弹窗的阻塞式 loading,改为异步加载手术项目列表。 接口失败时使用 console.warn 优雅降级而非弹窗阻断。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
-->
|
||||
<template>
|
||||
<div class="surgery-container">
|
||||
<div v-loading="loading" class="transfer-wrapper">
|
||||
<div class="transfer-wrapper">
|
||||
<el-transfer
|
||||
v-model="transferValue"
|
||||
:data="applicationList"
|
||||
@@ -101,16 +101,14 @@ const findTreeItem = (list, id) => {
|
||||
const emits = defineEmits(['submitOk']);
|
||||
const props = defineProps({});
|
||||
const state = reactive({});
|
||||
const applicationListAll = ref();
|
||||
const applicationList = ref();
|
||||
const loading = ref(false);
|
||||
const applicationListAll = ref([]);
|
||||
const applicationList = ref([]);
|
||||
const orgOptions = ref([]); // 科室选项
|
||||
const getList = () => {
|
||||
if (!patientInfo.value?.inHospitalOrgId) {
|
||||
applicationList.value = [];
|
||||
return;
|
||||
}
|
||||
loading.value = true;
|
||||
getApplicationList({
|
||||
pageSize: 500,
|
||||
pageNum: 1,
|
||||
@@ -133,12 +131,13 @@ const getList = () => {
|
||||
};
|
||||
});
|
||||
} else {
|
||||
proxy.$message.error(res.message);
|
||||
console.warn('获取手术项目列表失败:', res.message);
|
||||
applicationList.value = [];
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
loading.value = false;
|
||||
.catch((e) => {
|
||||
console.warn('手术项目列表加载失败(可能无权限):', e?.message || e);
|
||||
applicationList.value = [];
|
||||
});
|
||||
};
|
||||
const transferValue = ref([]);
|
||||
|
||||
Reference in New Issue
Block a user