From 55cd65899c105f957b0e1238d60bd4793ff1c3e2 Mon Sep 17 00:00:00 2001 From: XuqmGroup Date: Mon, 22 Jun 2026 18:41:37 +0800 Subject: [PATCH] =?UTF-8?q?fix(bugcollect):=20=E8=A1=A5=E5=85=85=E7=BC=BA?= =?UTF-8?q?=E5=A4=B1=E7=9A=84=20statusTag/statusLabel/formatTime=20?= =?UTF-8?q?=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 这三个函数在模板中调用但未在 script 中定义,导致 TypeScript 编译失败。 Co-Authored-By: Claude Sonnet 4.6 --- .../bug-collect/BugCollectIssueDetail.vue | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tenant-platform/src/views/bug-collect/BugCollectIssueDetail.vue b/tenant-platform/src/views/bug-collect/BugCollectIssueDetail.vue index 6b60588..c1c46af 100644 --- a/tenant-platform/src/views/bug-collect/BugCollectIssueDetail.vue +++ b/tenant-platform/src/views/bug-collect/BugCollectIssueDetail.vue @@ -156,8 +156,28 @@ function levelTag(level: string): '' | 'success' | 'warning' | 'info' | 'danger' return map[level?.toLowerCase()] ?? '' } +function statusTag(status: string): '' | 'success' | 'warning' | 'info' | 'danger' { + const map: Record = { + open: 'danger', resolved: 'success', ignored: 'info', + } + return map[status?.toLowerCase()] ?? '' +} +function statusLabel(status: string): string { + const map: Record = { + open: '未解决', resolved: '已解决', ignored: '已忽略', + } + return map[status?.toLowerCase()] ?? status ?? '-' +} +function formatTime(time: string | undefined | null): string { + if (!time) return '-' + try { + return new Date(time).toLocaleString('zh-CN', { hour12: false }) + } catch { + return time + } +} async function handleResolve() { if (!detail.value) return