diff --git a/openhis-ui-vue3/src/views/inpatientNurse/inOut/components/api.js b/openhis-ui-vue3/src/views/inpatientNurse/inOut/components/api.js index 1cd68768..62053fd7 100644 --- a/openhis-ui-vue3/src/views/inpatientNurse/inOut/components/api.js +++ b/openhis-ui-vue3/src/views/inpatientNurse/inOut/components/api.js @@ -145,3 +145,14 @@ export function terminalCleaning(encounterId) { }, }); } + +/** + * 获取病区列表(与病区管理页面相同的接口) + */ +export function getWardList(queryParams) { + return request({ + url: '/base-data-manage/location/location-page', + method: 'get', + params: queryParams, + }); +} diff --git a/openhis-ui-vue3/src/views/inpatientNurse/inOut/components/bedAllocation.vue b/openhis-ui-vue3/src/views/inpatientNurse/inOut/components/bedAllocation.vue index 1d7650f8..7241432b 100644 --- a/openhis-ui-vue3/src/views/inpatientNurse/inOut/components/bedAllocation.vue +++ b/openhis-ui-vue3/src/views/inpatientNurse/inOut/components/bedAllocation.vue @@ -89,7 +89,7 @@ import Filter from '@/components/TableLayout/Filter.vue'; import {computed, onBeforeMount, onMounted, reactive, ref} from 'vue'; import TransferInDialog from './transferInDialog.vue'; import SignEntryDialog from './signEntryDialog.vue'; -import {childLocationList, getBedInfo, getInit, getPendingInfo, getPractitionerWard} from './api'; +import {childLocationList, getBedInfo, getInit, getPendingInfo, getWardList} from './api'; import {ElLoading, ElMessage, ElMessageBox} from 'element-plus'; import PendingPatientList from '@/components/PendingPatientList/index.vue'; @@ -232,15 +232,16 @@ const ininData = async () => { initInfoOptions.value = initRes.data; priorityOptions.value = initRes.data.priorityOptions || []; - // 然后获取科室数据 - const wardRes = await getPractitionerWard(); + // 然后获取病区数据(使用与病区管理页面相同的接口) + const wardRes = await getWardList({ pageNum: 1, pageSize: 50, formEnum: 4 }); + const wardList = wardRes.data?.records || []; selectHosLoding.value = false; - queryParams.value.wardId = wardRes[0]?.id || ''; - initInfoOptions.value.wardListOptions = wardRes; + queryParams.value.wardId = wardList[0]?.id || ''; + initInfoOptions.value.wardListOptions = wardList; // 获取病房数据 - if (wardRes[0]?.id) { - await changeWardLocationId(wardRes[0].id, true); // 传入 true 表示初始化阶段,不调用 getList + if (wardList[0]?.id) { + await changeWardLocationId(wardList[0].id, true); // 传入 true 表示初始化阶段,不调用 getList } // 最后获取列表数据