diff --git a/src/views/components/HistoryRecord.vue b/src/views/components/HistoryRecord.vue index 85d317d..e6671e7 100644 --- a/src/views/components/HistoryRecord.vue +++ b/src/views/components/HistoryRecord.vue @@ -417,6 +417,7 @@ import moment from "moment"; import { ElMessage } from "element-plus"; import { useChatStore } from "../../store/chat"; const chatStore = useChatStore(); + import { useDataStore } from "@/store/dataList.js"; const dataStore = useDataStore(); import { useRouter } from "vue-router"; @@ -537,7 +538,7 @@ const getHistoryList = async (params) => { } else if (props.currentType == "AiEmotion") { isCollapsed.value = !chatStore.aiEmotionCall; console.log("情绪大模型页面", isCollapsed.value); - }else if (props.currentType == "deepNine") { + } else if (props.currentType == "deepNine") { isCollapsed.value = !chatStore.deepNineCall; console.log("深度九大模型页面", isCollapsed.value); } @@ -642,12 +643,22 @@ const changeTopStatus = async (isTop, id) => { } await changeTop({ - model: props.currentType == "AIchat" ? 1 : props.currentType == "AiEmotion" ? 2 : 3, + model: + props.currentType == "AIchat" + ? 1 + : props.currentType == "AiEmotion" + ? 2 + : 3, recordId: id, isTop: isTop == 1 ? 0 : 1, }); await getHistoryList({ - model: props.currentType == "AIchat" ? 1 : props.currentType == "AiEmotion" ? 2 : 3, + model: + props.currentType == "AIchat" + ? 1 + : props.currentType == "AiEmotion" + ? 2 + : 3, token: localStorage.getItem("localToken"), }); } catch (error) { @@ -676,7 +687,7 @@ const openHistory = () => { chatStore.aiChatCall = true; } else if (props.currentType == "AiEmotion") { chatStore.aiEmotionCall = true; - }else if (props.currentType == "deepNine") { + } else if (props.currentType == "deepNine") { chatStore.deepNineCall = true; } }; @@ -687,14 +698,17 @@ const closeHistory = () => { chatStore.aiChatCall = false; } else if (props.currentType == "AiEmotion") { chatStore.aiEmotionCall = false; - }else if (props.currentType == "deepNine") { + } else if (props.currentType == "deepNine") { chatStore.deepNineCall = false; } }; const historyData = ref({}); const selectRecord = async (record) => { - if (props.currentType == "AIchat" && chatStore.firstAPICall) { + if ( + (props.currentType == "AIchat" || props.currentType == "deepNine") && + chatStore.firstAPICall + ) { ElMessage.warning("正在获取回复中,请稍后"); return; } @@ -702,7 +716,12 @@ const selectRecord = async (record) => { try { selectedRecordId.value = record.id; const result = await clickRecordAPI({ - model: props.currentType == "AIchat" ? 1 : props.currentType == "AiEmotion" ? 2 : 3, + model: + props.currentType == "AIchat" + ? 1 + : props.currentType == "AiEmotion" + ? 2 + : 3, parentId: record.parentId, recordId: record.id, }); @@ -715,13 +734,14 @@ const selectRecord = async (record) => { chatStore.aiChatCall = false; } else if (props.currentType == "AiEmotion") { chatStore.aiEmotionCall = false; - }else if (props.currentType == "deepNine") { + } else if (props.currentType == "deepNine") { chatStore.deepNineCall = false; } } dataStore.isFeedback = false; historyData.value = result.data; chatStore.dbqbClickRecord = historyData.value; + deepNineStore.dbqbClickRecord=historyData.value // 构造股票数据对象,保持与现有结构一致 const stockData = { queryText: result.data.keyword, // 使用记录中的keyword字段作为查询文本 @@ -764,13 +784,23 @@ const deleteRecord = (id) => { const deleteRecordConfirm = async () => { try { const result = await deleteRecordAPI({ - model: props.currentType == "AIchat" ? 1 : props.currentType == "AiEmotion" ? 2 : 3, + model: + props.currentType == "AIchat" + ? 1 + : props.currentType == "AiEmotion" + ? 2 + : 3, recordId: delObj.value.id, }); console.log(result.msg); closeDeleteDialog(); await getHistoryList({ - model: props.currentType == "AIchat" ? 1 : props.currentType == "AiEmotion" ? 2 : 3, + model: + props.currentType == "AIchat" + ? 1 + : props.currentType == "AiEmotion" + ? 2 + : 3, token: localStorage.getItem("localToken"), }); } catch (e) { @@ -802,7 +832,12 @@ watch( (newVal) => { if (chatStore.searchRecord) { getHistoryList({ - model: props.currentType == "AIchat" ? 1 : props.currentType == "AiEmotion" ? 2 : 3, + model: + props.currentType == "AIchat" + ? 1 + : props.currentType == "AiEmotion" + ? 2 + : 3, token: localStorage.getItem("localToken"), }); chatStore.searchRecord = false; @@ -819,7 +854,12 @@ watch( (newVal) => { if (deepNineStore.searchRecord) { getHistoryList({ - model: props.currentType == "deepNine" ? 3 : props.currentType == "AIchat" ? 1 : 2, + model: + props.currentType == "deepNine" + ? 3 + : props.currentType == "AIchat" + ? 1 + : 2, token: localStorage.getItem("localToken"), }); deepNineStore.searchRecord = false; diff --git a/src/views/deepNine.vue b/src/views/deepNine.vue index a5381ef..937465f 100644 --- a/src/views/deepNine.vue +++ b/src/views/deepNine.vue @@ -1569,11 +1569,9 @@ watch( // const ac33 = result22.data.zjqssc1; - const ac34 = `

【资金趋势导航】

`; const ac35 = result22.data.zjqssc1; - // const ac3 = `

${result23.data.DXTSC}

${result23.data.DXTSC2}

${result23.data.ZJQSSC1}

`; const ac3Arr = []; ac3Arr.push(ac31); @@ -1976,8 +1974,7 @@ watch( if ( !clickRecord.value.wokeFlowData.One || !clickRecord.value.wokeFlowData.Two || - !clickRecord.value.wokeFlowData.Three || - !clickRecord.value.wokeFlowData.Four + !clickRecord.value.wokeFlowData.Three ) { return; } @@ -1985,18 +1982,25 @@ watch( // 清空聊天框内容 chatStore.messages = []; - chatStore.messages.push({ + const userAudioArray = [ + clickRecord.value.wokeFlowData.One.link1, + clickRecord.value.wokeFlowData.One.link, + clickRecord.value.wokeFlowData.Two.link3, + ]; + // if (clickRecord.value.wokeFlowData.Two.link2) { + // userAudioArray.push(clickRecord.value.wokeFlowData.Two.link2); + // } + userAudioArray.push(clickRecord.value.wokeFlowData.Two.link1); + userAudioArray.push(clickRecord.value.wokeFlowData.Three.link); + const userContent = { sender: "user", timestamp: clickRecord.value.createdTime, content: clickRecord.value.keyword, - audioArray: [ - clickRecord.value.wokeFlowData.One.url, - clickRecord.value.wokeFlowData.Two.url, - clickRecord.value.wokeFlowData.Three.url, - clickRecord.value.wokeFlowData.Four.url, - ], + audioArray: userAudioArray, audioStatus: false, - }); + }; + + chatStore.messages.push(userContent); chatStore.messages.push({ sender: "ai", @@ -2021,7 +2025,7 @@ watch( content: pc1, }); - const nineTurns = clickRecord.value.stockData.nineTurns; + const nineTurns = clickRecord.value.stockData.data; // 度牛尺K线图 if ( nineTurns && @@ -2096,6 +2100,7 @@ watch( } }); } + // 添加标题-数据分析时代下的认知变现 chatStore.messages.push({ sender: "ai", class: "title2", @@ -2103,64 +2108,64 @@ watch( content: "", }); - const pc2 = marked(clickRecord.value.wokeFlowData.Two.hxjzpg); - // 先推送初始消息 + // 添加图片-数据分析时代下的认知变现 chatStore.messages.push({ sender: "ai", class: "content3", - type: "content3", - content: pc2, + type: "img1", + content: + "https://d31zlh4on95l9h.cloudfront.net/images/5baa0a449cf74fb6a1afb1c909a21194.png", }); + // 添加标题-结构框架分析 chatStore.messages.push({ sender: "ai", class: "title3", type: "title3", - content: title2, + content: + "https://d31zlh4on95l9h.cloudfront.net/images/9ab9d76b6906eb914fa1842dbcd56841.png", }); - const ac3 = `

【主力行为】

${clickRecord.value.wokeFlowData.Three.zhuli1}

${clickRecord.value.wokeFlowData.Three.zhuli2}

${clickRecord.value.wokeFlowData.Three.zhuli3}

`; - + // 添加内容框1 + const pc2 = marked(clickRecord.value.wokeFlowData.One.jgkjfx); // 先推送初始消息 chatStore.messages.push({ sender: "ai", class: "content3", type: "content3", - content: ac3, - isTyping: true, + content: pc2, }); - + // 添加标题-资金动向监控 chatStore.messages.push({ sender: "ai", class: "title3", type: "title3", - content: title3, + content: + " https://d31zlh4on95l9h.cloudfront.net/images/f95c44f83b3e3c52e88964631c199060.png", }); - const arr = clickRecord.value.wokeFlowData.Three.kongjian.split(","); - const kongjian = `

【空间维度】

${arr[0]},${arr[1]}

${arr[2]},${arr[3]}

`; - const shijian = `

【时间维度】

${clickRecord.value.wokeFlowData.Three.shijian}

`; - const nengliang = `

【能量维度】

${clickRecord.value.wokeFlowData.Three.nengliang}

`; - const ac4 = kongjian + shijian + nengliang; + const ac3 = `

【资金异动信号】

${clickRecord.value.wokeFlowData.Two.dxtsc}

【资金趋势导航】

${clickRecord.value.wokeFlowData.Two.zjqssc1}

`; // 先推送初始消息 chatStore.messages.push({ sender: "ai", class: "content3", type: "content3", - content: ac4, + content: ac3, + isTyping: true, }); + // 添加标题-策略共振决策模型 chatStore.messages.push({ sender: "ai", class: "title3", type: "title3", - content: title4, + content: + "https://d31zlh4on95l9h.cloudfront.net/images/ce71f75008422ed70e88b1ae0bc4d550.png", }); - const cftj = `

【触发条件】

${clickRecord.value.wokeFlowData.Four.cftl}

`; - const gfzl = `

【攻防指令】

${clickRecord.value.wokeFlowData.Four.gfzl}

`; - const ac5 = cftj + gfzl; + // 添加内容框4 + const ac5 = `

${clickRecord.value.wokeFlowData.Three.zjqssc2}

`; // 先推送初始消息 chatStore.messages.push({ @@ -2169,7 +2174,6 @@ watch( type: "content3", content: ac5, }); - chatStore.messages.push({ sender: "ai", class: "mianze",