|
|
@ -396,6 +396,8 @@ 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"; |
|
|
|
const router = useRouter(); |
|
|
|
|
|
|
@ -455,7 +457,6 @@ const categoryHistory = ref([]); |
|
|
|
let chatFirstFlag = true; |
|
|
|
let emotionTirstFlag = true; |
|
|
|
|
|
|
|
|
|
|
|
const getHistoryList = async (params) => { |
|
|
|
try { |
|
|
|
const result = await getHistoryListAPI(params); |
|
|
@ -474,14 +475,12 @@ const getHistoryList = async (params) => { |
|
|
|
|
|
|
|
if (chatFirstFlag && params.model == 1 && result.data.length != 0) { |
|
|
|
if (!isMobile.value) { |
|
|
|
|
|
|
|
chatStore.aiChatCall = true; |
|
|
|
} |
|
|
|
chatFirstFlag = false; |
|
|
|
} |
|
|
|
if (emotionTirstFlag && params.model == 2 && result.data.length != 0) { |
|
|
|
if (!isMobile.value) { |
|
|
|
|
|
|
|
chatStore.aiEmotionCall = true; |
|
|
|
} |
|
|
|
emotionTirstFlag = false; |
|
|
@ -490,7 +489,6 @@ const getHistoryList = async (params) => { |
|
|
|
// 只在首次加载时根据chatStore状态设置折叠状态,避免搜索后自动弹出历史记录 |
|
|
|
|
|
|
|
if (isMobile.value) { |
|
|
|
|
|
|
|
console.log("移动设备默认关闭"); |
|
|
|
isCollapsed.value = true; |
|
|
|
} else { |
|
|
@ -689,6 +687,7 @@ const selectRecord = async (record) => { |
|
|
|
chatStore.aiEmotionCall = false; |
|
|
|
} |
|
|
|
} |
|
|
|
dataStore.isFeedback = false; |
|
|
|
historyData.value = result.data; |
|
|
|
chatStore.dbqbClickRecord = historyData.value; |
|
|
|
// 构造股票数据对象,保持与现有结构一致 |
|
|
|