From aab5aae5d96888ef798a44b0a01ba4d60af72240 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=98=E6=B0=91=E5=BA=B7?= Date: Thu, 26 Jun 2025 16:29:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=AF=E4=BF=A1=E4=BB=A3=E7=A0=81=E5=BA=93-A?= =?UTF-8?q?I=E5=A4=A7=E6=A8=A1=E5=9E=8B=E6=89=B9=E9=87=8F=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=85=A8=E9=80=89=E5=8A=9F=E8=83=BD=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ViewHistoryAside/BatchManageModal.vue | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/views/Jyh/AI/Home/components/ViewHistoryAside/BatchManageModal.vue b/src/views/Jyh/AI/Home/components/ViewHistoryAside/BatchManageModal.vue index 96c7e9b..54d9b2c 100644 --- a/src/views/Jyh/AI/Home/components/ViewHistoryAside/BatchManageModal.vue +++ b/src/views/Jyh/AI/Home/components/ViewHistoryAside/BatchManageModal.vue @@ -16,6 +16,7 @@ :data="dhlsList" row-key="conversationId" @check-change="handleCheckChange" + @check-all-change="checkAllChange" :pagination="false" :indent="32" > @@ -62,6 +63,7 @@ :data="collectionList" row-key="conversationId" @check-change="handleColCheckChange" + @check-all-change="colCheckAllChange" :pagination="false" :indent="32" > @@ -309,6 +311,15 @@ const handleCheckChange = (checked, row, selection) => { debugger selectedRowKeys.value = selection.map(i=> i.conversationId); }; +// 复选框选中状态变化 +const checkAllChange = (checked, row, selection) => { + debugger + if(checked) { + selectedRowKeys.value = row.map(i=> i.conversationId); + } else { + selectedRowKeys.value = []; + } +}; const initData = async () => { await getQuestionCollection(); @@ -402,6 +413,15 @@ const colSelectedRowKeys = ref([]); const handleColCheckChange = (checked, row, selection) => { colSelectedRowKeys.value = selection.map(i=> i.conversationId); }; +// 收藏复选框选中状态变化 +const colCheckAllChange = (checked, row, selection) => { + debugger + if(checked) { + colSelectedRowKeys.value = row.map(i=> i.conversationId); + } else { + colSelectedRowKeys.value = []; + } +}; // 取消收藏弹框 const collteModels = ref(false); // 批量删除