|
|
@ -293,7 +293,6 @@ const scorll = ref(true) |
|
|
const dialogScrollbar = ref() |
|
|
const dialogScrollbar = ref() |
|
|
const loading = ref(false) |
|
|
const loading = ref(false) |
|
|
const inputValue = ref('') |
|
|
const inputValue = ref('') |
|
|
const currentQuestion = ref({}) |
|
|
|
|
|
const chartOpenId = ref('') |
|
|
const chartOpenId = ref('') |
|
|
const chatList = ref([]) |
|
|
const chatList = ref([]) |
|
|
const controller = ref(null) |
|
|
const controller = ref(null) |
|
|
@ -415,7 +414,6 @@ const handleFileSuccess = (response, file, fileList) => { |
|
|
upload.open = false; |
|
|
upload.open = false; |
|
|
upload.isUploading = false; |
|
|
upload.isUploading = false; |
|
|
proxy.$modal.msgSuccess(response.msg); |
|
|
proxy.$modal.msgSuccess(response.msg); |
|
|
// proxy.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", { dangerouslyUseHTMLString: true }); |
|
|
|
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
/** 提交上传文件 */ |
|
|
/** 提交上传文件 */ |
|
|
@ -447,31 +445,6 @@ watch( |
|
|
|
|
|
|
|
|
watch(() => props.cookieSessionId, value => upload.data = {sessionId:value}) |
|
|
watch(() => props.cookieSessionId, value => upload.data = {sessionId:value}) |
|
|
|
|
|
|
|
|
// function regenerationChart(index){ |
|
|
|
|
|
// |
|
|
|
|
|
// if (currentQuestion.value.query){ |
|
|
|
|
|
// sendChatMessage(currentQuestion.value) |
|
|
|
|
|
// }else{ |
|
|
|
|
|
// // let question = chatList.value[index - 1] |
|
|
|
|
|
// // let chat = { |
|
|
|
|
|
// // "chatId":uuidv4(), |
|
|
|
|
|
// // "type":"question", |
|
|
|
|
|
// // "content":question.content, |
|
|
|
|
|
// // "time": formatDate(new Date()), |
|
|
|
|
|
// // "file": question.file} |
|
|
|
|
|
// // chatList.value.push(chat) |
|
|
|
|
|
// // let data = { |
|
|
|
|
|
// // "query": chat.content, |
|
|
|
|
|
// // "user_id": cache.local.get("username"), |
|
|
|
|
|
// // "robot": currentMachine.value.length>0?currentMachine.value[0]:"", |
|
|
|
|
|
// // "session_id": Cookies.get("chatSessionId"), |
|
|
|
|
|
// // "doc": chat.file, |
|
|
|
|
|
// // } |
|
|
|
|
|
// sendChatMessage(data) |
|
|
|
|
|
// } |
|
|
|
|
|
// |
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
function changeThumb(index,chat){ |
|
|
function changeThumb(index,chat){ |
|
|
chatList.value[index].operate = chat.operate |
|
|
chatList.value[index].operate = chat.operate |
|
|
chatList.value[index].thumbDownReason = chat.thumbDownReason |
|
|
chatList.value[index].thumbDownReason = chat.thumbDownReason |
|
|
@ -607,7 +580,7 @@ async function sendChatHandle(event) { |
|
|
//取最新的checkpointer值 |
|
|
//取最新的checkpointer值 |
|
|
data.checkpointer = chatList.value[chatList.value.length - 1].content.checkpointer |
|
|
data.checkpointer = chatList.value[chatList.value.length - 1].content.checkpointer |
|
|
} |
|
|
} |
|
|
currentQuestion.value = data |
|
|
currentChatData.value = data |
|
|
inputValue.value = '' |
|
|
inputValue.value = '' |
|
|
sendChatMessage(data) |
|
|
sendChatMessage(data) |
|
|
} |
|
|
} |
|
|
@ -625,7 +598,6 @@ function sendChatMessage(data){ |
|
|
currentError.value = "服务异常,错误码:"+res.status +",请联系管理员!" |
|
|
currentError.value = "服务异常,错误码:"+res.status +",请联系管理员!" |
|
|
}else { |
|
|
}else { |
|
|
currentError.value = '' |
|
|
currentError.value = '' |
|
|
currentChatData.value = {} |
|
|
|
|
|
currentFiles.value = [] |
|
|
currentFiles.value = [] |
|
|
chatList.value.push({"chatId":uuidv4(),"type":"answer","content":[],"isEnd":false,"isStop":false,"sessionId":chatList.value[0].sessionId,"sessionName":chatList.value[0].sessionName, "operate":'',"thumbDownReason":''}) |
|
|
chatList.value.push({"chatId":uuidv4(),"type":"answer","content":[],"isEnd":false,"isStop":false,"sessionId":chatList.value[0].sessionId,"sessionName":chatList.value[0].sessionName, "operate":'',"thumbDownReason":''}) |
|
|
const reader = res.body.getReader() |
|
|
const reader = res.body.getReader() |
|
|
|