refactor(workbench): simplify appointment tasks

This commit is contained in:
2026-09-24 12:01:11 +08:00
parent 436d5500f1
commit ddf953b641
28 changed files with 443 additions and 1384 deletions
@@ -260,47 +260,11 @@ describe("workbench runtime API client", () => {
source: "生产工单系统",
dispatcher: "调度中心",
priority: "urgent",
subtasks: [{
id: "wo-1-subtask-1",
title: "阀门开度复核",
summary: "现场复核阀门开度。",
status: "completed",
scheduled_at: "2026-09-17T03:00:00Z",
location: "北区阀门 V-1",
assignee: "北区班组",
duration_minutes: 45,
reply_window_minutes: 20,
stages: [
{
id: "dispatch",
sequence: 1,
title: "派发",
status: "done",
owner: "调度中心",
time_label: "10:50",
description: "已派发。"
},
{
id: "execution",
sequence: 2,
title: "执行中",
status: "done",
owner: "北区班组",
time_label: "11:00—11:45",
description: "现场执行中。"
},
{
id: "reply",
sequence: 3,
title: "待复令",
status: "done",
owner: "北区班组",
time_label: "11:45—12:05",
description: "等待复令。"
}
],
reply_requirements: ["回传阀门开度"]
}]
location: "北区阀门 V-1",
assignee: "北区班组",
feedback_requirements: ["回传阀门开度"],
activity: [{ sequence: 1, occurred_at: "2026-09-17T02:30:00Z", actor: "调度中心",
kind: "created", title: "工单创建", detail: "等待现场复核。" }]
};
const snapshot = parseWorkbenchRuntimeSnapshot({
...runtimeSnapshot,
@@ -315,14 +279,10 @@ describe("workbench runtime API client", () => {
code: "WO-20260917-001",
status: "completed",
source: "生产工单系统",
subtasks: expect.arrayContaining([
expect.objectContaining({
id: "wo-1-subtask-1",
stages: expect.arrayContaining([
expect.objectContaining({ id: "execution", sequence: 2, timeLabel: "11:00—11:45" })
])
})
])
location: "北区阀门 V-1",
assignee: "北区班组",
feedbackRequirements: ["回传阀门开度"],
activity: [expect.objectContaining({ title: "工单创建" })]
})]);
});