|
|
@@ -575,6 +575,7 @@ export default defineComponent({
|
|
|
* 以便下一次 type=stream 的消息来临时继续重新拼接
|
|
|
*/
|
|
|
let temp_stream_msg = '';
|
|
|
+ const download_server = window.ASSETS_BASE_URL;
|
|
|
|
|
|
/**
|
|
|
* 处理socket数据
|
|
|
@@ -695,17 +696,17 @@ export default defineComponent({
|
|
|
answerData.value = '正在处理中...'
|
|
|
// 以下是智能数据对话的变量
|
|
|
const { image_url, excel_url, excel_name, code, sql } = JSON.parse(evt_dt);
|
|
|
- const port = window.location.port ? `:${window.location.port}` : '';
|
|
|
+ // const port = window.location.port ? `:${window.location.port}` : '';
|
|
|
|
|
|
// 如果有图片或excel,则更新图片或excel地址
|
|
|
if (image_url) {
|
|
|
- imageUrl.value = `http://${window.location.hostname}${port}${image_url}`
|
|
|
+ imageUrl.value = `http://${download_server}${image_url}`
|
|
|
}
|
|
|
|
|
|
if (excel_url) {
|
|
|
const file = {
|
|
|
file_type: 'excel',
|
|
|
- file_url: `http://${window.location.hostname}${port}${excel_url}`,
|
|
|
+ file_url: `http://${download_server}${excel_url}`,
|
|
|
file_name: `${excel_name}.xlsx` || '点击下载',
|
|
|
}
|
|
|
|
|
|
@@ -748,12 +749,12 @@ export default defineComponent({
|
|
|
// 出题
|
|
|
if (chat_type == 'question') {
|
|
|
const { file_url, file_name } = JSON.parse(evt_dt);
|
|
|
- const port = window.location.port ? `:${window.location.port}` : '';
|
|
|
+ // const port = window.location.port ? `:${window.location.port}` : '';
|
|
|
|
|
|
if (file_url) {
|
|
|
const file = {
|
|
|
file_type: 'word',
|
|
|
- file_url: `http://${window.location.hostname}${port}${file_url}`,
|
|
|
+ file_url: `http://${download_server}${file_url}`,
|
|
|
file_name: `${file_name}.docx` || '点击下载',
|
|
|
}
|
|
|
answerFile.value = file
|
|
|
@@ -854,7 +855,7 @@ export default defineComponent({
|
|
|
* 通过websocket进行发送
|
|
|
*/
|
|
|
helper.$bus.on("send-message", (value) => {
|
|
|
- console.log(value, '会话的内容');
|
|
|
+ // console.log(value, '会话的内容');
|
|
|
|
|
|
/**
|
|
|
* 当消息发送时,及时清理stream的拼接值
|