From cf2de7d64d209b456b18573a78ca0f2c491f2493 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BB=9D=E5=B0=98?= <237809796@qq.com> Date: Mon, 17 Aug 2026 10:15:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D:=20AI=20=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E5=88=86=E6=9E=90=E8=BF=9B=E5=BA=A6=E4=B8=8E=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E6=B7=B7=E6=B7=86,=E5=85=A8=E6=88=90?= =?UTF-8?q?=E5=8A=9F=E6=97=B6=E4=B8=8D=E5=86=8D=E8=AF=AF=E6=98=BE=E7=BA=A2?= =?UTF-8?q?=E8=89=B2=E9=94=99=E8=AF=AF=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/modals/ImportModal.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/modals/ImportModal.vue b/src/components/modals/ImportModal.vue index 0423870..5c58f42 100644 --- a/src/components/modals/ImportModal.vue +++ b/src/components/modals/ImportModal.vue @@ -27,6 +27,7 @@ const loading = ref(false) const loaded = ref(false) const analyzing = ref(false) // AI 分析中 const analyzeDone = ref(false) // AI 分析完成 +const analyzeProgress = ref('') // AI 分析进度文案 const analyzeError = ref('') // AI 分析错误 const showImages = ref(true) const showDocs = ref(true) @@ -81,6 +82,7 @@ async function handleFiles(fl: FileList | null) { loading.value = true loaded.value = false analyzeDone.value = false + analyzeProgress.value = '' analyzeError.value = '' try { const scanned = await scanFiles(fl) @@ -108,11 +110,12 @@ async function runAiAnalysis() { } analyzing.value = true + analyzeProgress.value = '' analyzeError.value = '' let successCount = 0 for (const doc of docs) { - analyzeError.value = `正在 AI 分析(${successCount + 1}/${docs.length}):${doc.name}` + analyzeProgress.value = `正在 AI 分析(${successCount + 1}/${docs.length}):${doc.name}` try { await aiAnalyzeDocument(doc) successCount++ @@ -125,6 +128,7 @@ async function runAiAnalysis() { } analyzing.value = false + analyzeProgress.value = '' analyzeDone.value = successCount > 0 if (successCount > 0 && !analyzeError.value) { emit('toast', `AI 完成 ${successCount} 个文档分析,共生成 ${docs.reduce((s, d) => s + (d.slides?.length || 0), 0)} 页幻灯片`) @@ -198,6 +202,7 @@ function clearFiles() { entries.value = [] loaded.value = false analyzeDone.value = false + analyzeProgress.value = '' analyzeError.value = '' } @@ -268,7 +273,7 @@ function textPreview(data: string, maxLen = 80): string {