From 7e0651cf4c04048b0a2d2a08579018af450a8a74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=B3=E7=BE=BD?= <关羽@gentronhealth.com> Date: Thu, 14 May 2026 01:06:29 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20Bug=20#441:=20=E9=97=A8=E8=AF=8A=E6=89=8B?= =?UTF-8?q?=E6=9C=AF=E5=AE=89=E6=8E=92=EF=BC=9A=E6=89=8B=E6=9C=AF=E5=AE=A4?= =?UTF-8?q?=E6=8A=A4=E5=A3=AB=E8=A7=92=E8=89=B2=E8=BF=9B=E5=85=A5=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=8F=90=E7=A4=BA"=E6=97=A0=E6=9D=83=E9=99=90"?= =?UTF-8?q?=E4=B8=94"=E8=8E=B7=E5=8F=96=E5=8D=AB=E7=94=9F=E6=9C=BA?= =?UTF-8?q?=E6=9E=84=E5=88=97=E8=A1=A8=E5=A4=B1=E8=B4=A5"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因:loadDeptList/loadDoctorList/loadNurseList/loadOperatingRoomList 调用的API 没有设置 skipErrorMsg: true,当手术室护士等角色无权限时,axios响应拦截器会 弹出错误提示。只有 getTenantPageSilent 设置了 skipErrorMsg,其他均未设置。 修复:为所有字典加载API创建静默包装函数(deptTreeSelectSilent/listUserSilent/ listOperatingRoomSilent),统一使用 skipErrorMsg: true 跳过拦截器错误弹窗, 在 catch 块中静默降级为空数组。 --- .../src/views/surgicalschedule/index.vue | 43 +++++++++++++++---- 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/openhis-ui-vue3/src/views/surgicalschedule/index.vue b/openhis-ui-vue3/src/views/surgicalschedule/index.vue index c8f2f6640..3da81ff71 100755 --- a/openhis-ui-vue3/src/views/surgicalschedule/index.vue +++ b/openhis-ui-vue3/src/views/surgicalschedule/index.vue @@ -881,16 +881,13 @@ import { deleteSurgerySchedule, getSurgeryScheduleDetail } from '@/api/surgicalschedule' -import { listUser } from '@/api/system/user' -import { deptTreeSelect } from '@/api/system/user' -import { listOperatingRoom } from '@/api/operatingroom' import { getSurgeryPage} from '@/views/inpatientDoctor/home/components/applicationShow/api.js' import { getContract } from '@/views/inpatientDoctor/home/components/api.js' import request from '@/utils/request' import SurgeryCharge from '../charge/surgerycharge/index.vue' import TemporaryMedical from './temporaryMedical.vue' -// 静默获取卫生机构列表(跳过拦截器错误提示,手术室护士等角色可能无此权限) +// 静默获取字典列表(跳过拦截器错误提示,手术室护士等角色可能无此权限) function getTenantPageSilent(query) { return request({ url: '/system/tenant/page', @@ -900,6 +897,36 @@ function getTenantPageSilent(query) { }) } +// 静默获取科室树(跳过拦截器错误提示) +function deptTreeSelectSilent(params = {}) { + return request({ + url: '/base-data-manage/organization/organization', + method: 'get', + params: { typeEnum: 2, ...params }, + skipErrorMsg: true + }) +} + +// 静默获取用户列表(跳过拦截器错误提示) +function listUserSilent(query) { + return request({ + url: '/base-data-manage/practitioner/user-practitioner-page', + method: 'get', + params: query, + skipErrorMsg: true + }) +} + +// 静默获取手术室列表(跳过拦截器错误提示) +function listOperatingRoomSilent(query) { + return request({ + url: '/base-data-manage/operating-room/list', + method: 'get', + params: query, + skipErrorMsg: true + }) +} + const { proxy } = getCurrentInstance() const userStore = useUserStore() const loading = ref(true) @@ -1148,7 +1175,7 @@ function loadOrgList() { // 加载科室列表 function loadDeptList() { - deptTreeSelect() + deptTreeSelectSilent() .then(res => { if (res.code === 200) { const tree = res.data?.records || res.data || [] @@ -1168,7 +1195,7 @@ function loadDeptList() { // 加载医生列表 function loadDoctorList() { - listUser({ pageNo: 1, pageSize: 1000 }) + listUserSilent({ pageNo: 1, pageSize: 1000 }) .then(res => { if (res.code === 200) { const records = res.data?.records || [] @@ -1188,7 +1215,7 @@ function loadDoctorList() { // 加载护士列表 function loadNurseList() { - listUser({ pageNo: 1, pageSize: 1000 }) + listUserSilent({ pageNo: 1, pageSize: 1000 }) .then(res => { if (res.code === 200) { const records = res.data?.records || [] @@ -1208,7 +1235,7 @@ function loadNurseList() { // 加载手术室列表 function loadOperatingRoomList() { - listOperatingRoom({ pageNo: 1, pageSize: 1000, statusEnum: 1 }) + listOperatingRoomSilent({ pageNo: 1, pageSize: 1000, statusEnum: 1 }) .then(res => { if (res.code === 200) { const records = res.data?.records || []