Browse Source

Merge branch 'milestone-20250924-接入大财神工作流' of http://39.101.133.168:8807/hongxilin/AIxiaocaishen into milestone-20250924-接入大财神工作流

milestone-20250924-接入大财神工作流
宋杰 2 weeks ago
parent
commit
523196f2c5
  1. 33
      src/views/components/HistoryRecord.vue
  2. 26
      src/views/deepNine.vue
  3. 2
      src/views/homePage.vue

33
src/views/components/HistoryRecord.vue

@ -199,7 +199,7 @@
src="https://d31zlh4on95l9h.cloudfront.net/images/3f7a1cb3dd6c5f9d4163fab4d26b4f4f.png" src="https://d31zlh4on95l9h.cloudfront.net/images/3f7a1cb3dd6c5f9d4163fab4d26b4f4f.png"
alt="icon" alt="icon"
/> />
<div style="color: aliceblue;">公告</div>
<div style="color: aliceblue">公告</div>
</div> </div>
<div class="bottom-btn" @click="handleFeedbackClick"> <div class="bottom-btn" @click="handleFeedbackClick">
<img <img
@ -207,7 +207,7 @@
src="https://d31zlh4on95l9h.cloudfront.net/images/90c933dba4b36edae3775f9fd34a2e6c.png" src="https://d31zlh4on95l9h.cloudfront.net/images/90c933dba4b36edae3775f9fd34a2e6c.png"
alt="icon" alt="icon"
/> />
<div style="color: aliceblue;">用户反馈</div>
<div style="color: aliceblue">用户反馈</div>
</div> </div>
</div> </div>
</div> </div>
@ -537,6 +537,9 @@ const getHistoryList = async (params) => {
} else if (props.currentType == "AiEmotion") { } else if (props.currentType == "AiEmotion") {
isCollapsed.value = !chatStore.aiEmotionCall; isCollapsed.value = !chatStore.aiEmotionCall;
console.log("情绪大模型页面", isCollapsed.value); console.log("情绪大模型页面", isCollapsed.value);
}else if (props.currentType == "deepNine") {
isCollapsed.value = !chatStore.deepNineCall;
console.log("深度九大模型页面", isCollapsed.value);
} }
} }
// //
@ -639,12 +642,12 @@ const changeTopStatus = async (isTop, id) => {
} }
await changeTop({ await changeTop({
model: props.currentType == "AIchat" ? 1 : 2,
model: props.currentType == "AIchat" ? 1 : props.currentType == "AiEmotion" ? 2 : 3,
recordId: id, recordId: id,
isTop: isTop == 1 ? 0 : 1, isTop: isTop == 1 ? 0 : 1,
}); });
await getHistoryList({ await getHistoryList({
model: props.currentType == "AIchat" ? 1 : 2,
model: props.currentType == "AIchat" ? 1 : props.currentType == "AiEmotion" ? 2 : 3,
token: localStorage.getItem("localToken"), token: localStorage.getItem("localToken"),
}); });
} catch (error) { } catch (error) {
@ -673,6 +676,8 @@ const openHistory = () => {
chatStore.aiChatCall = true; chatStore.aiChatCall = true;
} else if (props.currentType == "AiEmotion") { } else if (props.currentType == "AiEmotion") {
chatStore.aiEmotionCall = true; chatStore.aiEmotionCall = true;
}else if (props.currentType == "deepNine") {
chatStore.deepNineCall = true;
} }
}; };
@ -682,6 +687,8 @@ const closeHistory = () => {
chatStore.aiChatCall = false; chatStore.aiChatCall = false;
} else if (props.currentType == "AiEmotion") { } else if (props.currentType == "AiEmotion") {
chatStore.aiEmotionCall = false; chatStore.aiEmotionCall = false;
}else if (props.currentType == "deepNine") {
chatStore.deepNineCall = false;
} }
}; };
@ -695,7 +702,7 @@ const selectRecord = async (record) => {
try { try {
selectedRecordId.value = record.id; selectedRecordId.value = record.id;
const result = await clickRecordAPI({ const result = await clickRecordAPI({
model: props.currentType == "AIchat" ? 1 : 2,
model: props.currentType == "AIchat" ? 1 : props.currentType == "AiEmotion" ? 2 : 3,
parentId: record.parentId, parentId: record.parentId,
recordId: record.id, recordId: record.id,
}); });
@ -708,6 +715,8 @@ const selectRecord = async (record) => {
chatStore.aiChatCall = false; chatStore.aiChatCall = false;
} else if (props.currentType == "AiEmotion") { } else if (props.currentType == "AiEmotion") {
chatStore.aiEmotionCall = false; chatStore.aiEmotionCall = false;
}else if (props.currentType == "deepNine") {
chatStore.deepNineCall = false;
} }
} }
dataStore.isFeedback = false; dataStore.isFeedback = false;
@ -755,13 +764,13 @@ const deleteRecord = (id) => {
const deleteRecordConfirm = async () => { const deleteRecordConfirm = async () => {
try { try {
const result = await deleteRecordAPI({ const result = await deleteRecordAPI({
model: props.currentType == "AIchat" ? 1 : 2,
model: props.currentType == "AIchat" ? 1 : props.currentType == "AiEmotion" ? 2 : 3,
recordId: delObj.value.id, recordId: delObj.value.id,
}); });
console.log(result.msg); console.log(result.msg);
closeDeleteDialog(); closeDeleteDialog();
await getHistoryList({ await getHistoryList({
model: props.currentType == "AIchat" ? 1 : 2,
model: props.currentType == "AIchat" ? 1 : props.currentType == "AiEmotion" ? 2 : 3,
token: localStorage.getItem("localToken"), token: localStorage.getItem("localToken"),
}); });
} catch (e) { } catch (e) {
@ -792,7 +801,7 @@ watch(
(newVal) => { (newVal) => {
if (chatStore.searchRecord) { if (chatStore.searchRecord) {
getHistoryList({ getHistoryList({
model: props.currentType == "AIchat" ? 1 : 2,
model: props.currentType == "AIchat" ? 1 : props.currentType == "AiEmotion" ? 2 : 3,
token: localStorage.getItem("localToken"), token: localStorage.getItem("localToken"),
}); });
chatStore.searchRecord = false; chatStore.searchRecord = false;
@ -816,8 +825,14 @@ onMounted(() => {
userAgent userAgent
); );
let model =
props.currentType == "AIchat"
? 1
: props.currentType == "AiEmotion"
? 2
: 3;
getHistoryList({ getHistoryList({
model: props.currentType == "AIchat" ? 1 : 2,
model: model,
token: localStorage.getItem("localToken"), token: localStorage.getItem("localToken"),
}); });
}); });

26
src/views/deepNine.vue

@ -88,11 +88,6 @@ const playNextAudio = () => {
} }
return; return;
} }
// if (currentPlayIndex >= audioQueue.value.length) {
// console.log("");
// isPlayingAudio.value = false;
// return;
// }
isCallingPlayNext = true; isCallingPlayNext = true;
const audioInfo = audioQueue.value[currentPlayIndex]; const audioInfo = audioQueue.value[currentPlayIndex];
@ -158,13 +153,8 @@ const playNextAudio = () => {
chatStore.messages[chatStore.currentUserIndex].audioStatus = false; chatStore.messages[chatStore.currentUserIndex].audioStatus = false;
audioStore.nowSound = null; audioStore.nowSound = null;
audioStore.soundInstance = null; audioStore.soundInstance = null;
// currentPlayIndex = 0;
isCallingPlayNext = false; isCallingPlayNext = false;
// setTimeout(() => {
// isCallingPlayNext = false;
// playNextAudio();
// }, 500); // 500ms
} }
}, },
onstop: () => { onstop: () => {
@ -411,22 +401,10 @@ const playAudio = (url) => {
audioStore.setAudioInstance(newSound); audioStore.setAudioInstance(newSound);
Howler._howls.push(newSound); // Howler._howls.push(newSound); //
// //
// if (Howler.autoUnlock) {
// Howler.autoUnlock();
// }
}; };
// if (/iPhone|iPad|iPod/.test(navigator.userAgent)) {
// document.addEventListener('touchstart', handlePlay, { once: true });
// ElMessage.info('');
// } else {
// handlePlay();
// }
handlePlay(); handlePlay();
// Howler.volume(1.0) //
}; };
// //
const pauseAudio = () => { const pauseAudio = () => {
@ -1040,13 +1018,13 @@ async function continueThinkingProcess(thinkingMessageRef, stockName) {
chatStore.messages.splice(index, 1); chatStore.messages.splice(index, 1);
} }
//
//
const thinkingMessage3 = reactive({ const thinkingMessage3 = reactive({
sender: "ai", sender: "ai",
class: "ing", class: "ing",
type: "ing", type: "ing",
flag: true, flag: true,
content: `正在生成${stockName}全景作战报告`,
content: `正在生成${stockName}深度共振分析图谱`,
gif: generateGif, gif: generateGif,
}); });
chatStore.messages.push(thinkingMessage3); chatStore.messages.push(thinkingMessage3);

2
src/views/homePage.vue

@ -1499,7 +1499,7 @@ onUnmounted(() => {
<!-- 深度九大模型按钮 --> <!-- 深度九大模型按钮 -->
<img <img
:src=" :src="
activeTab === 'deepNine' ? emotionButton01 : emotionButton02
activeTab === 'deepNine' ? dbqbButton01 : dbqbButton02
" "
@click="setActiveTab('deepNine', 2)" @click="setActiveTab('deepNine', 2)"
class="action-btn model-btn" class="action-btn model-btn"

Loading…
Cancel
Save