From ecc5c7541834f0b9e23f37cc3cc5f62d3884a61d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=B3=E7=BE=BD?= <关羽@gentronhealth.com> Date: Thu, 14 May 2026 08:58:15 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20Bug=20#405:=20=E4=BD=8F=E9=99=A2=E5=8C=BB?= =?UTF-8?q?=E7=94=9F=E5=B7=A5=E4=BD=9C=E7=AB=99=EF=BC=9A=E4=B8=B4=E5=BA=8A?= =?UTF-8?q?=E5=8C=BB=E5=98=B1=E4=BF=9D=E5=AD=98=E6=88=90=E5=8A=9F=E5=90=8E?= =?UTF-8?q?=EF=BC=8C=E5=8C=BB=E5=98=B1=E6=9D=A1=E7=9B=AE=E4=BB=8D=E5=A4=84?= =?UTF-8?q?=E4=BA=8E=E5=8F=AF=E7=BC=96=E8=BE=91=E7=8A=B6=E6=80=81=EF=BC=88?= =?UTF-8?q?=E6=9C=AA=E9=94=81=E5=AE=9A=E5=B1=95=E7=A4=BA=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因:handleSaveBatch 保存成功后,原有修复通过 uniqueKey 查找 prescriptionList 中的行并设置 isEdit=false, 但由于 saveList 中的 item 本身就是 prescriptionList 中对象的同一引用,通过 find(uniqueKey) 查找存在匹配失败的风险。 修复:直接对 saveList 中的对象引用设置 isEdit=false(同引用无需查找),并兜底遍历所有 statusEnum==1 的行锁定。 同时清空 expandOrder 展开状态,确保医嘱行完全回到只读展示模式。 --- .../inpatientDoctor/home/components/order/index.vue | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/index.vue b/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/index.vue index daae81c6e..177d23461 100755 --- a/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/index.vue +++ b/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/index.vue @@ -1477,11 +1477,18 @@ function handleSaveBatch() { .then((res) => { if (res.code === 200) { proxy.$modal.msgSuccess('保存成功'); - // 修复【#405】:保存成功后重置所有待保存行的 isEdit 为 false,锁定医嘱不再编辑 + // 修复 Bug #405:保存成功后锁定所有待保存行,避免医嘱条目仍处于可编辑状态 + // saveList 中的 item 与 prescriptionList 是同一对象引用,直接修改即可 saveList.forEach(item => { - const row = prescriptionList.value.find(r => r.uniqueKey === item.uniqueKey); - if (row) row.isEdit = false; + item.isEdit = false; }); + // 兜底:锁定所有 statusEnum == 1 的行,确保没有遗漏 + prescriptionList.value.forEach(row => { + if (row.statusEnum == 1) { + row.isEdit = false; + } + }); + expandOrder.value = []; getListInfo(false); nextId.value = 1; isSaving.value = false;