diff --git a/frontend/src/components/TaskTree/TaskFlowView.tsx b/frontend/src/components/TaskTree/TaskFlowView.tsx index 08007b0..9ecd5a6 100644 --- a/frontend/src/components/TaskTree/TaskFlowView.tsx +++ b/frontend/src/components/TaskTree/TaskFlowView.tsx @@ -3,7 +3,7 @@ */ import { memo, useMemo, useState, useEffect } from "react"; import { Image } from "antd"; -import { FileText, X } from "lucide-react"; +import { FileText, User, X } from "lucide-react"; import type { TaskResponse } from "../../types/api"; import { TASK_STATUS } from "../../types/api"; import { getStatusConfig } from "../../constants/task"; @@ -111,26 +111,31 @@ const SlimCard = memo(function SlimCard({ return (
-
{main ? "主线" : "分支"}
-

{task.task_name}

+ {/* 左上角:主线/分支标签 + 状态标签并排 */}
+ {main ? "主线" : "分支"} {cfg.label} - {/* 在库任务不单独显示负责人,由下方"转入在库"统一展示实际操作人 */} +
+

{task.task_name}

+ {/* 操作人(带用户图标)+ 在库转入人 */} +
{!isWarehouse && ( - {assigneeName || task.assignee_id || "—"} + + {assigneeName || task.assignee_id || "—"} + + )} + {/* 📥 在库任务:显示实际执行"转入在库"的操作人(任务负责人) */} + {isWarehouse && task.assignee_id && ( + 📥 转入在库: {assigneeName || task.assignee_id} )}
- {/* 单行时间 */} + {/* 单行时间(精确到分钟) */}

- ⏰ {fmtTime(task.created_at).split(" ")[0]} - {task.completed_at ? ` → ${fmtTime(task.completed_at).split(" ")[0]}` : " → 至今"} + ⏰ {fmtTime(task.created_at)} + {task.completed_at ? ` → ${fmtTime(task.completed_at)}` : " → 至今"}

{legacy &&

源自: {assigneeName || (findParent(task)?.assignee_id) || "历史任务"}

} {isNestedSpawn &&

协助: {findParent(task)?.assignee_id || "—"}

} - {/* 📥 在库任务:显示实际执行"转入在库"的操作人(任务负责人) */} - {isWarehouse && task.assignee_id && ( -

📥 转入在库: {assigneeName || task.assignee_id}

- )} {/* 操作按钮 */} {active && isOwner && (
@@ -145,10 +150,11 @@ const SlimCard = memo(function SlimCard({
)} - {/* 记录 */} + {/* 记录:右下角普通文本链接 + 蓝色 > 箭头 */} {task.records && task.records.length > 0 && ( -
{ e.stopPropagation(); onViewRecords?.(task); }} className={`${sz.record} cursor-pointer rounded bg-blue-50 text-blue-600 hover:bg-blue-100`}> - {task.records.length}条 +
{ e.stopPropagation(); onViewRecords?.(task); }} className={`${sz.record} flex cursor-pointer items-center justify-end gap-0.5 text-blue-600 hover:text-blue-400`}> + {task.records.length}条 +
)}