diff --git a/admin-frontend-vue/src/components/NotificationBell.vue b/admin-frontend-vue/src/components/NotificationBell.vue index 258c0b8c9..48b165889 100644 --- a/admin-frontend-vue/src/components/NotificationBell.vue +++ b/admin-frontend-vue/src/components/NotificationBell.vue @@ -145,6 +145,7 @@ import { readLastNotifiedId, writeLastNotifiedId, } from '@/layout/notification-bell-model' +import { todayDateInput } from '@/utils/datetime' const PAGE_SIZE = 10 @@ -162,13 +163,14 @@ const loading = ref(false) const markingAll = ref(false) const loadError = ref('') const keyword = ref('') -const startDate = ref('') -const endDate = ref('') +const startDate = ref(todayDateInput()) +const endDate = ref(todayDateInput()) const badgeText = computed(() => formatUnreadBadge(unreadCount.value)) const groupedItems = computed(() => groupNotificationsByDay(items.value)) const totalPages = computed(() => Math.max(1, Math.ceil(total.value / PAGE_SIZE))) -const hasFilter = computed(() => Boolean(keyword.value.trim() || startDate.value || endDate.value)) +/** 日期恒为「当天」是默认视图、不算主动筛选:若计入,下方「无筛选才记录已提醒 id」的分支会永久失效。 */ +const hasFilter = computed(() => Boolean(keyword.value.trim())) /** * el-date-picker 的绑定桥:日期区间在内部仍用 startDate/endDate 两个 ref 表示 @@ -279,8 +281,8 @@ function onKeywordInput() { function resetFilters() { keyword.value = '' - startDate.value = '' - endDate.value = '' + startDate.value = todayDateInput() + endDate.value = todayDateInput() void loadPage(1) } diff --git a/admin-frontend-vue/src/pages/account/UserSecretUsagePage.vue b/admin-frontend-vue/src/pages/account/UserSecretUsagePage.vue index 5eac0d9c8..d6ff78a3e 100644 --- a/admin-frontend-vue/src/pages/account/UserSecretUsagePage.vue +++ b/admin-frontend-vue/src/pages/account/UserSecretUsagePage.vue @@ -2,6 +2,7 @@ import { computed, onMounted, ref } from 'vue' import { ElMessage } from 'element-plus' import OldPagination from '@/components/OldPagination.vue' +import { todayDateInput } from '@/utils/datetime' import { fetchUserSecretUsage, type AdminUserSecretUsageRow, @@ -19,8 +20,8 @@ const total = ref(0) const page = ref(1) const pageSize = ref(15) const keyword = ref('') -const startDate = ref('') -const endDate = ref('') +const startDate = ref(todayDateInput()) +const endDate = ref(todayDateInput()) const groupFilter = ref(null) const groupOptions = ref([]) @@ -68,8 +69,8 @@ function search() { function reset() { keyword.value = '' - startDate.value = '' - endDate.value = '' + startDate.value = todayDateInput() + endDate.value = todayDateInput() groupFilter.value = null page.value = 1 load() @@ -180,7 +181,7 @@ onMounted(load) - {{ keyword || startDate || endDate || groupFilter ? '暂无匹配记录' : '暂无用量记录' }} + {{ keyword || groupFilter ? '暂无匹配记录' : '暂无用量记录' }} diff --git a/admin-frontend-vue/src/pages/asin/DedupeRegistryPage.vue b/admin-frontend-vue/src/pages/asin/DedupeRegistryPage.vue index f23fc117b..16620a620 100644 --- a/admin-frontend-vue/src/pages/asin/DedupeRegistryPage.vue +++ b/admin-frontend-vue/src/pages/asin/DedupeRegistryPage.vue @@ -1,5 +1,5 @@ - 加载中... + 加载中... - - {{ keyword || sourceFilter || startDate || endDate ? '暂无匹配日志' : '暂无日志上报(客户端/采集机上报后自动出现在这里)' }} + + {{ sourceFilter || uidFilter ? '暂无匹配日志' : '暂无日志上报(客户端/采集机上报后自动出现在这里)' }} diff --git a/admin-frontend-vue/src/pages/records/RecordsHistoryPage.vue b/admin-frontend-vue/src/pages/records/RecordsHistoryPage.vue index 3436f2722..75ec56421 100644 --- a/admin-frontend-vue/src/pages/records/RecordsHistoryPage.vue +++ b/admin-frontend-vue/src/pages/records/RecordsHistoryPage.vue @@ -1,7 +1,7 @@