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)}小时`