From 85da3ec0239b677e1722150776c6098c5d18f54d Mon Sep 17 00:00:00 2001 From: x1ao4 Date: Mon, 24 Nov 2025 23:39:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BA=E8=BF=BD=E5=89=A7=E6=97=A5=E5=8E=86?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=8A=B6=E6=80=81=E7=AD=9B=E9=80=89=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/static/css/main.css | 10 ++++++ app/templates/index.html | 75 +++++++++++++++++++++++++++++++++------- 2 files changed, 73 insertions(+), 12 deletions(-) diff --git a/app/static/css/main.css b/app/static/css/main.css index eff2f55..85e8db1 100644 --- a/app/static/css/main.css +++ b/app/static/css/main.css @@ -8402,7 +8402,17 @@ div:has(> .collapse:not(.show)):has(+ .row.title[title^="资源搜索"]) { box-sizing: border-box; } +/* 任务数量指示器悬停时显示文本光标,和其他标题框一致 */ .tasklist-count-single-digit { width: 32px; padding: 0; +} + +.tasklist-count-number { + cursor: text; + user-select: text; +} + +.calendar-filter-row { + margin-bottom: 20px; /* 桌面端保持与下方组件净间距 8px(抵消分类与控制按钮的 -12px 上移) */ } \ No newline at end of file diff --git a/app/templates/index.html b/app/templates/index.html index 4531a19..3102d7b 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -1062,7 +1062,7 @@ class="tasklist-count-indicator ml-2" :class="{'tasklist-count-single-digit': tasklistVisibleCount < 10}" :title="`共${tasklistVisibleCount}个任务`"> - {{ tasklistVisibleCount }} + {{ tasklistVisibleCount }}
@@ -1950,8 +1950,8 @@
-
-
+
+
名称筛选 @@ -1962,13 +1962,13 @@
-
+
任务筛选
- @@ -1978,6 +1978,30 @@
+
+
+
+ 状态筛选 +
+
+ +
+
+ +
+
+
@@ -3257,6 +3281,13 @@ selectedType: (localStorage.getItem('calendar_selected_type') || 'all'), nameFilter: '', taskFilter: '', + statusFilter: (() => { + try { + return localStorage.getItem('calendar_status_filter') || ''; + } catch (e) { + return ''; + } + })(), taskNames: [], viewMode: (localStorage.getItem('calendar_view_mode') === 'month' || localStorage.getItem('calendar_view_mode') === 'poster') ? localStorage.getItem('calendar_view_mode') @@ -3381,6 +3412,9 @@ if (this.calendar.taskFilter && this.calendar.taskFilter.trim() !== '') { list = list.filter(t => (t.task_name || '') === this.calendar.taskFilter); } + if (this.calendar.statusFilter && this.calendar.statusFilter.trim() !== '') { + list = list.filter(t => this.filterTaskByStatus(t, this.calendar.statusFilter)); + } // 按匹配状态和任务名称拼音排序:匹配的项目在前,未匹配的项目在后 try { list.sort((a, b) => { @@ -3650,6 +3684,14 @@ this.initializeCalendarDates(); } }, + 'calendar.statusFilter': function(newVal, oldVal) { + if (this.calendar.viewMode === 'month') { + this.initializeCalendarDates(); + } + try { + localStorage.setItem('calendar_status_filter', newVal || ''); + } catch (e) {} + }, taskStatusFilter(newValue) { try { localStorage.setItem('tasklist_status_filter', newValue || ''); @@ -4403,9 +4445,10 @@ return contentType === this.tasklist.selectedType; } catch (e) { return true; } }, - tasklistFilterByStatus(task) { + // 统一的状态筛选逻辑(任务列表与追剧日历共用) + filterTaskByStatus(task, filterValue) { try { - const filter = this.taskStatusFilter || ''; + const filter = filterValue || ''; if (!filter) return true; if (!task) return false; const taskName = task.taskname || task.task_name || ''; @@ -4436,6 +4479,9 @@ return true; } }, + tasklistFilterByStatus(task) { + return this.filterTaskByStatus(task, this.taskStatusFilter); + }, getTasklistFullStatus(task) { try { if (!task) return ''; @@ -5009,10 +5055,9 @@ // 先进行基础筛选 let filteredEpisodes = this.calendar.episodes.filter(episode => { // 根据筛选条件过滤 + const matchedTask = this.findTaskByShowName(episode.show_name); if (this.calendar.selectedType !== 'all') { - // 通过剧集名称匹配任务,获取内容类型 - const matchedTask = this.findTaskByShowName(episode.show_name); - const episodeContentType = matchedTask ? matchedTask.content_type : 'other'; + const episodeContentType = matchedTask ? (matchedTask.content_type || 'other') : 'other'; if (episodeContentType !== this.calendar.selectedType) { return false; } @@ -5029,12 +5074,16 @@ // 任务筛选:检查任务名称 if (this.calendar.taskFilter && this.calendar.taskFilter.trim() !== '') { - const matchedTask = this.findTaskByShowName(episode.show_name); - const taskName = matchedTask ? matchedTask.task_name : ''; + const taskName = matchedTask ? (matchedTask.task_name || matchedTask.taskname || '') : ''; if (taskName !== this.calendar.taskFilter) { return false; } } + + // 状态筛选:复用任务列表逻辑 + if (!this.filterTaskByStatus(matchedTask, this.calendar.statusFilter)) { + return false; + } return episode.air_date === date; }); @@ -5990,6 +6039,8 @@ this.calendar.nameFilter = ''; } else if (filterType === 'taskFilter') { this.calendar.taskFilter = ''; + } else if (filterType === 'statusFilter') { + this.calendar.statusFilter = ''; } },