|
@ -417,6 +417,7 @@ import moment from "moment"; |
|
|
import { ElMessage } from "element-plus"; |
|
|
import { ElMessage } from "element-plus"; |
|
|
import { useChatStore } from "../../store/chat"; |
|
|
import { useChatStore } from "../../store/chat"; |
|
|
const chatStore = useChatStore(); |
|
|
const chatStore = useChatStore(); |
|
|
|
|
|
|
|
|
import { useDataStore } from "@/store/dataList.js"; |
|
|
import { useDataStore } from "@/store/dataList.js"; |
|
|
const dataStore = useDataStore(); |
|
|
const dataStore = useDataStore(); |
|
|
import { useRouter } from "vue-router"; |
|
|
import { useRouter } from "vue-router"; |
|
@ -642,12 +643,22 @@ const changeTopStatus = async (isTop, id) => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
await changeTop({ |
|
|
await changeTop({ |
|
|
model: props.currentType == "AIchat" ? 1 : props.currentType == "AiEmotion" ? 2 : 3, |
|
|
|
|
|
|
|
|
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 : props.currentType == "AiEmotion" ? 2 : 3, |
|
|
|
|
|
|
|
|
model: |
|
|
|
|
|
props.currentType == "AIchat" |
|
|
|
|
|
? 1 |
|
|
|
|
|
: props.currentType == "AiEmotion" |
|
|
|
|
|
? 2 |
|
|
|
|
|
: 3, |
|
|
token: localStorage.getItem("localToken"), |
|
|
token: localStorage.getItem("localToken"), |
|
|
}); |
|
|
}); |
|
|
} catch (error) { |
|
|
} catch (error) { |
|
@ -694,7 +705,10 @@ const closeHistory = () => { |
|
|
|
|
|
|
|
|
const historyData = ref({}); |
|
|
const historyData = ref({}); |
|
|
const selectRecord = async (record) => { |
|
|
const selectRecord = async (record) => { |
|
|
if (props.currentType == "AIchat" && chatStore.firstAPICall) { |
|
|
|
|
|
|
|
|
if ( |
|
|
|
|
|
(props.currentType == "AIchat" || props.currentType == "deepNine") && |
|
|
|
|
|
chatStore.firstAPICall |
|
|
|
|
|
) { |
|
|
ElMessage.warning("正在获取回复中,请稍后"); |
|
|
ElMessage.warning("正在获取回复中,请稍后"); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
@ -702,7 +716,12 @@ 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 : props.currentType == "AiEmotion" ? 2 : 3, |
|
|
|
|
|
|
|
|
model: |
|
|
|
|
|
props.currentType == "AIchat" |
|
|
|
|
|
? 1 |
|
|
|
|
|
: props.currentType == "AiEmotion" |
|
|
|
|
|
? 2 |
|
|
|
|
|
: 3, |
|
|
parentId: record.parentId, |
|
|
parentId: record.parentId, |
|
|
recordId: record.id, |
|
|
recordId: record.id, |
|
|
}); |
|
|
}); |
|
@ -722,6 +741,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 |
|
|
// 构造股票数据对象,保持与现有结构一致 |
|
|
// 构造股票数据对象,保持与现有结构一致 |
|
|
const stockData = { |
|
|
const stockData = { |
|
|
queryText: result.data.keyword, // 使用记录中的keyword字段作为查询文本 |
|
|
queryText: result.data.keyword, // 使用记录中的keyword字段作为查询文本 |
|
@ -764,13 +784,23 @@ const deleteRecord = (id) => { |
|
|
const deleteRecordConfirm = async () => { |
|
|
const deleteRecordConfirm = async () => { |
|
|
try { |
|
|
try { |
|
|
const result = await deleteRecordAPI({ |
|
|
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, |
|
|
recordId: delObj.value.id, |
|
|
}); |
|
|
}); |
|
|
console.log(result.msg); |
|
|
console.log(result.msg); |
|
|
closeDeleteDialog(); |
|
|
closeDeleteDialog(); |
|
|
await getHistoryList({ |
|
|
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"), |
|
|
token: localStorage.getItem("localToken"), |
|
|
}); |
|
|
}); |
|
|
} catch (e) { |
|
|
} catch (e) { |
|
@ -802,7 +832,12 @@ watch( |
|
|
(newVal) => { |
|
|
(newVal) => { |
|
|
if (chatStore.searchRecord) { |
|
|
if (chatStore.searchRecord) { |
|
|
getHistoryList({ |
|
|
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"), |
|
|
token: localStorage.getItem("localToken"), |
|
|
}); |
|
|
}); |
|
|
chatStore.searchRecord = false; |
|
|
chatStore.searchRecord = false; |
|
@ -819,7 +854,12 @@ watch( |
|
|
(newVal) => { |
|
|
(newVal) => { |
|
|
if (deepNineStore.searchRecord) { |
|
|
if (deepNineStore.searchRecord) { |
|
|
getHistoryList({ |
|
|
getHistoryList({ |
|
|
model: props.currentType == "deepNine" ? 3 : props.currentType == "AIchat" ? 1 : 2, |
|
|
|
|
|
|
|
|
model: |
|
|
|
|
|
props.currentType == "deepNine" |
|
|
|
|
|
? 3 |
|
|
|
|
|
: props.currentType == "AIchat" |
|
|
|
|
|
? 1 |
|
|
|
|
|
: 2, |
|
|
token: localStorage.getItem("localToken"), |
|
|
token: localStorage.getItem("localToken"), |
|
|
}); |
|
|
}); |
|
|
deepNineStore.searchRecord = false; |
|
|
deepNineStore.searchRecord = false; |
|
|