refactor(model): 精简内置默认示例(8→5 个动作、4→3 个相位分区)

- 默认示例保留:上料 → 定位夹紧 → 伺服下压 → 超声焊接(SS 并行)→ 视觉检测,
  共 5 个动作 / 4 条依赖 / 3 个工位 / 3 个相位分区;保留 FS / SS 与多泳道结构,
  三种视图仍可完整演示,不再堆默认数据;
- v1.3.1 更新说明补充「默认示例数据精简」一条;演示截图本地同步重新生成(不入库)。
This commit is contained in:
2026-10-09 15:21:44 +08:00
parent d0e6ce457e
commit 7dcb95db4a
2 changed files with 8 additions and 37 deletions
+7 -37
View File
@@ -903,10 +903,11 @@ class Project {
/// 构造内置演示项目(装配线节拍方案)。
///
/// 与演示截图(`demo/tablet-*.png`)使用同一份数据:3 个工位、8 个动作
/// (含无前置依赖的并行分支「A8 并行质检」)与 4 个相位分区,
/// 首次启动即可完整展示条形 / 圆周 / 流程图三种视图。
/// 测试助手 `demoTiming()` 也直接引用本方法,保证「本地构建 == 演示截图」。
/// 首次启动展示用的精简示例:3 个工位、5 个动作(上料 → 定位夹紧 →
/// 伺服下压 → 超声焊接(SS 并行)→ 视觉检测)、3 个相位分区。
/// 保留 FS / SS 两种依赖与多泳道结构,足以展示条形 / 圆周 / 流程图三种视图,
/// 又不会让默认数据显得臃肿。测试助手 `demoTiming()` 直接引用本方法,
/// 保证「本地构建 == 演示截图」。
static Project demo() {
return Project(
name: '装配线节拍',
@@ -963,49 +964,18 @@ class Project {
name: '视觉检测',
stationId: 'ST3',
driver: '相机 C1',
startAngle: 160,
startAngle: 200,
durationAngle: 70,
layer: 1,
color: 0xFF7C5CFF,
deps: <Dependency>[Dependency(fromId: 'A4', toId: 'A5', type: DepType.fs)]),
const Action(
id: 'A6',
name: '分选下料',
stationId: 'ST3',
driver: '气缸 Y3',
startAngle: 200,
durationAngle: 70,
layer: 2,
color: 0xFFFF9F7C,
deps: <Dependency>[Dependency(fromId: 'A5', toId: 'A6', type: DepType.fs)]),
const Action(
id: 'A7',
name: '清洁吹气',
stationId: 'ST1',
driver: '电磁阀 V1',
startAngle: 240,
durationAngle: 80,
layer: 3,
color: 0xFF34D399,
deps: <Dependency>[Dependency(fromId: 'A6', toId: 'A7', type: DepType.fs)]),
// 无前置依赖的并行动作:与「动作1」同时开始,独占一条泳道(并列分支)。
const Action(
id: 'A8',
name: '并行质检',
stationId: 'ST3',
driver: '相机 C2',
startAngle: 0,
durationAngle: 40,
layer: 3,
color: 0xFF38BDF8),
],
units: const UnitSettings(timeUnit: TimeUnit.s),
viewState: const ViewState(mode: ViewMode.bar),
phaseZones: const <PhaseZone>[
PhaseZone(name: '上料相位', startAngle: 0, endAngle: 70),
PhaseZone(name: '加工相位', startAngle: 70, endAngle: 200),
PhaseZone(name: '检测相位', startAngle: 200, endAngle: 300),
PhaseZone(name: '下料相位', startAngle: 300, endAngle: 360),
PhaseZone(name: '检测相位', startAngle: 200, endAngle: 360),
],
);
}