From 34dd969cb49e7d43f491f2441d294db06a017d12 Mon Sep 17 00:00:00 2001 From: weixin_45799331 Date: Wed, 21 Jan 2026 17:27:28 +0800 Subject: [PATCH] =?UTF-8?q?=E9=97=A8=E8=AF=8A=E5=8C=BB=E7=94=9F=E7=AB=99-?= =?UTF-8?q?=E3=80=8B=E5=8C=BB=E5=98=B1=EF=BC=9A=E8=AF=8A=E7=96=97=E5=BC=80?= =?UTF-8?q?=E5=85=B7=E5=8C=BB=E5=98=B1=E7=82=B9=E5=87=BB=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E4=B8=8B=E6=8B=89=E6=A1=86=EF=BC=8C=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E6=97=B6=E9=97=B4=E8=BF=87=E6=85=A240=E5=A4=9A?= =?UTF-8?q?=E7=A7=92=EF=BC=8C=E8=A7=A3=E5=86=B3=E4=BA=86=E4=B9=8B=E5=90=8E?= =?UTF-8?q?=E6=AD=A3=E5=B8=B8=E6=83=85=E5=86=B5=E8=8E=B7=E5=8F=964?= =?UTF-8?q?=E7=A7=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/openhis/common/aspectj/DictAspect.java | 10 +++++----- .../components/prescription/prescriptionlist.vue | 10 +++++++--- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/openhis-server-new/openhis-common/src/main/java/com/openhis/common/aspectj/DictAspect.java b/openhis-server-new/openhis-common/src/main/java/com/openhis/common/aspectj/DictAspect.java index a8fa2b51..59b0d269 100644 --- a/openhis-server-new/openhis-common/src/main/java/com/openhis/common/aspectj/DictAspect.java +++ b/openhis-server-new/openhis-common/src/main/java/com/openhis/common/aspectj/DictAspect.java @@ -116,8 +116,11 @@ public class DictAspect { } private String queryDictLabel(String dictTable, String dictCode, String dictText, String dictValue) { - if (StringUtils.hasText(dictTable)) { - // 场景 1:查询指定表 + if (!StringUtils.hasText(dictTable)) { + // 场景 1:默认字典走DictUtils缓存 + return DictUtils.getDictLabel(dictCode, dictValue); + } else { + // 场景 2:查询指定表 String sql = String.format("SELECT %s FROM %s WHERE %s::varchar = ? LIMIT 1", dictText, dictTable, dictCode); try { return jdbcTemplate.queryForObject(sql, String.class, dictValue); @@ -125,9 +128,6 @@ public class DictAspect { // 如果查询结果为空,返回 空字符串 return ""; } - } else { - // 场景 2:默认字典走DictUtils缓存 - return DictUtils.getDictLabel(dictCode, dictValue); } } } \ No newline at end of file diff --git a/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue b/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue index 01dcc0c7..129764da 100644 --- a/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue +++ b/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue @@ -741,7 +741,7 @@ check-strictly default-expand-all :ref="(el) => (inputRefs.orgId = el)" - @change="(value) => handleOrgChange(value, scope.$index)" + @change="(value) => handleOrgChange(value, scope.$index, scope.row)" placeholder="请选择执行科室" /> @@ -1104,6 +1104,10 @@ const isAdding = ref(false); const isSaving = ref(false); const prescriptionRef = ref(); const expandOrder = ref([]); //目前的展开行 +// 更新展开行的函数 +const updateExpandOrder = (keys) => { + expandOrder.value = keys; +}; const stockList = ref([]); const contractList = ref([]); const conditionId = ref(''); @@ -2261,7 +2265,7 @@ function handleSaveSign(row, index, prescriptionId) { return; } - const formRefName = 'formRef_' + targetPrescriptionId + '_' + actualIndex; + const formRefName = 'formRef' + actualIndex; let formRef = proxy.$refs[formRefName]; console.log('handleSaveSign - 查找表单引用:', formRefName, '是否找到:', !!formRef, '类型:', typeof formRef, 'formRef:', formRef); @@ -2663,7 +2667,7 @@ const handleEnter = (currentProp, row, rowIndex, prescriptionId) => { return; } - const formRefName = 'formRef_' + targetPrescriptionId + '_' + actualIndex; + const formRefName = 'formRef' + actualIndex; let formRef = proxy.$refs[formRefName]; // 如果 formRef 是数组,取第一个元素