From 608141207225ce69d575f73e06960f2959c0cfe6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=B3=E7=BE=BD?= <关羽@gentronhealth.com> Date: Thu, 14 May 2026 02:04:12 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20Bug=20#461:=20[=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E7=AE=A1=E7=90=86-=E6=89=A7=E8=A1=8C=E7=A7=91=E5=AE=A4?= =?UTF-8?q?=E9=85=8D=E7=BD=AE]=20=E4=BF=9D=E5=AD=98=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E5=90=8E=EF=BC=8C=E9=A1=B9=E7=9B=AE=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E5=9B=9E=E6=98=BE=E4=B8=BAID=E7=A0=81=EF=BC=8C?= =?UTF-8?q?=E6=9C=AA=E6=98=BE=E7=A4=BA=E6=AD=A3=E7=A1=AE=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因:getList() 中 filteredOptions 只取 allImplementDepartmentList 的前100项, 当保存的项目ID不在前100项中时,el-select 找不到匹配选项,直接回显ID值而非名称。 修复:在映射记录时,将后端返回的 activityDefinitionId_dictText(项目名称)补充到 filteredOptions 中,确保 el-select 能正确匹配并显示项目名称。 --- .../src/views/basicmanage/implementDepartment/index.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/openhis-ui-vue3/src/views/basicmanage/implementDepartment/index.vue b/openhis-ui-vue3/src/views/basicmanage/implementDepartment/index.vue index 04eb2f81b..f53fa5d57 100755 --- a/openhis-ui-vue3/src/views/basicmanage/implementDepartment/index.vue +++ b/openhis-ui-vue3/src/views/basicmanage/implementDepartment/index.vue @@ -226,8 +226,14 @@ function getList() { getDiagnosisTreatmentList(queryParams.value).then((res) => { loading.value = false; catagoryList.value = res.data.records.map(record => { - // 为每一行初始化 filteredOptions,确保显示框能正确显示项目名称 const filteredOptions = allImplementDepartmentList.value.slice(0, 100); + // 确保后端返回的项目名称选项存在于 filteredOptions 中,避免 el-select 因找不到选项而回显为 ID + if (record.activityDefinitionId && !filteredOptions.some(o => o.value === record.activityDefinitionId)) { + filteredOptions.push({ + value: record.activityDefinitionId, + label: record.activityDefinitionId_dictText || record.activityDefinitionId + }); + } return { ...record, loading: false,