feat: add approval flow dwell time metadata

This commit is contained in:
gitea committed 2026-09-05 21:16:26 +08:00
1 parent a2d078aafe
commit 9ddbd0390d
5 files changed
+33 -5

No files matched your search

+3 -1
View File
@@ -243,6 +243,8 @@ export async function handleBillCommand(
entry.nodeName || "-",
entry.action || "-",
entry.operator?.name || (entry.automatic ? "系统" : "-"),
entry.durationMs !== undefined ? `${Math.round(entry.durationMs / 1000)} 秒` : "-",
entry.skipped ? "自动跳过" : entry.automatic ? "自动" : "",
entry.comment || "-",
]);
const pendingRows = flow.pending.map((node) => [
@@ -256,7 +258,7 @@ export async function handleBillCommand(
`流程 ID: ${flow.flowId || "-"} 当前节点: ${flow.currentNode || "-"}`,
"",
"--- 历史流转 ---",
flow.history.length ? printTable(["时间", "节点", "动作", "处理人", "意见"], historyRows) : " (暂无历史记录)",
flow.history.length ? printTable(["时间", "节点", "动作", "处理人", "停留时长", "标记", "意见"], historyRows) : " (暂无历史记录)",
"",
"--- 后续节点 ---",
flow.pending.length ? printTable(["状态", "节点", "类型", "审批人"], pendingRows) : " (暂无后续节点)",