fix: 实际耗时改为精确时间戳计算(精确到0.5h)

之前用日期+工作日×8h 计算耗时太粗糙,现改为:
- DevTask startDate/completedAt 使用完整 ISO 时间戳(含时分秒)
- TestCase startedAt/completedAt 同上
- 耗时 = (endTimestamp - startTimestamp) / 3600000,精确到0.5h
- 详情抽屉显示精确到分钟的时间(YYYY-MM-DD HH:mm)

例如:08:00 开始,10:30 提测,耗时 2.5h(不再是8h)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Script Generator
2026-06-12 16:11:51 +08:00
parent 664330fe11
commit c86e87f95b
5 changed files with 17 additions and 26 deletions

View File

@@ -161,7 +161,7 @@ export function DevTaskDetailDrawer({ taskId, allTaskIds, onClose }: Props) {
<div className="flex items-center gap-2">
<Play className="h-3 w-3 text-[var(--ink-muted)]" />
<span className="text-[var(--ink-muted)]"></span>
<span className="text-[var(--ink)]">{task.startDate}</span>
<span className="text-[var(--ink)]">{task.startDate.slice(0, 16).replace('T', ' ')}</span>
</div>
)}
{task.dueDate && (
@@ -175,7 +175,7 @@ export function DevTaskDetailDrawer({ taskId, allTaskIds, onClose }: Props) {
<div className="flex items-center gap-2">
<Calendar className="h-3 w-3 text-[var(--ink-muted)]" />
<span className="text-[var(--ink-muted)]"></span>
<span className="text-emerald-600 font-medium">{task.completedAt}</span>
<span className="text-emerald-600 font-medium">{task.completedAt.slice(0, 16).replace('T', ' ')}</span>
</div>
)}
</div>