From 8f1bfec562bf99063e5b1136d5989094423b8419 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 16 Jan 2026 17:59:37 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=B8=BA=E6=89=80=E6=9C=89=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E9=A1=B5=E9=9D=A2=E5=8D=A1=E7=89=87=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=8F=91=E5=B8=83=E4=BA=BA=E4=BF=A1=E6=81=AF=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/TaskHall.vue | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/frontend/src/views/TaskHall.vue b/frontend/src/views/TaskHall.vue index e23c16d..d8e1466 100644 --- a/frontend/src/views/TaskHall.vue +++ b/frontend/src/views/TaskHall.vue @@ -749,6 +749,12 @@ +
+ + + + 发布人: {{ task.publisherName }} +
@@ -1141,6 +1147,12 @@ +
+ + + + 发布人: {{ task.publisherName }} +
@@ -1557,6 +1569,12 @@ +
+ + + + 发布人: {{ task.publisherName }} +
@@ -1987,6 +2005,12 @@ +
+ + + + 发布人: {{ task.publisherName }} +
@@ -3123,11 +3147,16 @@ const formatDeadline = (deadline: string | undefined) => { } // 格式化时效要求(工时转换为天+小时,基于工作时间配置) +// 🔥 最低时效为1小时:低于1小时的任务显示为1小时 const formatEstimatedTime = (hours: number | undefined) => { if (!hours) return '--' + + // 最低时效1小时:低于1小时的显示为1小时 + const effectiveHours = hours < 1 ? 1 : hours + const workHours = workHoursPerDay.value || 9 // 默认9小时 - const days = Math.floor(hours / workHours) - const remainingHours = Math.round((hours % workHours) * 100) / 100 + const days = Math.floor(effectiveHours / workHours) + const remainingHours = Math.round((effectiveHours % workHours) * 100) / 100 if (days === 0) { return Number.isInteger(remainingHours) ? `${remainingHours}小时` : `${remainingHours.toFixed(1)}小时`