feat(flow): 新增流程图视图(时序图自动生成);导出合并为菜单并支持 drawio;发布 v1.3.0

- 流程图视图:泳道 = 轨道、FS/SS 依赖连线、关键路径高亮、相位阶段栏
  (每个动作行归属覆盖占比最大的分区,重叠分区台阶错位)
- 无前置依赖的动作从「开始」并列引出(并行分支),无后继动作汇入「结束」
- 流程图只读:AI 生成 / 撤销重做 / 动作增删 / 属性与依赖编辑等入口自动置灰,
  左栏视图模式只保留条形 / 圆周(流程图入口在顶部工具栏)
- 导出升级:导出按钮合并为下拉菜单,SVG / PNG 三种视图通用;
  流程图额外支持 drawio(diagrams.net 可继续编辑泳道 / 相位 / 依赖)
- 连线走线统一收敛到 FlowLayout.routes,画布 / SVG / drawio 共用同一几何
- 默认示例升级为完整「装配线节拍」(8 动作 / 3 工位 / 4 相位分区)
- 版本号 1.3.0+16,更新说明 release/RELEASE_NOTES_v1.3.0.md
This commit is contained in:
2026-10-09 13:59:05 +08:00
parent fe2008b604
commit f4ef9b32a5
22 changed files with 1837 additions and 281 deletions
+6 -4
View File
@@ -6,7 +6,8 @@ void main() {
group('station management', () {
test('setStations reassigns actions of a removed station', () {
final AppController c = AppController(project: Project.demo());
expect(c.project.stations.length, 2);
// 演示工程至少包含两个工位;移除第二个工位后其动作应被重新分配。
expect(c.project.stations.length, greaterThan(1));
final String removed = c.project.stations[1].id;
expect(c.project.actions.any((Action a) => a.stationId == removed), isTrue);
@@ -26,13 +27,14 @@ void main() {
test('setStations can add and rename stations', () {
final AppController c = AppController(project: Project.demo());
final int before = c.project.stations.length;
final List<Station> next = <Station>[
...c.project.stations,
const Station(id: 'ST3', name: '工位 3', order: 2, color: 0xFF4ADE80),
const Station(id: 'ST9', name: '工位 9', order: 9, color: 0xFF4ADE80),
];
c.setStations(next);
expect(c.project.stations.length, 3);
expect(c.project.stationById('ST3')?.name, '工位 3');
expect(c.project.stations.length, before + 1);
expect(c.project.stationById('ST9')?.name, '工位 9');
});
});
}