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 36b02de39..f9a392a67 100755 --- a/openhis-ui-vue3/src/views/inpatientNurse/drugDistribution/components/prescriptionList.vue +++ b/openhis-ui-vue3/src/views/inpatientNurse/drugDistribution/components/prescriptionList.vue @@ -302,6 +302,29 @@ function getSelectRows() { }); return list; } + +function getTableRef(index) { + return proxy.$refs['tableRef' + index]?.[0]; +} + +function selectAllRows() { + prescriptionList.value.forEach((item, index) => { + const tableRef = getTableRef(index); + if (!tableRef) { + return; + } + item.forEach((row) => { + tableRef.toggleRowSelection(row, true); + }); + }); +} + +function clearSelection() { + prescriptionList.value.forEach((item, index) => { + getTableRef(index)?.clearSelection(); + }); +} + function handleRateChange(value, item, row) { // 拼接当前选中时间 if (value) { @@ -319,6 +342,8 @@ function handleRateChange(value, item, row) { defineExpose({ handleGetPrescription, handleMedicineSummary, + selectAllRows, + clearSelection, }); diff --git a/openhis-ui-vue3/src/views/inpatientNurse/drugDistribution/index.vue b/openhis-ui-vue3/src/views/inpatientNurse/drugDistribution/index.vue index b8475ce2f..cf48eb14a 100755 --- a/openhis-ui-vue3/src/views/inpatientNurse/drugDistribution/index.vue +++ b/openhis-ui-vue3/src/views/inpatientNurse/drugDistribution/index.vue @@ -69,7 +69,11 @@