mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-05-02 05:51:28 +08:00
流程图审批流程进行中
This commit is contained in:
@@ -3,6 +3,8 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Media;
|
||||
using Util.DiagramDesigner;
|
||||
|
||||
namespace AIStudio.Wpf.ADiagram.Demos.Flowchart
|
||||
{
|
||||
@@ -43,5 +45,27 @@ namespace AIStudio.Wpf.ADiagram.Demos.Flowchart
|
||||
_roles = value;
|
||||
}
|
||||
}
|
||||
|
||||
public static void Approve(FlowNode flowNode, int status, string remark)
|
||||
{
|
||||
flowNode.Status = status;
|
||||
switch (status)
|
||||
{
|
||||
case 100:
|
||||
flowNode.Color = Colors.Green.ToString();
|
||||
break;
|
||||
case 2:
|
||||
flowNode.Color = Colors.Red.ToString();
|
||||
break;
|
||||
case 3:
|
||||
flowNode.Color = Colors.Red.ToString();
|
||||
break;
|
||||
case 4:
|
||||
flowNode.Color = Colors.Red.ToString();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,5 +98,6 @@ namespace AIStudio.Wpf.ADiagram.Demos.Flowchart
|
||||
DiagramViewModel.ClearSelectedItems();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,13 +60,36 @@ namespace AIStudio.Wpf.ADiagram.Demos.Flowchart
|
||||
{
|
||||
SetProperty(ref _color, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Browsable(false)]
|
||||
public NodeKinds Kind { get; set; }
|
||||
|
||||
[Browsable(false)]
|
||||
public string StateImage { get; set; }
|
||||
|
||||
#region 没有存起来,仅仅测试使用
|
||||
private int _status;
|
||||
|
||||
public int Status
|
||||
{
|
||||
get { return _status; }
|
||||
set
|
||||
{
|
||||
SetProperty(ref _status, value);
|
||||
}
|
||||
}
|
||||
|
||||
private string _remark;
|
||||
public string Remark
|
||||
{
|
||||
get { return _remark; }
|
||||
set
|
||||
{
|
||||
SetProperty(ref _remark, value);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
public class StartFlowNode : FlowNode
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
<Window x:Class="AIStudio.Wpf.ADiagram.Demos.Flowchart.Views.ApproveWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:AIStudio.Wpf.ADiagram.Demos.Flowchart.Views"
|
||||
xmlns:converter="clr-namespace:AIStudio.Wpf.ADiagram.Converters"
|
||||
mc:Ignorable="d"
|
||||
Title="ApproveWindow" Height="450" Width="800">
|
||||
<Grid>
|
||||
<StackPanel Margin="50,5,0,5" Orientation="Horizontal" >
|
||||
<RadioButton Margin="3" IsChecked="{Binding Status,Converter={converter:ConverterValueMapToBool Parameter=100}, ConverterParameter=100}" Content="通过"/>
|
||||
<RadioButton Margin="3" IsChecked="{Binding Status,Converter={converter:ConverterValueMapToBool Parameter=2}, ConverterParameter=2}" Content="驳回上一级"/>
|
||||
<RadioButton Margin="3" IsChecked="{Binding Status,Converter={converter:ConverterValueMapToBool Parameter=3}, ConverterParameter=3}" Content="驳回重提"/>
|
||||
<RadioButton Margin="3" IsChecked="{Binding Status,Converter={converter:ConverterValueMapToBool Parameter=4}, ConverterParameter=4}" Content="否决"/>
|
||||
</StackPanel>
|
||||
<TextBox Height="28" Margin="52,5,0,5" Text="{Binding Remark}" ></TextBox>
|
||||
</Grid>
|
||||
</Window>
|
||||
@@ -0,0 +1,55 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
using Util.DiagramDesigner;
|
||||
|
||||
namespace AIStudio.Wpf.ADiagram.Demos.Flowchart.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// ApproveWindow.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class ApproveWindow : Window
|
||||
{
|
||||
public ApproveWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
|
||||
public class ApproveWindowViewModel : BindableBase
|
||||
{
|
||||
private int _status;
|
||||
public int Status
|
||||
{
|
||||
get
|
||||
{
|
||||
return _status;
|
||||
}
|
||||
set
|
||||
{
|
||||
SetProperty(ref _status, value);
|
||||
}
|
||||
}
|
||||
|
||||
private string _remark;
|
||||
public string Remark
|
||||
{
|
||||
get
|
||||
{
|
||||
return _remark;
|
||||
}
|
||||
set
|
||||
{
|
||||
SetProperty(ref _remark, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user