From 993d6247f422a3aa19f6011177cebc33c6bd1e1b Mon Sep 17 00:00:00 2001 From: buaixuexideshitongxue <2936013465@qq.com> Date: Mon, 15 Jun 2026 17:41:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=A0=87=E7=BA=A2=E6=97=B6=E9=95=BF?= =?UTF-8?q?=E4=B8=BA1=E5=A4=A9=E7=9A=84=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/negative/action-history.vue | 24 ++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/src/components/negative/action-history.vue b/src/components/negative/action-history.vue index 2954198..0539a7a 100644 --- a/src/components/negative/action-history.vue +++ b/src/components/negative/action-history.vue @@ -18,6 +18,7 @@
用时 {{ @@ -68,10 +69,29 @@ catchStore.getDicts(["approveShouldHighlight"]); // 在 computed 中通过 store 直接访问 const highlightKeywords = computed(() => catchStore.dict.approveShouldHighlight || []); const shouldHighlight = (item) => { - debugger const keywords = highlightKeywords.value; const matchKeyword = keywords.some(k => item.actionName?.includes(k.dictLabel)); - return item.duration > 86400 && matchKeyword; + if (!matchKeyword) return false; + + return item.duration > 86400; +} +const getOvertimeTip = (item) => { + const keywords = highlightKeywords.value; + const matchKeyword = keywords.some(k => item.actionName?.includes(k.dictLabel)); + if (!matchKeyword || !item.duration) { + return ''; + } + + if (item.duration <= 86400) { + return ''; + } + + const overtimeSeconds = item.duration - 86400; + const days = Math.floor(overtimeSeconds / 86400); + const hours = Math.floor((overtimeSeconds % 86400) / 3600); + const minutes = Math.floor((overtimeSeconds % 3600) / 60); + + return `超时 ${days}天${hours}时${minutes}分`; } const activeHistory = ref({}) function handleShowDetai(item) {