|
|
@ -587,6 +587,10 @@ async function sendChatHandle(event) { |
|
|
"sessionName": chatList.value.length > 0 ? chatList.value[0].content.substring(0, 20) : inputValue.value.trim().substring(0, 20), |
|
|
"sessionName": chatList.value.length > 0 ? chatList.value[0].content.substring(0, 20) : inputValue.value.trim().substring(0, 20), |
|
|
"file": currentFiles.value |
|
|
"file": currentFiles.value |
|
|
} |
|
|
} |
|
|
|
|
|
chatList.value.push(lastQuestion.value) |
|
|
|
|
|
let question = JSON.parse(JSON.stringify(lastQuestion.value)) |
|
|
|
|
|
question.file = JSON.stringify(question.file) |
|
|
|
|
|
await addChat(question) |
|
|
asking.value = true |
|
|
asking.value = true |
|
|
nextTick(() => { |
|
|
nextTick(() => { |
|
|
// 将滚动条滚动到最下面 |
|
|
// 将滚动条滚动到最下面 |
|
|
@ -620,10 +624,6 @@ function sendChatMessage(data){ |
|
|
// chatList.value.push({"chatId":uuidv4(),"type":"answer","content":[{"type":"text","content":"服务异常,错误码:"+res.status}],"isEnd":true,"isStop":false,"sessionId":chatList.value[0].sessionId,"sessionName":chatList.value[0].sessionName,"operate":'',"thumbDownReason":''}) |
|
|
// chatList.value.push({"chatId":uuidv4(),"type":"answer","content":[{"type":"text","content":"服务异常,错误码:"+res.status}],"isEnd":true,"isStop":false,"sessionId":chatList.value[0].sessionId,"sessionName":chatList.value[0].sessionName,"operate":'',"thumbDownReason":''}) |
|
|
currentError.value = "服务异常,错误码:"+res.status +",请联系管理员!" |
|
|
currentError.value = "服务异常,错误码:"+res.status +",请联系管理员!" |
|
|
}else { |
|
|
}else { |
|
|
chatList.value.push(lastQuestion.value) |
|
|
|
|
|
let question = JSON.parse(JSON.stringify(lastQuestion.value)) |
|
|
|
|
|
question.file = JSON.stringify(question.file) |
|
|
|
|
|
addChat(question).then(()=>{ |
|
|
|
|
|
currentError.value = '' |
|
|
currentError.value = '' |
|
|
currentChatData.value = {} |
|
|
currentChatData.value = {} |
|
|
currentFiles.value = [] |
|
|
currentFiles.value = [] |
|
|
@ -685,7 +685,6 @@ function sendChatMessage(data){ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
|
|
|
} |
|
|
} |
|
|
}).catch((e) => { |
|
|
}).catch((e) => { |
|
|
currentError.value = "服务异常,请联系系统管理员!" |
|
|
currentError.value = "服务异常,请联系系统管理员!" |
|
|
|