This commit is contained in:
艾竹
2023-03-10 12:09:13 +08:00
parent e4f6335224
commit b3c7e1efec
20 changed files with 442 additions and 255 deletions

View File

@@ -43,31 +43,31 @@ namespace AIStudio.Wpf.Flowchart
{
base.Init();
DesignerItemViewModelBase start = new StartFlowNode() { Left = 100, Top = 0, ItemWidth = 80, ItemHeight = 40, Color = Colors.Yellow.ToString() };
DesignerItemViewModelBase start = new StartFlowNode() { Left = 100, Top = 0, ItemWidth = 80, ItemHeight = 40, StatusColor = Colors.Yellow.ToString() };
DiagramViewModel.DirectAddItemCommand.Execute(start);
DesignerItemViewModelBase middle1 = new MiddleFlowNode() { Left = 100, Top = 100, ItemWidth = 80, ItemHeight = 40, Color = Colors.Yellow.ToString(), Text = "主管审批", UserIds= new List<string> { "操作员1", "操作员2" }, ActType = "or" };
DesignerItemViewModelBase middle1 = new MiddleFlowNode() { Left = 100, Top = 100, ItemWidth = 80, ItemHeight = 40, StatusColor = Colors.Yellow.ToString(), Text = "主管审批", UserIds= new List<string> { "操作员1", "操作员2" }, ActType = "or" };
DiagramViewModel.DirectAddItemCommand.Execute(middle1);
DesignerItemViewModelBase decide = new DecideFlowNode() { Left = 100, Top = 200, ItemWidth = 80, ItemHeight = 40, Color = Colors.Yellow.ToString(), Text = "5" };
DesignerItemViewModelBase decide = new DecideFlowNode() { Left = 100, Top = 200, ItemWidth = 80, ItemHeight = 40, StatusColor = Colors.Yellow.ToString(), Text = "5" };
DiagramViewModel.DirectAddItemCommand.Execute(decide);
DesignerItemViewModelBase middle2 = new MiddleFlowNode() { Left = 200, Top = 300, ItemWidth = 80, ItemHeight = 40, Color = Colors.Yellow.ToString(), Text = "分管领导", UserIds = new List<string> { "操作员1", "操作员2" }, ActType = "and", DoubleApprove = true };
DesignerItemViewModelBase middle2 = new MiddleFlowNode() { Left = 200, Top = 300, ItemWidth = 80, ItemHeight = 40, StatusColor = Colors.Yellow.ToString(), Text = "分管领导", UserIds = new List<string> { "操作员1", "操作员2" }, ActType = "and", DoubleApprove = true };
DiagramViewModel.DirectAddItemCommand.Execute(middle2);
DesignerItemViewModelBase cobegin = new COBeginFlowNode() { Left = 100, Top = 400, ItemWidth = 80, ItemHeight = 40, Color = Colors.Yellow.ToString() };
DesignerItemViewModelBase cobegin = new COBeginFlowNode() { Left = 100, Top = 400, ItemWidth = 80, ItemHeight = 40, StatusColor = Colors.Yellow.ToString() };
DiagramViewModel.DirectAddItemCommand.Execute(cobegin);
DesignerItemViewModelBase middle3 = new MiddleFlowNode() { Left = 100, Top = 500, ItemWidth = 80, ItemHeight = 40, Color = Colors.Yellow.ToString(), Text = "财务审批", UserIds = new List<string> { "Admin" }, ActType = "or", DoubleApprove = true };
DesignerItemViewModelBase middle3 = new MiddleFlowNode() { Left = 100, Top = 500, ItemWidth = 80, ItemHeight = 40, StatusColor = Colors.Yellow.ToString(), Text = "财务审批", UserIds = new List<string> { "Admin" }, ActType = "or", DoubleApprove = true };
DiagramViewModel.DirectAddItemCommand.Execute(middle3);
DesignerItemViewModelBase middle4 = new MiddleFlowNode() { Left = 200, Top = 500, ItemWidth = 80, ItemHeight = 40, Color = Colors.Yellow.ToString(), Text = "人力审批", RoleIds = new List<string> { "操作员", "管理员" }, ActType = "or", DoubleApprove = true };
DesignerItemViewModelBase middle4 = new MiddleFlowNode() { Left = 200, Top = 500, ItemWidth = 80, ItemHeight = 40, StatusColor = Colors.Yellow.ToString(), Text = "人力审批", RoleIds = new List<string> { "操作员", "管理员" }, ActType = "or", DoubleApprove = true };
DiagramViewModel.DirectAddItemCommand.Execute(middle4);
DesignerItemViewModelBase coend = new COEndFlowNode() { Left = 100, Top = 600, ItemWidth = 80, ItemHeight = 40, Color = Colors.Yellow.ToString() };
DesignerItemViewModelBase coend = new COEndFlowNode() { Left = 100, Top = 600, ItemWidth = 80, ItemHeight = 40, StatusColor = Colors.Yellow.ToString() };
DiagramViewModel.DirectAddItemCommand.Execute(coend);
DesignerItemViewModelBase end = new EndFlowNode() { Left = 100, Top = 700, ItemWidth = 80, ItemHeight = 40, Color = Colors.Yellow.ToString() };
DesignerItemViewModelBase end = new EndFlowNode() { Left = 100, Top = 700, ItemWidth = 80, ItemHeight = 40, StatusColor = Colors.Yellow.ToString() };
DiagramViewModel.DirectAddItemCommand.Execute(end);
ConnectionViewModel connector1 = new ConnectionViewModel(start.BottomConnector, middle1.TopConnector, _service.DrawModeViewModel.LineDrawMode, _service.DrawModeViewModel.LineRouterMode);