From c4f0d64cffdd8825fda4b37768cb73bb68a0c4f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=B3=E7=BE=BD?= <关羽@gentronhealth.com> Date: Sat, 16 May 2026 20:02:55 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20Bug=20#512:=20=E3=80=90=E4=BD=8F=E9=99=A2?= =?UTF-8?q?=E6=8A=A4=E5=A3=AB=E7=AB=99-=E6=B1=87=E6=80=BB=E5=8F=91?= =?UTF-8?q?=E8=8D=AF=E7=94=B3=E8=AF=B7=E3=80=91"=E5=85=A8=E9=80=89"?= =?UTF-8?q?=E5=BC=80=E5=85=B3=E5=8A=9F=E8=83=BD=E5=A4=B1=E6=95=88=EF=BC=8C?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E5=90=8E=E4=B8=8B=E6=96=B9=E5=8C=BB=E5=98=B1?= =?UTF-8?q?=E6=98=8E=E7=BB=86=E6=9C=AA=E8=83=BD=E8=81=94=E5=8A=A8=E5=8B=BE?= =?UTF-8?q?=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因:selectAllRows() 只调用了 el-table 的 toggleRowSelection(), 这只操作了表格行选择列,但用户可见的复选框是领药时间列中绑定在 checkedRates 上的嵌套 el-checkbox,两者是完全独立的机制。 修复:selectAllRows() 和 clearSelection() 中增加对 checkedRates 的同步操作, 确保全选/取消时联动勾选/取消所有时间点的复选框。 Co-Authored-By: Claude Opus 4.7 --- .../components/prescriptionList.vue | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/openhis-ui-vue3/src/views/inpatientNurse/drugDistribution/components/prescriptionList.vue b/openhis-ui-vue3/src/views/inpatientNurse/drugDistribution/components/prescriptionList.vue index f9a392a67..6ca2e46ad 100755 --- a/openhis-ui-vue3/src/views/inpatientNurse/drugDistribution/components/prescriptionList.vue +++ b/openhis-ui-vue3/src/views/inpatientNurse/drugDistribution/components/prescriptionList.vue @@ -315,13 +315,25 @@ function selectAllRows() { } item.forEach((row) => { tableRef.toggleRowSelection(row, true); + for (const timeKey in row.checkedRates) { + row.checkedRates[timeKey] = row.rate[timeKey].map((r) => r.rate); + } }); }); } function clearSelection() { prescriptionList.value.forEach((item, index) => { - getTableRef(index)?.clearSelection(); + const tableRef = getTableRef(index); + if (!tableRef) { + return; + } + item.forEach((row) => { + tableRef.clearSelection(); + for (const timeKey in row.checkedRates) { + row.checkedRates[timeKey] = []; + } + }); }); }