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()