From c46e36208f6b5852cd61a41801b13ac67ecea609 Mon Sep 17 00:00:00 2001
From: junleea <354425203@qq.com>
Date: Tue, 1 Apr 2025 15:45:43 +0800
Subject: [PATCH] =?UTF-8?q?=E9=80=9A=E7=94=A8=E4=BA=A4=E4=BA=92=E6=94=AF?=
=?UTF-8?q?=E6=8C=81=E5=9B=BE=E7=89=87=E7=90=86=E8=A7=A3,=E4=B8=8A?=
=?UTF-8?q?=E4=BC=A0=E5=9B=BE=E7=89=87?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/system/gen-chat.vue | 31 +++++++++++++++++++++++++++++--
1 file changed, 29 insertions(+), 2 deletions(-)
diff --git a/src/views/system/gen-chat.vue b/src/views/system/gen-chat.vue
index dc10c4f..a2b1b55 100644
--- a/src/views/system/gen-chat.vue
+++ b/src/views/system/gen-chat.vue
@@ -119,12 +119,12 @@
-
+
{{ file.UserFileName }}
@@ -146,6 +146,7 @@
v-model="searchFileQuery"
prefix-icon="el-icon-search"
/>
+ 上传文件
@@ -173,6 +174,17 @@
+
+
+
+
+
+
@@ -186,6 +198,7 @@ import { FindUserFileService } from "@/api/file";
import { Check, Loading, DocumentCopy } from "@element-plus/icons-vue";
import MarkdownIt from "markdown-it";
import hljs from "highlight.js";
+import UploadFile from '@/components/upload-file.vue';
import { Session } from "@/types/session";
import { FindSessionService } from "@/api/session";
import { FindModelListByFunctionName } from "@/api/function";
@@ -236,6 +249,7 @@ const selectedFiles = ref([]); // 用于存储已选文件
const selectFileVisible = ref(false); // 控制文件选择对话框的显示与隐藏
const searchFileQuery = ref(""); // 用于搜索文件的查询条件
const filteredFiles = ref([]); // 用于存储过滤后的文件列表
+const uploadFileVisible = ref(false); // 控制上传文件对话框的显示与隐藏
const renderMarkdown = (content: string) => {
return md.render(content);
@@ -263,12 +277,25 @@ const handleSelectFileVisible = async () => {
console.log("handleSelectFileVisible:", selectFileVisible.value);
};
+const handleUploadFileClose= async () => {
+ uploadFileVisible.value = false; // 关闭上传文件对话框
+ await getFileListData(); // 获取文件列表
+ console.log("handleUploadFileClose:", uploadFileVisible.value);
+};
+
const handleUploadPicture = () => {
// 处理上传图片的逻辑
//选择图片并上传
};
+const uploadMessageFile = () => {
+ // 处理上传文件的逻辑
+ // 这里可以调用上传文件的API
+ uploadFileVisible.value = true; // 显示上传文件对话框
+ console.log("上传文件:", selectedFiles.value);
+};
+
const handleSelectFileConfirm = () => {
// 处理选中的文件
console.log("选中的文件:", selectedFiles.value);