diff --git a/src/views/Jyh/AI/Home/components/AIList.vue b/src/views/Jyh/AI/Home/components/AIList.vue
index 88b73ef..5a76c94 100644
--- a/src/views/Jyh/AI/Home/components/AIList.vue
+++ b/src/views/Jyh/AI/Home/components/AIList.vue
@@ -21,14 +21,14 @@
导出列表
-
-

-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -218,6 +218,7 @@ function handleMore() {
//min-height: 600px;
background: #ffffff;
padding: 20px;
+ padding-bottom: 40px;
margin-top: 16px;
border-radius: 15px;
diff --git a/src/views/Jyh/AI/Home/components/OssDetail.vue b/src/views/Jyh/AI/Home/components/OssDetail.vue
index df9882d..3ebe4b3 100644
--- a/src/views/Jyh/AI/Home/components/OssDetail.vue
+++ b/src/views/Jyh/AI/Home/components/OssDetail.vue
@@ -7,14 +7,6 @@
订阅
-
-

-
-
-
-
-
-
@@ -189,6 +181,7 @@ function handleMore() {
//min-height: 600px;
background: #ffffff;
padding: 20px;
+ padding-bottom: 40px;
margin-top: 16px;
border-radius: 15px;
diff --git a/src/views/Jyh/AI/Home/components/OssList.vue b/src/views/Jyh/AI/Home/components/OssList.vue
index 62a8bfa..450f290 100644
--- a/src/views/Jyh/AI/Home/components/OssList.vue
+++ b/src/views/Jyh/AI/Home/components/OssList.vue
@@ -100,14 +100,14 @@
导出列表
-
-

-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -431,6 +431,7 @@ function handleMore() {
//min-height: 600px;
background: #ffffff;
padding: 20px;
+ padding-bottom: 40px;
margin-top: 16px;
border-radius: 15px;
diff --git a/src/views/Jyh/AI/Home/components/ViewHistoryAside/BatchManageModal.vue b/src/views/Jyh/AI/Home/components/ViewHistoryAside/BatchManageModal.vue
index a30a3a5..f110e3d 100644
--- a/src/views/Jyh/AI/Home/components/ViewHistoryAside/BatchManageModal.vue
+++ b/src/views/Jyh/AI/Home/components/ViewHistoryAside/BatchManageModal.vue
@@ -149,6 +149,7 @@ const activePagination = computed(() => {
// 接口调用 - 对话历史
const getQuestionHistory = async () => {
+ debugger
if (!props.username) {
Message.error('请先登录');
return;
diff --git a/src/views/Jyh/AI/Home/components/ViewHistoryAside/ViewHistoryAside.vue b/src/views/Jyh/AI/Home/components/ViewHistoryAside/ViewHistoryAside.vue
index c4cefc7..9dc64b6 100644
--- a/src/views/Jyh/AI/Home/components/ViewHistoryAside/ViewHistoryAside.vue
+++ b/src/views/Jyh/AI/Home/components/ViewHistoryAside/ViewHistoryAside.vue
@@ -230,7 +230,7 @@
批量管理
-
+
diff --git a/src/views/Jyh/AI/Home/components/WarningList.vue b/src/views/Jyh/AI/Home/components/WarningList.vue
index 98ace5d..4b6b866 100644
--- a/src/views/Jyh/AI/Home/components/WarningList.vue
+++ b/src/views/Jyh/AI/Home/components/WarningList.vue
@@ -39,14 +39,14 @@
导出列表
-
-

-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -200,6 +200,7 @@ function handleMore() {
//min-height: 600px;
background: #ffffff;
padding: 20px;
+ padding-bottom: 40px;
margin-top: 16px;
border-radius: 15px;
diff --git a/src/views/Jyh/AI/Home/index.vue b/src/views/Jyh/AI/Home/index.vue
index ca3648d..08a3d93 100644
--- a/src/views/Jyh/AI/Home/index.vue
+++ b/src/views/Jyh/AI/Home/index.vue
@@ -26,6 +26,15 @@
+
+
+

+
+
handleLike(idx, 'like')" >
+
handleLike(idx, 'dislike')" >
+
+
+
@@ -239,6 +248,63 @@ const onSubmit = async (e, answer = undefined) => {
});
};
+// 刷新回答(重新发送上一个用户问题)
+const handleRefresh = (index: number) => {
+ const currentMsg = messages.value[index];
+ if (currentMsg.role === 'ai-model' && currentMsg.question) { // 假设AI回答的question字段存储了用户原始问题
+ onSubmit(currentMsg.question); // 调用原有发送方法
+ }
+};
+
+// 复制回答内容
+const handleFile = (index: number) => {
+ const currentMsg = messages.value[index];
+ if (currentMsg.role === 'ai-model') {
+ const content = currentMsg.content || '';
+ // 处理富文本或特殊格式(示例中直接提取文本)
+ const textContent = typeof content === 'string' ? content : JSON.stringify(content);
+
+ // 执行复制操作
+ const textarea = document.createElement('textarea');
+ textarea.value = textContent;
+ document.body.appendChild(textarea);
+ textarea.select();
+ document.execCommand('copy');
+ document.body.removeChild(textarea);
+
+ Message.success('内容已复制');
+ }
+};
+
+// 点赞/点踩处理
+const handleLike = (index: number, type: 'like' | 'dislike') => {
+ const currentMsg = messages.value[index];
+ if (currentMsg.role === 'ai-model' && currentMsg.id) { // 假设消息有唯一ID
+ messages.value[currentMsg.id].islike = type;
+
+ // // 调用接口(示例中需替换为实际API)
+ // axios.post('/api/rateConversation', {
+ // conversationId: CONV_ID.value, // 会话ID
+ // messageId: currentMsg.id, // 消息ID
+ // type: type === 'like' ? 1 : 2 // 1=点赞,2=点踩
+ // }).then(() => {
+ // Message.success(type === 'like' ? '点赞成功' : '点踩成功');
+ // }).catch(() => {
+ // messageReactions.value[currentMsg.id] = null; // 失败时回滚状态
+ // Message.error('操作失败');
+ // });
+ }
+};
+
+// 智能客服与更多操作(示例中暂留空逻辑,可根据需求扩展)
+const handleCustomerService = () => {
+ Message.info('智能客服功能即将上线');
+};
+
+const handleMore = () => {
+ Message.info('更多操作功能待开发');
+};
+
const VITE_AI_API_HOST = (import.meta as any).env.VITE_AI_API_HOST;
// AI对话接口对接
@@ -410,7 +476,6 @@ const getConversationDetail = async (convId: string) => {
// 处理详情数据(示例:更新消息列表)
const handleDetailResponse = (detail: any) => {
- debugger
// 假设接口返回消息列表为 messagesList
messages.value = detail.map(i=>{
let messages = i;
@@ -589,6 +654,7 @@ onMounted(() => {
}
:deep(.mc-bubble-left) {
.mc-bubble-content-container {
+ position: relative;
background: transparent;
width: 100%;
.span1{
@@ -603,6 +669,18 @@ onMounted(() => {
.mc-bubble-content.filled {
background: transparent;
}
+
+
+ .bubble-bottom-operations {
+ position: absolute;
+ right: 20px;
+ bottom: 20px;
+ display: flex;
+ gap: 8px; /* 图标之间的间隔 */
+ align-items: center; /* 垂直居中图标 */
+ justify-content: end;
+ font-size: 14px;
+ }
}
}
.conversation-cnxw {