Browse Source

Merge branch 'milestone-20250924-接入大财神工作流' into dev

dev
宋杰 2 months ago
parent
commit
33941d932d
  1. 4
      src/views/DeepNineModel.vue
  2. 2
      src/views/Selectmodel.vue
  3. 96
      src/views/components/HistoryRecord.vue
  4. 122
      src/views/deepNine.vue
  5. 32
      src/views/homePage.vue

4
src/views/DeepNineModel.vue

@ -149,7 +149,7 @@ const closeNoPermissionDialog = () => {
height: auto;
/* margin-top: 20px; */
position: absolute;
top: 3vh;
top: 10vh;
}
/* 顶部标题 */
@ -302,7 +302,7 @@ const closeNoPermissionDialog = () => {
.content-text {
flex-direction: column;
/* 小屏幕时恢复纵向排列 */
gap: 15px;
}
.content-text img {

2
src/views/Selectmodel.vue

@ -498,7 +498,7 @@ const goToDeepNineModel = () => {
.footer-text1 {
background-image: url("@/assets/img/Selectmodel/智能体.png");
width: 100vw;
height: 10vw;
height: 15vw;
margin-top: 10px;
background-size: 100% 100%;
/* 保证全宽显示 */

96
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";
@ -477,6 +478,7 @@ const historyRecords = ref([]);
const categoryHistory = ref([]);
let chatFirstFlag = true;
let emotionTirstFlag = true;
let deepNineFirstFlag = true;
//
let cachedCategoryHistory = null;
let lastDataHash = null;
@ -524,6 +526,13 @@ const getHistoryList = async (params) => {
emotionTirstFlag = false;
}
if (deepNineFirstFlag && params.model == 3 && result.data.length != 0) {
if (!isMobile.value) {
chatStore.deepNineCall = true;
}
deepNineFirstFlag = false;
}
// chatStore
if (isMobile.value) {
@ -537,7 +546,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 +651,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 +695,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,7 +706,7 @@ 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;
}
};
@ -699,10 +718,20 @@ const selectRecord = async (record) => {
return;
}
if (props.currentType == "deepNine" && deepNineStore.firstAPICall) {
ElMessage.warning("正在获取回复中,请稍后");
return;
}
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 +744,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 +794,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) {
@ -784,6 +824,10 @@ const handleAnnouncementClick = () => {
ElMessage.warning("正在获取回复中,请稍后");
return;
}
if (props.currentType == "deepNine" && deepNineStore.firstAPICall) {
ElMessage.warning("正在获取回复中,请稍后");
return;
}
emit("showAnnouncement");
};
@ -793,15 +837,25 @@ const handleFeedbackClick = () => {
ElMessage.warning("正在获取回复中,请稍后");
return;
}
if (props.currentType == "deepNine" && deepNineStore.firstAPICall) {
ElMessage.warning("正在获取回复中,请稍后");
return;
}
emit("showFeedback");
};
//
watch(
() => chatStore.searchRecord,
(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;
@ -809,6 +863,28 @@ watch(
}
);
//
import { useDeepNineStore } from "@/store/deepNine.js";
const deepNineStore = useDeepNineStore();
watch(
() => deepNineStore.searchRecord,
(newVal) => {
if (deepNineStore.searchRecord) {
getHistoryList({
model:
props.currentType == "deepNine"
? 3
: props.currentType == "AIchat"
? 1
: 2,
token: localStorage.getItem("localToken"),
});
deepNineStore.searchRecord = false;
}
}
);
//
defineExpose({
isCollapsed,

122
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;
console.log("打印完毕,接触输入框禁用状态");
chatStore.chatInput = false;
homepageChatStore.isLoading = false;
console.log("打印完毕,解除输入框禁用状态");
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");
}
}
@ -1569,11 +1569,9 @@ watch(
// const ac33 = result22.data.zjqssc1;
const ac34 = `<p style="margin:0;color:#FFD700;font-weight:bold;display:flex;justify-content:center;font-size:22px">【资金趋势导航】</p><p>`;
const ac35 = result22.data.zjqssc1;
// const ac3 = `<p>${result23.data.DXTSC}</p><p>${result23.data.DXTSC2}</p><p>${result23.data.ZJQSSC1}</p>`;
const ac3Arr = [];
ac3Arr.push(ac31);
@ -1612,8 +1610,8 @@ watch(
flag: false,
content: "系统正在为您努力加载中,请稍后再试",
});
chatStore.isLoading = false;
chatStore.chatInput = false;
homepageChatStore.isLoading = false;
homepageChatStore.deepNineInput = false;
emit("enableInput");
}
}
@ -1655,7 +1653,7 @@ watch(
class: "title3",
type: "title3",
content:
"https://d31zlh4on95l9h.cloudfront.net/images/ce71f75008422ed70e88b1ae0bc4d550.png",
"https://d31zlh4on95l9h.cloudfront.net/images/d1fa1f4cbd6452796a4c5368d9f57c4d.png",
},
"",
50
@ -1698,8 +1696,8 @@ watch(
flag: false,
content: "系统正在为您努力加载中,请稍后再试",
});
chatStore.isLoading = false;
chatStore.chatInput = false;
homepageChatStore.isLoading = false;
homepageChatStore.deepNineInput = false;
emit("enableInput");
}
}
@ -1870,8 +1868,8 @@ watch(
flag: false,
content: "数据缺失,请稍后重试",
});
chatStore.isLoading = false;
chatStore.chatInput = false;
homepageChatStore.isLoading = false;
homepageChatStore.deepNineInput = false;
chatStore.firstAPICall = false;
emit("enableInput");
}
@ -1960,8 +1958,8 @@ watch(
isTypingInProgress.value = false;
// 4.
chatStore.isLoading = false;
chatStore.chatInput = false;
homepageChatStore.isLoading = false;
homepageChatStore.deepNineInput = false;
emit("enableInput");
// dbqbClickRecord
@ -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 = `<p style="margin:0;color:#FFD700;font-weight:bold;display:flex;justify-content:center;font-size:22px">【主力行为】</p><p>${clickRecord.value.wokeFlowData.Three.zhuli1}</p><p>${clickRecord.value.wokeFlowData.Three.zhuli2}</p><p>${clickRecord.value.wokeFlowData.Three.zhuli3}</p>`;
// 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 = `<p style="margin:0;color:#FFD700;font-weight:bold;display:flex;justify-content:center;font-size:22px">【空间维度】</p><p style="display:flex;justify-content:center;">${arr[0]},${arr[1]}</p><p style="display:flex;justify-content:center;">${arr[2]},${arr[3]}</p>`;
const shijian = `<p style="margin:0;color:#FFD700;font-weight:bold;display:flex;justify-content:center;font-size:22px">【时间维度】</p><p style="display:flex;justify-content:center;">${clickRecord.value.wokeFlowData.Three.shijian}</p>`;
const nengliang = `<p style="margin:0;color:#FFD700;font-weight:bold;display:flex;justify-content:center;font-size:22px">【能量维度】</p><p style="display:flex;justify-content:center;">${clickRecord.value.wokeFlowData.Three.nengliang}</p>`;
const ac4 = kongjian + shijian + nengliang;
const ac3 = `<p style="margin:0;color:#FFD700;font-weight:bold;display:flex;justify-content:center;font-size:22px">【资金异动信号】</p><p>${clickRecord.value.wokeFlowData.Two.dxtsc}</p><p style="margin:0;color:#FFD700;font-weight:bold;display:flex;justify-content:center;font-size:22px">【资金趋势导航】</p><p>${clickRecord.value.wokeFlowData.Two.zjqssc1}</p>`;
//
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/d1fa1f4cbd6452796a4c5368d9f57c4d.png",
});
const cftj = `<p style="margin:0;color:#FFD700;font-weight:bold;display:flex;justify-content:center;font-size:22px">【触发条件】</p><p>${clickRecord.value.wokeFlowData.Four.cftl}</p>`;
const gfzl = `<p style="margin:0;color:#FFD700;font-weight:bold;display:flex;justify-content:center;font-size:22px">【攻防指令】</p><p>${clickRecord.value.wokeFlowData.Four.gfzl}</p>`;
const ac5 = cftj + gfzl;
// 4
const ac5 = `<p>${clickRecord.value.wokeFlowData.Three.zjqssc2}</p>`;
//
chatStore.messages.push({
@ -2169,7 +2174,6 @@ watch(
type: "content3",
content: ac5,
});
chatStore.messages.push({
sender: "ai",
class: "mianze",

32
src/views/homePage.vue

@ -344,6 +344,7 @@ watch(
watch(
() => chatStore.deepNineInput,
async (newVal) => {
console.log("deepNineInput", chatStore.deepNineInput);
if (activeTab.value == "deepNine") {
isInputDisabled.value = chatStore.deepNineInput;
}
@ -392,7 +393,7 @@ const sendMessage = async () => {
if (activeTab.value === "deepNine") {
//
isInputDisabled.value = true;
chatStore.deepNineInput = true;
// store
const deepNineStore = useDeepNineStore();
@ -453,19 +454,19 @@ const enableInput = () => {
const handleHistorySelect = (stockData) => {
console.log("接收到历史记录数据:", stockData);
// AiEmotionAiEmotion
// if (activeTab.value !== 'AiEmotion') {
// setActiveTab('AiEmotion', 1);
// }
// addStock
nextTick(() => {
if (aiEmotionRef.value && aiEmotionRef.value.addStock) {
aiEmotionRef.value.addStock(stockData);
} else {
console.error("AiEmotion组件或addStock方法不可用");
}
});
//
if (activeTab.value === 'AiEmotion') {
// addStock
nextTick(() => {
if (aiEmotionRef.value && aiEmotionRef.value.addStock) {
aiEmotionRef.value.addStock(stockData);
} else {
console.error("AiEmotion组件或addStock方法不可用");
}
});
} else {
console.log("历史记录选择仅在情绪大模型中有效");
}
};
//
@ -2039,7 +2040,8 @@ onUnmounted(() => {
<div class="tokenRuleSection">
<div class="tokenRuleSectionTitle">Token兑换规则</div>
<div class="tokenRuleItem">
点击右上角"获取Token"即可进入Token兑换页进行金币兑换Token只能兑换普通Token
点击右上角"获取Token"即可进入Token兑换页进行金币兑换Token只能兑换普通Token
</div>
<div class="tokenRuleItem">
金币兑换Token的比例为1金币=1Token一经兑换不予退还

Loading…
Cancel
Save