From 9acfee85064404c5a568a120570fcd0843991e77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=96=87=E5=88=9A?= Date: Thu, 15 May 2025 09:11:45 +0000 Subject: [PATCH 1/4] Initial commit --- README.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..39f1d79 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# 政企RAG + +政企RAG \ No newline at end of file -- Gitee From 8f4fd7e6be8c6fa9fd6998ae181268b87bdba7a8 Mon Sep 17 00:00:00 2001 From: mkcmgl <2515318247@qq.com> Date: Tue, 11 Nov 2025 11:16:08 +0800 Subject: [PATCH 2/4] fix:preview video --- src/components/new-document-link.tsx | 102 ++++++++++----------------- 1 file changed, 38 insertions(+), 64 deletions(-) diff --git a/src/components/new-document-link.tsx b/src/components/new-document-link.tsx index ff0d689..02d75a5 100644 --- a/src/components/new-document-link.tsx +++ b/src/components/new-document-link.tsx @@ -63,13 +63,11 @@ const NewDocumentLink = ({ const lowerFilename = filename.toLowerCase(); return lowerFilename.endsWith('.pdf'); }; - // 检查是否为Word文档 const isDocFile = (filename: string) => { const lowerFilename = filename.toLowerCase(); return lowerFilename.endsWith('.doc') || lowerFilename.endsWith('.docx'); }; - // 初始化 Video.js 播放器 useEffect(() => { console.log(`modalVisible: ${modalVisible}, videoUrl: ${videoUrl}, isVideoFile: ${isVideoFile(documentName)}`); @@ -196,17 +194,14 @@ const NewDocumentLink = ({ }, [modalVisible, videoUrl, documentName]); const handleClick = async (e: React.MouseEvent) => { - console.log(`1111111111111111111`, e) if (documentId && (isVideoFile(documentName) || isImageFile(documentName) || isPdfFile(documentName) || isDocFile(documentName))) { e.preventDefault(); // PDF文件使用clickDocumentButton if (isPdfFile(documentName)) { - console.log(`22222222222`, isPdfFile(documentName)) clickDocumentButton?.(documentId, {} as any); return; } - // DOC/DOCX 预览 if (isDocFile(documentName)) { setModalVisible(true); @@ -224,7 +219,6 @@ const NewDocumentLink = ({ } return; } - // 图片和视频文件使用弹窗 setModalVisible(true); setLoading(true); @@ -251,61 +245,6 @@ const NewDocumentLink = ({ } }; - const renderPreview = () => { - if (loading) { - return
加载中...
; - } - if (docxPath) { - return ; - } - if (docUrl) { - return ( -