Browse Source

调用接口时禁止点击

milestone-20250924-接入大财神工作流
no99 20 hours ago
parent
commit
be0b2a6a91
  1. 20
      src/views/components/HistoryRecord.vue
  2. 44
      src/views/deepNine.vue

20
src/views/components/HistoryRecord.vue

@ -713,10 +713,12 @@ const closeHistory = () => {
const historyData = ref({}); const historyData = ref({});
const selectRecord = async (record) => { 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("正在获取回复中,请稍后"); ElMessage.warning("正在获取回复中,请稍后");
return; return;
} }
@ -749,7 +751,7 @@ const selectRecord = async (record) => {
dataStore.isFeedback = false; dataStore.isFeedback = false;
historyData.value = result.data; historyData.value = result.data;
chatStore.dbqbClickRecord = historyData.value; chatStore.dbqbClickRecord = historyData.value;
deepNineStore.dbqbClickRecord=historyData.value
deepNineStore.dbqbClickRecord = historyData.value;
// //
const stockData = { const stockData = {
queryText: result.data.keyword, // 使keyword queryText: result.data.keyword, // 使keyword
@ -822,6 +824,10 @@ const handleAnnouncementClick = () => {
ElMessage.warning("正在获取回复中,请稍后"); ElMessage.warning("正在获取回复中,请稍后");
return; return;
} }
if (props.currentType == "deepNine" && deepNineStore.firstAPICall) {
ElMessage.warning("正在获取回复中,请稍后");
return;
}
emit("showAnnouncement"); emit("showAnnouncement");
}; };
@ -831,6 +837,10 @@ const handleFeedbackClick = () => {
ElMessage.warning("正在获取回复中,请稍后"); ElMessage.warning("正在获取回复中,请稍后");
return; return;
} }
if (props.currentType == "deepNine" && deepNineStore.firstAPICall) {
ElMessage.warning("正在获取回复中,请稍后");
return;
}
emit("showFeedback"); emit("showFeedback");
}; };

44
src/views/deepNine.vue

@ -712,8 +712,8 @@ const createTypingEffect = (message, content, speed) => {
flag: false, flag: false,
content: "系统正在为您努力加载中,请稍后再试", content: "系统正在为您努力加载中,请稍后再试",
}); });
chatStore.isLoading = false;
chatStore.chatInput = false;
homepageChatStore.isLoading = false;
homepageChatStore.deepNineInput = false;
emit("enableInput"); emit("enableInput");
if (message.error == "2") { if (message.error == "2") {
apiStatus.two.isError = true; apiStatus.two.isError = true;
@ -723,9 +723,9 @@ const createTypingEffect = (message, content, speed) => {
} }
if (message.end) { if (message.end) {
homepageChatStore.getUserCount(); homepageChatStore.getUserCount();
chatStore.isLoading = false;
homepageChatStore.isLoading = false;
console.log("打印完毕,接触输入框禁用状态"); console.log("打印完毕,接触输入框禁用状态");
chatStore.chatInput = false;
homepageChatStore.deepNineInput = false;
emit("enableInput"); emit("enableInput");
} }
message.isTyping = false; message.isTyping = false;
@ -810,8 +810,8 @@ const createTypingEffect = (message, content, speed) => {
flag: false, flag: false,
content: "系统正在为您努力加载中,请稍后再试", content: "系统正在为您努力加载中,请稍后再试",
}); });
chatStore.isLoading = false;
chatStore.chatInput = false;
homepageChatStore.isLoading = false;
homepageChatStore.deepNineInput = false;
emit("enableInput"); emit("enableInput");
if (message.error == "2") { if (message.error == "2") {
apiStatus.two.isError = true; apiStatus.two.isError = true;
@ -840,8 +840,8 @@ const createTypingEffect = (message, content, speed) => {
flag: false, flag: false,
content: "系统正在为您努力加载中,请稍后再试", content: "系统正在为您努力加载中,请稍后再试",
}); });
chatStore.isLoading = false;
chatStore.chatInput = false;
homepageChatStore.isLoading = false;
homepageChatStore.deepNineInput = false;
emit("enableInput"); emit("enableInput");
if (message.error == "2") { if (message.error == "2") {
apiStatus.two.isError = true; apiStatus.two.isError = true;
@ -1134,8 +1134,8 @@ watch(
chatStore.messages.push(aiMsg); chatStore.messages.push(aiMsg);
chatStore.isLoading = false;
chatStore.chatInput = false;
homepageChatStore.isLoading = false;
homepageChatStore.deepNineInput = false;
chatStore.firstAPICall = false; chatStore.firstAPICall = false;
console.log("历史记录可以点击"); console.log("历史记录可以点击");
@ -1157,8 +1157,8 @@ watch(
flag: false, flag: false,
content: "系统正在为您努力加载中,请稍后再试", content: "系统正在为您努力加载中,请稍后再试",
}); });
chatStore.isLoading = false;
chatStore.chatInput = false;
homepageChatStore.isLoading = false;
homepageChatStore.deepNineInput = false;
chatStore.firstAPICall = false; chatStore.firstAPICall = false;
console.log("历史记录可以点击"); console.log("历史记录可以点击");
emit("enableInput"); emit("enableInput");
@ -1497,8 +1497,8 @@ watch(
flag: false, flag: false,
content: "系统正在为您努力加载中,请稍后再试", content: "系统正在为您努力加载中,请稍后再试",
}); });
chatStore.isLoading = false;
chatStore.chatInput = false;
homepageChatStore.isLoading = false;
homepageChatStore.deepNineInput = false;
emit("enableInput"); emit("enableInput");
} }
} }
@ -1610,8 +1610,8 @@ watch(
flag: false, flag: false,
content: "系统正在为您努力加载中,请稍后再试", content: "系统正在为您努力加载中,请稍后再试",
}); });
chatStore.isLoading = false;
chatStore.chatInput = false;
homepageChatStore.isLoading = false;
homepageChatStore.deepNineInput = false;
emit("enableInput"); emit("enableInput");
} }
} }
@ -1696,8 +1696,8 @@ watch(
flag: false, flag: false,
content: "系统正在为您努力加载中,请稍后再试", content: "系统正在为您努力加载中,请稍后再试",
}); });
chatStore.isLoading = false;
chatStore.chatInput = false;
homepageChatStore.isLoading = false;
homepageChatStore.deepNineInput = false;
emit("enableInput"); emit("enableInput");
} }
} }
@ -1868,8 +1868,8 @@ watch(
flag: false, flag: false,
content: "数据缺失,请稍后重试", content: "数据缺失,请稍后重试",
}); });
chatStore.isLoading = false;
chatStore.chatInput = false;
homepageChatStore.isLoading = false;
homepageChatStore.deepNineInput = false;
chatStore.firstAPICall = false; chatStore.firstAPICall = false;
emit("enableInput"); emit("enableInput");
} }
@ -1958,8 +1958,8 @@ watch(
isTypingInProgress.value = false; isTypingInProgress.value = false;
// 4. // 4.
chatStore.isLoading = false;
chatStore.chatInput = false;
homepageChatStore.isLoading = false;
homepageChatStore.deepNineInput = false;
emit("enableInput"); emit("enableInput");
// dbqbClickRecord // dbqbClickRecord

Loading…
Cancel
Save