diff --git a/src/views/components/HistoryRecord.vue b/src/views/components/HistoryRecord.vue index 9e202b1..8d1c1a6 100644 --- a/src/views/components/HistoryRecord.vue +++ b/src/views/components/HistoryRecord.vue @@ -713,10 +713,12 @@ const closeHistory = () => { const historyData = ref({}); const selectRecord = async (record) => { - if ( - (props.currentType == "AIchat" || props.currentType == "deepNine") && - chatStore.firstAPICall - ) { + if (props.currentType == "AIchat" && chatStore.firstAPICall) { + ElMessage.warning("正在获取回复中,请稍后"); + return; + } + + if (props.currentType == "deepNine" && deepNineStore.firstAPICall) { ElMessage.warning("正在获取回复中,请稍后"); return; } @@ -749,7 +751,7 @@ const selectRecord = async (record) => { dataStore.isFeedback = false; historyData.value = result.data; chatStore.dbqbClickRecord = historyData.value; - deepNineStore.dbqbClickRecord=historyData.value + deepNineStore.dbqbClickRecord = historyData.value; // 构造股票数据对象,保持与现有结构一致 const stockData = { queryText: result.data.keyword, // 使用记录中的keyword字段作为查询文本 @@ -822,6 +824,10 @@ const handleAnnouncementClick = () => { ElMessage.warning("正在获取回复中,请稍后"); return; } + if (props.currentType == "deepNine" && deepNineStore.firstAPICall) { + ElMessage.warning("正在获取回复中,请稍后"); + return; + } emit("showAnnouncement"); }; @@ -831,6 +837,10 @@ const handleFeedbackClick = () => { ElMessage.warning("正在获取回复中,请稍后"); return; } + if (props.currentType == "deepNine" && deepNineStore.firstAPICall) { + ElMessage.warning("正在获取回复中,请稍后"); + return; + } emit("showFeedback"); }; diff --git a/src/views/deepNine.vue b/src/views/deepNine.vue index 937465f..d3b90f7 100644 --- a/src/views/deepNine.vue +++ b/src/views/deepNine.vue @@ -712,8 +712,8 @@ const createTypingEffect = (message, content, speed) => { flag: false, content: "系统正在为您努力加载中,请稍后再试", }); - chatStore.isLoading = false; - chatStore.chatInput = false; + homepageChatStore.isLoading = false; + homepageChatStore.deepNineInput = false; emit("enableInput"); if (message.error == "2") { apiStatus.two.isError = true; @@ -723,9 +723,9 @@ const createTypingEffect = (message, content, speed) => { } if (message.end) { homepageChatStore.getUserCount(); - chatStore.isLoading = false; + homepageChatStore.isLoading = false; console.log("打印完毕,接触输入框禁用状态"); - chatStore.chatInput = false; + homepageChatStore.deepNineInput = false; emit("enableInput"); } message.isTyping = false; @@ -810,8 +810,8 @@ const createTypingEffect = (message, content, speed) => { flag: false, content: "系统正在为您努力加载中,请稍后再试", }); - chatStore.isLoading = false; - chatStore.chatInput = false; + homepageChatStore.isLoading = false; + homepageChatStore.deepNineInput = false; emit("enableInput"); if (message.error == "2") { apiStatus.two.isError = true; @@ -840,8 +840,8 @@ const createTypingEffect = (message, content, speed) => { flag: false, content: "系统正在为您努力加载中,请稍后再试", }); - chatStore.isLoading = false; - chatStore.chatInput = false; + homepageChatStore.isLoading = false; + homepageChatStore.deepNineInput = false; emit("enableInput"); if (message.error == "2") { apiStatus.two.isError = true; @@ -1134,8 +1134,8 @@ watch( chatStore.messages.push(aiMsg); - chatStore.isLoading = false; - chatStore.chatInput = false; + homepageChatStore.isLoading = false; + homepageChatStore.deepNineInput = false; chatStore.firstAPICall = false; console.log("历史记录可以点击"); @@ -1157,8 +1157,8 @@ watch( flag: false, content: "系统正在为您努力加载中,请稍后再试", }); - chatStore.isLoading = false; - chatStore.chatInput = false; + homepageChatStore.isLoading = false; + homepageChatStore.deepNineInput = false; chatStore.firstAPICall = false; console.log("历史记录可以点击"); emit("enableInput"); @@ -1497,8 +1497,8 @@ watch( flag: false, content: "系统正在为您努力加载中,请稍后再试", }); - chatStore.isLoading = false; - chatStore.chatInput = false; + homepageChatStore.isLoading = false; + homepageChatStore.deepNineInput = false; emit("enableInput"); } } @@ -1610,8 +1610,8 @@ watch( flag: false, content: "系统正在为您努力加载中,请稍后再试", }); - chatStore.isLoading = false; - chatStore.chatInput = false; + homepageChatStore.isLoading = false; + homepageChatStore.deepNineInput = false; emit("enableInput"); } } @@ -1696,8 +1696,8 @@ watch( flag: false, content: "系统正在为您努力加载中,请稍后再试", }); - chatStore.isLoading = false; - chatStore.chatInput = false; + homepageChatStore.isLoading = false; + homepageChatStore.deepNineInput = false; emit("enableInput"); } } @@ -1868,8 +1868,8 @@ watch( flag: false, content: "数据缺失,请稍后重试", }); - chatStore.isLoading = false; - chatStore.chatInput = false; + homepageChatStore.isLoading = false; + homepageChatStore.deepNineInput = false; chatStore.firstAPICall = false; emit("enableInput"); } @@ -1958,8 +1958,8 @@ watch( isTypingInProgress.value = false; // 4. 重置加载状态 - chatStore.isLoading = false; - chatStore.chatInput = false; + homepageChatStore.isLoading = false; + homepageChatStore.deepNineInput = false; emit("enableInput"); // 在下一个事件循环中清空 dbqbClickRecord