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); // 批量删除