From cae70bd7429d1bea5d5d5cd8e1c4bd41f81c6739 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E4=BA=91?= <赵云@gentronhealth.com> Date: Mon, 11 May 2026 00:09:06 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20Bug=20#478:=20=E3=80=90=E4=BD=8F=E9=99=A2?= =?UTF-8?q?=E5=8C=BB=E7=94=9F=E5=B7=A5=E4=BD=9C=E7=AB=99-=E6=A3=80?= =?UTF-8?q?=E9=AA=8C=E7=94=B3=E8=AF=B7=E3=80=91=E7=82=B9=E5=87=BB"?= =?UTF-8?q?=E8=AF=A6=E6=83=85"=E6=9F=A5=E7=9C=8B=E6=A3=80=E9=AA=8C?= =?UTF-8?q?=E5=8D=95=E6=97=B6=EF=BC=8C"=E5=8F=91=E5=BE=80=E7=A7=91?= =?UTF-8?q?=E5=AE=A4"=E5=AD=97=E6=AE=B5=E5=9B=9E=E6=98=BE=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=EF=BC=88=E6=98=BE=E7=A4=BA=E4=B8=BA"-"=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.7 --- .../applicationShow/testApplication.vue | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/openhis-ui-vue3/src/views/inpatientDoctor/home/components/applicationShow/testApplication.vue b/openhis-ui-vue3/src/views/inpatientDoctor/home/components/applicationShow/testApplication.vue index ea86c913..54d440ca 100755 --- a/openhis-ui-vue3/src/views/inpatientDoctor/home/components/applicationShow/testApplication.vue +++ b/openhis-ui-vue3/src/views/inpatientDoctor/home/components/applicationShow/testApplication.vue @@ -173,7 +173,7 @@ import {computed, getCurrentInstance, ref, watch} from 'vue'; import {Refresh, Search} from '@element-plus/icons-vue'; import {patientInfo} from '../../store/patient.js'; import {getInspection} from './api'; -import {getOrgList} from '@/views/doctorstation/components/api.js'; +import {getDepartmentList} from '@/api/public.js'; const { proxy } = getCurrentInstance(); @@ -332,8 +332,8 @@ const hasMatchedFields = computed(() => { /** 查询科室 */ const getLocationInfo = () => { - getOrgList().then((res) => { - orgOptions.value = res.data.records; + getDepartmentList().then((res) => { + orgOptions.value = res.data || []; }); }; @@ -345,10 +345,12 @@ const recursionFun = (targetDepartment) => { name = obj.name; } const subObjArray = obj['children']; - for (let index = 0; index < subObjArray.length; index++) { - const item = subObjArray[index]; - if (item.id == targetDepartment) { - name = item.name; + if (subObjArray && subObjArray.length > 0) { + for (let i = 0; i < subObjArray.length; i++) { + const item = subObjArray[i]; + if (item.id == targetDepartment) { + name = item.name; + } } } }