From a9066b9046b068941c31c89a6b5033ed43797bda Mon Sep 17 00:00:00 2001 From: liRQ <813144884@qq.com> Date: Sat, 27 Jun 2026 13:14:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=9F=E8=83=BD=EF=BC=9A=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E7=94=B5=E5=BD=B1=E7=AE=80=E4=BB=8B=E3=80=81=E5=AF=BC=E6=BC=94?= =?UTF-8?q?=E5=92=8C=E4=B8=BB=E6=BC=94=E4=BF=A1=E6=81=AF=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=EF=BC=8C=E4=BC=98=E5=8C=96=E5=88=AE=E5=89=8A=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vue/src/App.vue | 79 +++- vue/src/components/RecordDialog.vue | 18 +- vue/src/components/SettingsView.vue | 698 ++++++++++++++++++++++++++++ vue/src/style.css | 145 +++++- vue/src/utils/data.js | 9 +- 5 files changed, 920 insertions(+), 29 deletions(-) create mode 100644 vue/src/components/SettingsView.vue diff --git a/vue/src/App.vue b/vue/src/App.vue index 5414b1a..0cd4ca1 100644 --- a/vue/src/App.vue +++ b/vue/src/App.vue @@ -513,6 +513,19 @@
{{ tag }}
+ +
+ 简介: + {{ scrapeStatusData.overview }} +
+ +
+ 导演:{{ scrapeStatusData.directors }} +
+ +
+ 主演:{{ scrapeStatusData.casts }} +
正在查询刮削状态... @@ -614,12 +627,23 @@
-
- 👤 {{ item.username || '用户 ' + (item.userId || idx) }} - - 处理: {{ item.processed || 0 }} | 成功: {{ item.success || 0 }} | 失败: {{ item.failed || 0 }} | 跳过: {{ item.skipped || 0 }} - -
+
@@ -1923,10 +1947,11 @@ function openEditRecord(item) { editingRecord.value = { id: item.id, title: item.title || '', - subtitle: item.subtitle || '', originalName: item.originalName || '', description: item.description || '', category: item.category || '', + directors: item.directors || '', + casts: item.casts || '', updatedAt: item.updatedAt || '', poster: item.poster || '', tags: [...(item.tags || [])], @@ -2001,12 +2026,13 @@ function handleAddFile(parentId) { editingRecord.value = { id: null, title: '', - subtitle: '', tags: [], score: 0, originalName: '', description: '', category: '', + directors: '', + casts: '', sheetId: activeSheetId.value, parentId: parentId || null, type: 'file', @@ -2331,11 +2357,12 @@ async function handleSaveRecord(record) { const result = await updateMovieInDrive(driveId, record.id, { title: record.title, originalName: record.originalName, - subtitle: record.subtitle, description: record.description, rating: record.score, tags: Array.isArray(record.tags) ? record.tags.join(',') : '', category: record.category, + directors: record.directors, + casts: record.casts, }) const updatedData = result?.data || {} @@ -2343,9 +2370,10 @@ async function handleSaveRecord(record) { ...record, title: updatedData.title || record.title, originalName: updatedData.originalName || record.originalName, - subtitle: updatedData.subtitle ?? record.subtitle, description: updatedData.description ?? record.description, category: updatedData.category ?? record.category, + directors: updatedData.directors ?? record.directors, + casts: updatedData.casts ?? record.casts, score: Number(updatedData.rating ?? record.score ?? 0), tags: updatedData.tags ?? record.tags ?? [], updatedAt: updatedData.updateTime || updatedData.createTime || record.updatedAt || new Date().toLocaleString('zh-CN', { hour12: false }), @@ -2488,7 +2516,6 @@ async function loadRecommendMovies() { recommendMovies.value = result.data.list.map(movie => ({ id: movie.id, title: movie.title || '未知标题', - subtitle: movie.subtitle || '', description: movie.description || '', posterUrl: movie.posterUrl || '', rating: movie.rating || 0, @@ -2621,6 +2648,9 @@ function handleScrapeStatus(node) { rating: data.rating, category: data.category, tags: data.tags, + overview: data.overview || '', + casts: data.casts || '', + directors: data.directors || '', error: data.error || data.message, } } else { @@ -2640,10 +2670,37 @@ function getStatusText(status) { scraping: '刮削中', success: '刮削成功', failed: '刮削失败', + partial: '部分成功', + skipped: '已跳过', } return statusMap[status] || '未知状态' } +/** + * 判断刮削消息的状态 + * @param {string} msg - 消息文本 + * @returns {string} 'success' | 'failed' | 'skipped' + */ +function getMessageStatus(msg) { + if (!msg) return 'skipped' + + // 成功的标志 + if (msg.includes('刮削成功') || msg.includes('成功') || msg.includes('Successfully')) { + return 'success' + } + + // 失败的标志 + if (msg.includes('刮削失败') || msg.includes('失败') || + msg.includes('未找到') || msg.includes('错误') || + msg.includes('Error') || msg.includes('Failed') || + msg.includes('不存在') || msg.includes('跳过')) { + return 'failed' + } + + // 默认视为跳过(如:已存在、无需处理等) + return 'skipped' +} + // 多选模式相关函数 function toggleMultiSelectMode() { multiSelectMode.value = !multiSelectMode.value diff --git a/vue/src/components/RecordDialog.vue b/vue/src/components/RecordDialog.vue index b9776e1..c28ab69 100644 --- a/vue/src/components/RecordDialog.vue +++ b/vue/src/components/RecordDialog.vue @@ -16,10 +16,6 @@ 文件名 -