167 住院管理-》住院护士站-》入出转管理:护士登录的科室能接收查看到其他科室的入科患者 入院病区字段下拉内容限制只能显示当前登录科室对应的病区,如该护士还有其他科室的权限需要做切换科室操作。

This commit is contained in:
Ranyunqiao
2026-03-12 14:30:19 +08:00
parent 3c47979913
commit 52951d7296
5 changed files with 119 additions and 14 deletions

View File

@@ -206,3 +206,14 @@ export function getAllWards(params = {}) {
},
});
}
/**
* 获取当前登录用户有权限管理的病区
*/
export function getPractitionerWard(queryParams) {
return request({
url: '/app-common/practitioner-ward',
method: 'get',
params: queryParams,
});
}

View File

@@ -202,7 +202,7 @@
<script setup>
import {
diagnosisInit,
getAllWards,
getPractitionerWard,
getBedInfo,
getContractList,
getDiagnosisDefinitionList,
@@ -427,13 +427,13 @@ function getInitOptions() {
// 获取所有科室
const orgPromise = getOrgList();
// 获取所有病区
const wardPromise = getAllWards();
const wardPromise = getPractitionerWard();
Promise.all([orgPromise, wardPromise]).then(([orgRes, wardRes]) => {
const allOrgs = orgRes.data.records.filter(
(record) => record.typeEnum === 2 && checkClassEnumValue(record.classEnum, 2)
);
const allWards = wardRes.data.records || [];
const allWards = wardRes.data || [];
// 提取所有病区关联的科室ID
const linkedOrgIds = new Set();

View File

@@ -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, getWardList} from './api';
import {childLocationList, getBedInfo, getInit, getPendingInfo, getPractitionerWard} from './api';
import {ElLoading, ElMessage, ElMessageBox} from 'element-plus';
import PendingPatientList from '@/components/PendingPatientList/index.vue';
@@ -233,8 +233,8 @@ const ininData = async () => {
priorityOptions.value = initRes.data.priorityOptions || [];
// 然后获取病区数据(使用与病区管理页面相同的接口)
const wardRes = await getWardList({ pageNum: 1, pageSize: 50, formEnum: 4 });
const wardList = wardRes.data?.records || [];
const wardRes = await getPractitionerWard();
const wardList = wardRes.data || [];
selectHosLoding.value = false;
queryParams.value.wardId = wardList[0]?.id || '';
initInfoOptions.value.wardListOptions = wardList;