|
@@ -1,8 +1,8 @@
|
|
<template>
|
|
<template>
|
|
- <div class="border-gray-200 border rounded p-3 h-full flex flex-col" style="min-height: 750px; max-height: 750px;">
|
|
|
|
|
|
+ <div class="border-gray-200 p-3 h-full flex flex-col" style="min-height: 750px; max-height: 750px;">
|
|
<div class="text-sm font-medium mb-3 flex justify-between">
|
|
<div class="text-sm font-medium mb-3 flex justify-between">
|
|
<span style="color: #075985">DeepSeek大模型CRM数据分析</span>
|
|
<span style="color: #075985">DeepSeek大模型CRM数据分析</span>
|
|
- <span class="text-gray-500">开会做PPT利器!</span>
|
|
|
|
|
|
+ <span class="text-gray-500 text-right">开会做PPT利器!</span>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!-- Chat messages container with fixed height and scrolling -->
|
|
<!-- Chat messages container with fixed height and scrolling -->
|
|
@@ -76,7 +76,7 @@
|
|
<el-select
|
|
<el-select
|
|
v-model="selectedReportId"
|
|
v-model="selectedReportId"
|
|
size="small"
|
|
size="small"
|
|
- style="width: 120px"
|
|
|
|
|
|
+ style="width: 200px"
|
|
placeholder="选择报表"
|
|
placeholder="选择报表"
|
|
@focus="loadCustomReports"
|
|
@focus="loadCustomReports"
|
|
>
|
|
>
|
|
@@ -100,7 +100,7 @@
|
|
</el-upload>
|
|
</el-upload>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <div class="ml-auto">
|
|
|
|
|
|
+ <div v-if="dataSource === 'system'" class="ml-auto">
|
|
<span class="text-sm mr-2">时间段</span>
|
|
<span class="text-sm mr-2">时间段</span>
|
|
<el-date-picker
|
|
<el-date-picker
|
|
v-model="dateRange"
|
|
v-model="dateRange"
|
|
@@ -396,6 +396,14 @@ onMounted(async () => {
|
|
console.error('Failed to load chat history:', error);
|
|
console.error('Failed to load chat history:', error);
|
|
messages.push({ role: 'assistant', content: '你好,需要分析查询哪些数据,请交给我' });
|
|
messages.push({ role: 'assistant', content: '你好,需要分析查询哪些数据,请交给我' });
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ // 触发滚动到底部
|
|
|
|
+ nextTick(() => {
|
|
|
|
+ const container = document.querySelector('.overflow-y-auto');
|
|
|
|
+ if (container) {
|
|
|
|
+ container.scrollTop = container.scrollHeight;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
});
|
|
});
|
|
|
|
|
|
const sendMessage = async () => {
|
|
const sendMessage = async () => {
|
|
@@ -466,7 +474,15 @@ const sendMessage = async () => {
|
|
if (questionId.value) {
|
|
if (questionId.value) {
|
|
params.questionId = questionId.value;
|
|
params.questionId = questionId.value;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ // reset message input
|
|
|
|
+ inputMessage.value = '';
|
|
|
|
+ //上方聊天记录页面自动滚动到最下面
|
|
|
|
+ nextTick(() => {
|
|
|
|
+ const container = document.querySelector('.overflow-y-auto');
|
|
|
|
+ if (container) {
|
|
|
|
+ container.scrollTop = container.scrollHeight;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
const result = await askAIQuestion(params);
|
|
const result = await askAIQuestion(params);
|
|
messages[thinkingIndex] = {
|
|
messages[thinkingIndex] = {
|
|
role: 'assistant',
|
|
role: 'assistant',
|
|
@@ -483,7 +499,6 @@ const sendMessage = async () => {
|
|
};
|
|
};
|
|
}
|
|
}
|
|
|
|
|
|
- inputMessage.value = '';
|
|
|
|
loading.value = false;
|
|
loading.value = false;
|
|
// 触发滚动到底部
|
|
// 触发滚动到底部
|
|
nextTick(() => {
|
|
nextTick(() => {
|