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>
|
<template>
|
||||||
<div class="surgery-container">
|
<div class="surgery-container">
|
||||||
<div v-loading="loading" class="transfer-wrapper">
|
<div class="transfer-wrapper">
|
||||||
<el-transfer
|
<el-transfer
|
||||||
v-model="transferValue"
|
v-model="transferValue"
|
||||||
:data="applicationList"
|
:data="applicationList"
|
||||||
@@ -101,16 +101,14 @@ const findTreeItem = (list, id) => {
|
|||||||
const emits = defineEmits(['submitOk']);
|
const emits = defineEmits(['submitOk']);
|
||||||
const props = defineProps({});
|
const props = defineProps({});
|
||||||
const state = reactive({});
|
const state = reactive({});
|
||||||
const applicationListAll = ref();
|
const applicationListAll = ref([]);
|
||||||
const applicationList = ref();
|
const applicationList = ref([]);
|
||||||
const loading = ref(false);
|
|
||||||
const orgOptions = ref([]); // 科室选项
|
const orgOptions = ref([]); // 科室选项
|
||||||
const getList = () => {
|
const getList = () => {
|
||||||
if (!patientInfo.value?.inHospitalOrgId) {
|
if (!patientInfo.value?.inHospitalOrgId) {
|
||||||
applicationList.value = [];
|
applicationList.value = [];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
loading.value = true;
|
|
||||||
getApplicationList({
|
getApplicationList({
|
||||||
pageSize: 500,
|
pageSize: 500,
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
@@ -133,12 +131,13 @@ const getList = () => {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
proxy.$message.error(res.message);
|
console.warn('获取手术项目列表失败:', res.message);
|
||||||
applicationList.value = [];
|
applicationList.value = [];
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.catch((e) => {
|
||||||
loading.value = false;
|
console.warn('手术项目列表加载失败(可能无权限):', e?.message || e);
|
||||||
|
applicationList.value = [];
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const transferValue = ref([]);
|
const transferValue = ref([]);
|
||||||
|
|||||||
Reference in New Issue
Block a user