From dd99f8a22039734e870227e81a5891c3ac29dc0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E6=9D=B0?= Date: Fri, 15 Aug 2025 14:59:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=A4=E4=B8=AA=E6=A8=A1=E5=9E=8B=E7=9A=84?= =?UTF-8?q?=E6=80=9D=E8=80=83=E8=BF=87=E7=A8=8B=E4=BF=AE=E6=94=B9=E5=AE=8C?= =?UTF-8?q?=E6=88=90=EF=BC=9B=E6=83=85=E7=BB=AA=E5=A4=A7=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=AE=A1=E7=AE=97=E5=B1=9E=E6=80=A7=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E5=AF=B9=E8=AF=9D=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/AIchat.vue | 12 ++- src/views/AiEmotion.vue | 229 ++++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 218 insertions(+), 23 deletions(-) diff --git a/src/views/AIchat.vue b/src/views/AIchat.vue index 1c192c8..7039163 100644 --- a/src/views/AIchat.vue +++ b/src/views/AIchat.vue @@ -956,7 +956,7 @@ async function showThinkingProcess(stockName = null) { class: "ing", type: "ing", flag: true, - content: "正在思考......", + content: "夺宝奇兵大模型正在思考", gif: thinkingGif, }); chatStore.messages.push(thinkingMessage1); @@ -969,7 +969,7 @@ async function showThinkingProcess(stockName = null) { class: "ing", type: "ing", flag: true, - content: "正在解析关键数据......", + content: "正在解析关键数据", gif: analyzeGif, }); chatStore.messages.push(thinkingMessage2); @@ -989,7 +989,7 @@ async function showThinkingProcess(stockName = null) { class: "ing", type: "ing", flag: true, - content: `正在生成${stockName}全景作战报告......`, + content: `正在生成${stockName}全景作战报告`, gif: generateGif, }); chatStore.messages.push(thinkingMessage3); @@ -1001,7 +1001,6 @@ async function showThinkingProcess(stockName = null) { sender: "ai", class: "ing", type: "ing", - flag: true, content: "报告已生成!", }); chatStore.messages.push(thinkingMessage4); @@ -1030,7 +1029,7 @@ async function continueThinkingProcess(thinkingMessageRef, stockName) { class: "ing", type: "ing", flag: true, - content: `正在生成${stockName}全景作战报告......`, + content: `正在生成${stockName}全景作战报告`, gif: generateGif, }); chatStore.messages.push(thinkingMessage3); @@ -1042,7 +1041,6 @@ async function continueThinkingProcess(thinkingMessageRef, stockName) { sender: "ai", class: "ing", type: "ing", - flag: true, content: "报告已生成!", }); chatStore.messages.push(thinkingMessage4); @@ -4957,7 +4955,7 @@ p { /* AI消息容器样式 */ .ai-message-container { display: flex; - align-items: flex-start; + align-items: center; gap: 10px; margin-right: auto; max-width: 80%; diff --git a/src/views/AiEmotion.vue b/src/views/AiEmotion.vue index 3c2cd6f..7fae274 100644 --- a/src/views/AiEmotion.vue +++ b/src/views/AiEmotion.vue @@ -30,7 +30,18 @@
思考过程
- {{ message.text }} +
+ {{ message.text }} + + . + . + . + . + . + . + +
+
{{ message.text }}
@@ -49,8 +60,9 @@ - -
+ + +
@@ -675,6 +687,20 @@ const parsedConclusion = computed(() => { } }); +// 多股票数据显示的计算属性 +// 过滤和排序后的股票列表 +const filteredStockList = computed(() => { + return emotionStore.stockList + .filter(stock => { + // 过滤掉数据不完整的股票 + return stock.stockInfo?.name && stock.apiData && stock.queryText; + }) + .sort((a, b) => { + // 按时间戳降序排序,最新的在前 + return new Date(a.timestamp) - new Date(b.timestamp); + }); +}); + // 辅助函数:获取股票的显示日期 const getDisplayDate = (stock) => { if (!stock?.apiData) return ""; @@ -1630,8 +1656,9 @@ async function showThinkingProcess(stockName = null) { // 第一步:正在思考 const thinkingMessage1 = reactive({ sender: 'ai', - text: 'AI情绪大模型正在思考......', - gif: thinkingGif + text: 'AI情绪大模型正在思考', + gif: thinkingGif, + flag: true // 添加flag属性以显示动态加载点 }); messages.value.push(thinkingMessage1); await new Promise(resolve => setTimeout(resolve, 1500)); @@ -1640,8 +1667,9 @@ async function showThinkingProcess(stockName = null) { // 第二步:正在解析关键数据(持续显示直到获取到股票名称) const thinkingMessage2 = reactive({ sender: 'ai', - text: 'AI情绪大模型正在解析关键数据......', - gif: analyzeGif + text: '正在解析关键数据', + gif: analyzeGif, + flag: true // 添加flag属性以显示动态加载点 }); messages.value.push(thinkingMessage2); @@ -1657,8 +1685,9 @@ async function showThinkingProcess(stockName = null) { // 第三步:生成具体股票的量子四维矩阵图 const thinkingMessage3 = reactive({ sender: 'ai', - text: `AI情绪大模型正在生成${stockName}量子四维矩阵图......`, - gif: generateGif + text: `正在生成${stockName}量子四维矩阵图`, + gif: generateGif, + flag: true // 添加flag属性以显示动态加载点 }); messages.value.push(thinkingMessage3); await new Promise(resolve => setTimeout(resolve, 1500)); @@ -1689,8 +1718,9 @@ async function continueThinkingProcess(thinkingMessageRef, stockName) { // 第三步:生成具体股票的量子四维矩阵图 const thinkingMessage3 = reactive({ sender: 'ai', - text: `正在生成${stockName}量子四维矩阵图......`, - gif: generateGif + text: `正在生成${stockName}量子四维矩阵图`, + gif: generateGif, + flag: true // 添加flag属性以显示动态加载点 }); messages.value.push(thinkingMessage3); @@ -3007,6 +3037,129 @@ const emit = defineEmits(['updateMessage', 'sendMessage', 'ensureAIchat']);