feat(workbench): integrate operational workflows and map state
This commit is contained in:
@@ -18,7 +18,7 @@ export type RunningWorkflowDefinition = {
|
||||
|
||||
export type RunningWorkflowStepStatus = "done" | "current" | "pending";
|
||||
|
||||
export const runningWorkflowDefinitions: Record<ScheduledConditionTaskId, RunningWorkflowDefinition> = {
|
||||
export const runningWorkflowDefinitions: Partial<Record<ScheduledConditionTaskId, RunningWorkflowDefinition>> = {
|
||||
"scada-diagnosis": {
|
||||
title: "SCADA 诊断流程",
|
||||
reportLabel: "生成诊断报告",
|
||||
@@ -142,37 +142,6 @@ export const runningWorkflowDefinitions: Record<ScheduledConditionTaskId, Runnin
|
||||
detail: "输出启停优化、压力设定和继续观察条件。"
|
||||
}
|
||||
]
|
||||
},
|
||||
"water-quality-complaint": {
|
||||
title: "水质投诉调查流程",
|
||||
reportLabel: "形成调查结论",
|
||||
steps: [
|
||||
{
|
||||
id: "accept-work-order",
|
||||
title: "接收投诉工单",
|
||||
detail: "读取投诉类型、发生位置、时间和问题描述,建立事件与工单的可追溯关联。"
|
||||
},
|
||||
{
|
||||
id: "check-upstream-quality",
|
||||
title: "校验上游水质监测",
|
||||
detail: "核查上游监测点的数据完整性、时效性及关键水质指标是否处于正常范围。"
|
||||
},
|
||||
{
|
||||
id: "locate-supply-segment",
|
||||
title: "研判供水链路",
|
||||
detail: "若上游存在异常,转入水厂或管网排查;若上游正常,继续核查小区二次供水环节。"
|
||||
},
|
||||
{
|
||||
id: "check-secondary-supply",
|
||||
title: "核查二次供水",
|
||||
detail: "检查水箱、泵房、消毒记录、清洗记录及同区域投诉,判断是否为局部设施问题。"
|
||||
},
|
||||
{
|
||||
id: "prepare-disposition",
|
||||
title: "汇总结论与处置",
|
||||
detail: "整理证据、责任环节和建议动作,明确需要人工确认、采样或现场处置的事项。"
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -352,6 +352,7 @@ function createUpcomingWorkOrders(now: Date, currentMinutesOfDay: number): Sched
|
||||
source: workOrder.source,
|
||||
dispatcher: workOrder.dispatcher,
|
||||
priority: workOrder.priority,
|
||||
dataSource: "mock" as const,
|
||||
subtasks: createWorkOrderSubtasks(workOrder, now, scheduledAtDate, phase)
|
||||
};
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user