mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-03 00:00:57 +08:00
99 lines
2.4 KiB
C#
99 lines
2.4 KiB
C#
using AIStudio.Wpf.DiagramHelper.Controls;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Windows;
|
|
using AIStudio.Wpf.DiagramDesigner;
|
|
|
|
namespace AIStudio.Wpf.Flowchart.ViewModels
|
|
{
|
|
public class MiddleFlowNode : FlowNode
|
|
{
|
|
public MiddleFlowNode() : base(NodeKinds.Middle)
|
|
{
|
|
|
|
}
|
|
|
|
public MiddleFlowNode(IDiagramViewModel parent, DesignerItemBase designer) : base(parent, designer)
|
|
{
|
|
|
|
}
|
|
|
|
private List<string> _userIds = new List<string>();
|
|
[Browsable(true)]
|
|
[StyleName("UserIdsStyle")]
|
|
public List<string> UserIds
|
|
{
|
|
get
|
|
{
|
|
return _userIds;
|
|
}
|
|
set
|
|
{
|
|
SetProperty(ref _userIds, value);
|
|
}
|
|
}
|
|
|
|
private List<string> _roleIds = new List<string>();
|
|
[Browsable(true)]
|
|
[StyleName("RoleIdsStyle")]
|
|
public List<string> RoleIds
|
|
{
|
|
get
|
|
{
|
|
return _roleIds;
|
|
}
|
|
set
|
|
{
|
|
SetProperty(ref _roleIds, value);
|
|
}
|
|
}
|
|
|
|
private string _actType;
|
|
[Browsable(true)]
|
|
[StyleName("ActTypeStyle")]
|
|
public string ActType
|
|
{
|
|
get
|
|
{
|
|
return _actType;
|
|
}
|
|
set
|
|
{
|
|
SetProperty(ref _actType, value);
|
|
}
|
|
}
|
|
|
|
protected override void ExecuteEditCommand(object param)
|
|
{
|
|
if (IsReadOnly == true) return;
|
|
|
|
if (Status == 1)
|
|
{
|
|
MiddleFlowNodeData data = new MiddleFlowNodeData();
|
|
if (visualiserService.ShowDialog(data) == true)
|
|
{
|
|
FlowchartService.Approve(this, data.Status, data.Remark);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
MessageBox.Show("该节点不能进行审批!!!");
|
|
}
|
|
}
|
|
|
|
public override Dictionary<string, string> PropertiesSetting
|
|
{
|
|
get
|
|
{
|
|
return new Dictionary<string, string>()
|
|
{
|
|
{ "Text","文本" },
|
|
{"UserIds", "用户" },
|
|
{"RoleIds", "角色" },
|
|
{"ActType", "or/and" }
|
|
};
|
|
}
|
|
}
|
|
}
|
|
}
|