From c84a6d2e896ea49080653f183cd09f9f0af85772 Mon Sep 17 00:00:00 2001 From: xueyinfei <1207092115@qq.com> Date: Tue, 7 Oct 2025 01:35:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E6=A8=A1=E5=9E=8B=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vue-fastapi-frontend/src/main.js | 3 +-- .../src/views/aichat/MdRenderer.vue | 14 +++++++++++++- vue-fastapi-frontend/src/views/aichat/aichat.vue | 3 +-- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/vue-fastapi-frontend/src/main.js b/vue-fastapi-frontend/src/main.js index a772047..1e38b0d 100644 --- a/vue-fastapi-frontend/src/main.js +++ b/vue-fastapi-frontend/src/main.js @@ -52,8 +52,7 @@ const app = createApp(App) // 全局方法挂载 app.config.globalProperties.useDict = useDict app.config.globalProperties.download = download -app.config.globalProperties.download = download -app.config.globalProperties.formatDateTime = formatDateTime +app.config.globalProperties.formatDateTime = formatDateTime app.config.globalProperties.resetForm = resetForm app.config.globalProperties.handleTree = handleTree app.config.globalProperties.addDateRange = addDateRange diff --git a/vue-fastapi-frontend/src/views/aichat/MdRenderer.vue b/vue-fastapi-frontend/src/views/aichat/MdRenderer.vue index b93546d..c747797 100644 --- a/vue-fastapi-frontend/src/views/aichat/MdRenderer.vue +++ b/vue-fastapi-frontend/src/views/aichat/MdRenderer.vue @@ -15,6 +15,11 @@ +
+
+ {{ doc.file_name }} +
+
@@ -29,7 +34,7 @@ import chatTable from './chatTable.vue' import htmlCharts from './htmlCharts.vue' import {Download, FullScreen} from "@element-plus/icons-vue"; import { ref, watch} from 'vue' - +const { proxy } = getCurrentInstance(); const props = defineProps({ source: Array, is_large: Boolean, @@ -41,6 +46,13 @@ function fullscreenG6(data){ emit('fullscreenG6',data) } +function downLoadFile(doc){ + let data = {file:doc.file_name,bucket: doc.bucket,sessionId: doc.session_id} + proxy.download("/default-api/aichat/file/download", { + ...data, + }, doc.file_name); +} + function downLoadTable(data){ const worksheet = XLSX.utils.json_to_sheet(data); // 创建一个新的工作簿并将工作表添加到工作簿中 diff --git a/vue-fastapi-frontend/src/views/aichat/aichat.vue b/vue-fastapi-frontend/src/views/aichat/aichat.vue index 5f5983e..976a817 100644 --- a/vue-fastapi-frontend/src/views/aichat/aichat.vue +++ b/vue-fastapi-frontend/src/views/aichat/aichat.vue @@ -180,7 +180,6 @@