From f08f8696d4b5408144ee8cbeeef973b411818d69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=98=E6=B0=91=E5=BA=B7?= Date: Tue, 3 Jun 2025 15:59:59 +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=E5=88=A0=E9=99=A4=E5=8F=8A?= =?UTF-8?q?=E6=89=B9=E9=87=8F=E5=88=A0=E9=99=A4=E5=8A=9F=E8=83=BD=E5=AF=B9?= =?UTF-8?q?=E6=8E=A5=E4=B8=8E=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ViewHistoryAside/BatchManageModal.vue | 359 +++++++++++------- .../ViewHistoryAside/ViewHistoryAside.vue | 51 ++- 2 files changed, 263 insertions(+), 147 deletions(-) diff --git a/src/views/Jyh/AI/Home/components/ViewHistoryAside/BatchManageModal.vue b/src/views/Jyh/AI/Home/components/ViewHistoryAside/BatchManageModal.vue index fb9bc84..fb3f671 100644 --- a/src/views/Jyh/AI/Home/components/ViewHistoryAside/BatchManageModal.vue +++ b/src/views/Jyh/AI/Home/components/ViewHistoryAside/BatchManageModal.vue @@ -2,23 +2,33 @@ - +
- - - + + + @@ -26,46 +36,69 @@
- +
- - - + +
+
+ +
diff --git a/src/views/Jyh/AI/Home/components/ViewHistoryAside/ViewHistoryAside.vue b/src/views/Jyh/AI/Home/components/ViewHistoryAside/ViewHistoryAside.vue index 4d8c0b5..574de4e 100644 --- a/src/views/Jyh/AI/Home/components/ViewHistoryAside/ViewHistoryAside.vue +++ b/src/views/Jyh/AI/Home/components/ViewHistoryAside/ViewHistoryAside.vue @@ -66,7 +66,7 @@ /> {{ item.is_collected ? '取消收藏' : '加入收藏' }} - @@ -108,15 +108,15 @@ 0
- - - - - - - - - +
+ + + 批量管理 + + +
@@ -180,7 +180,7 @@ - @@ -404,6 +404,35 @@ const getQuestionCollection = async () => { } }; +// 删除对话 +const handleDelete = async (conversationIds, tabType) => { + if (!props.username) { + Message.error('请先登录'); + return; + } + + try { + const res = await axios.post( + `${import.meta.env.VITE_AI_API_HOST}/api/deleteConversation`, + { + userId: props.username, + conversationIdList: conversationIds + } + ); + if (res.data.code === 20000) { + Message.success(res.data.message || '删除成功'); + getQuestionHistory() + getQuestionCollection() + } else { + Message.error(res.data.message || '删除失败'); + } + } catch (error) { + console.error('删除对话失败:', error); + Message.error('网络错误,请重试'); + } +}; + + onMounted(() => { getQuestionHistory() getQuestionCollection()