From 959511916393d9397cea0c8ecf03b204d17ea8d7 Mon Sep 17 00:00:00 2001 From: 18631081161 <2088094923@qq.com> Date: Fri, 16 Jan 2026 15:42:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/src/views/allocations/AllocationList.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/frontend/src/views/allocations/AllocationList.vue b/src/frontend/src/views/allocations/AllocationList.vue index 32105de..8d28cbc 100644 --- a/src/frontend/src/views/allocations/AllocationList.vue +++ b/src/frontend/src/views/allocations/AllocationList.vue @@ -437,7 +437,9 @@ const filteredAllocations = computed(() => { function formatDate(dateStr: string): string { if (!dateStr) return '-' - const date = new Date(dateStr) + // 移除时间字符串末尾的Z(UTC标识),直接当作本地时间处理 + const cleanDateStr = dateStr.replace('Z', '').replace(/\+.*$/, '').replace(/-\d{2}:\d{2}$/, '') + const date = new Date(cleanDateStr) const year = date.getFullYear() const month = String(date.getMonth() + 1).padStart(2, '0') const day = String(date.getDate()).padStart(2, '0')