490 lines
23 KiB
Plaintext
490 lines
23 KiB
Plaintext
|
|
<UserControl
|
|||
|
|
x:Class="SamplePre.UIWpf.SampleManager.MonitorView"
|
|||
|
|
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:hc="https://handyorg.github.io/handycontrol"
|
|||
|
|
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
|||
|
|
xmlns:local="clr-namespace:SamplePre.UIWpf.SampleManager"
|
|||
|
|
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
|||
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|||
|
|
xmlns:pro="clr-namespace:SamplePreSystem.UI.BaseControls"
|
|||
|
|
d:DesignHeight="450"
|
|||
|
|
d:DesignWidth="800"
|
|||
|
|
Background="#E6E6E6"
|
|||
|
|
mc:Ignorable="d">
|
|||
|
|
<Grid>
|
|||
|
|
<Grid.ColumnDefinitions>
|
|||
|
|
<ColumnDefinition Width="*" />
|
|||
|
|
<ColumnDefinition Width="auto" />
|
|||
|
|
<ColumnDefinition Width="220" />
|
|||
|
|
</Grid.ColumnDefinitions>
|
|||
|
|
|
|||
|
|
<Grid>
|
|||
|
|
<Grid.RowDefinitions>
|
|||
|
|
<RowDefinition Height="2*" />
|
|||
|
|
<RowDefinition Height="*" />
|
|||
|
|
</Grid.RowDefinitions>
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
<Border
|
|||
|
|
Margin="5,5,0,0"
|
|||
|
|
Background="White"
|
|||
|
|
BorderThickness="1"
|
|||
|
|
CornerRadius="5">
|
|||
|
|
<Grid>
|
|||
|
|
<Grid.RowDefinitions>
|
|||
|
|
<RowDefinition Height="30" />
|
|||
|
|
<RowDefinition Height="*" />
|
|||
|
|
</Grid.RowDefinitions>
|
|||
|
|
<StackPanel
|
|||
|
|
Grid.Row="0"
|
|||
|
|
Height="30"
|
|||
|
|
VerticalAlignment="Center">
|
|||
|
|
<TextBlock
|
|||
|
|
Margin="10,0"
|
|||
|
|
Padding="6"
|
|||
|
|
HorizontalAlignment="Left"
|
|||
|
|
VerticalAlignment="Center"
|
|||
|
|
FontWeight="Bold"
|
|||
|
|
Text="样品列表" />
|
|||
|
|
</StackPanel>
|
|||
|
|
<DataGrid
|
|||
|
|
x:Name="dg_sample"
|
|||
|
|
Grid.Row="1"
|
|||
|
|
Margin="5"
|
|||
|
|
AutoGenerateColumns="False"
|
|||
|
|
Background="White"
|
|||
|
|
CanUserAddRows="False"
|
|||
|
|
CanUserSortColumns="True"
|
|||
|
|
FrozenColumnCount="1"
|
|||
|
|
HorizontalScrollBarVisibility="Auto"
|
|||
|
|
IsReadOnly="True"
|
|||
|
|
ItemsSource="{Binding SampleExecList}"
|
|||
|
|
SelectedItem="{Binding SelectSample}"
|
|||
|
|
SelectionMode="Extended"
|
|||
|
|
VerticalScrollBarVisibility="Auto">
|
|||
|
|
|
|||
|
|
<i:Interaction.Triggers>
|
|||
|
|
<i:EventTrigger EventName="MouseDoubleClick">
|
|||
|
|
<i:InvokeCommandAction Command="{Binding MouseDoubleDetailWindowCommand}" />
|
|||
|
|
</i:EventTrigger>
|
|||
|
|
</i:Interaction.Triggers>
|
|||
|
|
|
|||
|
|
<DataGrid.Columns>
|
|||
|
|
<DataGridTextColumn
|
|||
|
|
Width="*"
|
|||
|
|
Binding="{Binding qrcode}"
|
|||
|
|
Header="二维码" />
|
|||
|
|
<DataGridTextColumn
|
|||
|
|
Width="*"
|
|||
|
|
Binding="{Binding item_name}"
|
|||
|
|
Header="样品名称" />
|
|||
|
|
<DataGridTextColumn
|
|||
|
|
Width="*"
|
|||
|
|
Binding="{Binding standrad}"
|
|||
|
|
Header="标准名称" />
|
|||
|
|
<DataGridTextColumn
|
|||
|
|
Width="*"
|
|||
|
|
Binding="{Binding input_user}"
|
|||
|
|
Header="录入人员" />
|
|||
|
|
<DataGridTextColumn
|
|||
|
|
Width="*"
|
|||
|
|
Binding="{Binding input_date}"
|
|||
|
|
Header="录入日期" />
|
|||
|
|
<DataGridTextColumn
|
|||
|
|
Width="*"
|
|||
|
|
Binding="{Binding exec_state}"
|
|||
|
|
Header="状态" />
|
|||
|
|
|
|||
|
|
</DataGrid.Columns>
|
|||
|
|
</DataGrid>
|
|||
|
|
|
|||
|
|
|
|||
|
|
</Grid>
|
|||
|
|
</Border>
|
|||
|
|
|
|||
|
|
<!-- sop监控内容 -->
|
|||
|
|
<Grid Grid.Row="1">
|
|||
|
|
<Grid.ColumnDefinitions>
|
|||
|
|
<ColumnDefinition Width="*" />
|
|||
|
|
<ColumnDefinition Width="2*" />
|
|||
|
|
</Grid.ColumnDefinitions>
|
|||
|
|
|
|||
|
|
<!-- 进度图 -->
|
|||
|
|
<Border
|
|||
|
|
Margin="5"
|
|||
|
|
Background="White"
|
|||
|
|
CornerRadius="5">
|
|||
|
|
<Grid Grid.Row="0">
|
|||
|
|
<Grid.RowDefinitions>
|
|||
|
|
<RowDefinition Height="auto" />
|
|||
|
|
<RowDefinition />
|
|||
|
|
</Grid.RowDefinitions>
|
|||
|
|
|
|||
|
|
<TextBlock
|
|||
|
|
Margin="5,5,0,10"
|
|||
|
|
HorizontalAlignment="Left"
|
|||
|
|
FontWeight="Bold"
|
|||
|
|
Text="样品进度" />
|
|||
|
|
<Grid Grid.Row="1">
|
|||
|
|
<StackPanel HorizontalAlignment="Left">
|
|||
|
|
<TextBlock Margin="5" Text="当前SOP:DCM固相萃取" />
|
|||
|
|
<TextBlock Margin="5" Text="当前样品:xxx" />
|
|||
|
|
<TextBlock Margin="5" Text="当前步骤:离心" />
|
|||
|
|
<TextBlock />
|
|||
|
|
</StackPanel>
|
|||
|
|
<pro:RingProgressBar
|
|||
|
|
x:Name="ringProgress"
|
|||
|
|
Width="200"
|
|||
|
|
Height="200"
|
|||
|
|
HorizontalAlignment="Center"
|
|||
|
|
VerticalAlignment="Center"
|
|||
|
|
Progress="{Binding CurrentPercent}" />
|
|||
|
|
<TextBlock
|
|||
|
|
HorizontalAlignment="Center"
|
|||
|
|
VerticalAlignment="Center"
|
|||
|
|
FontSize="20"
|
|||
|
|
Foreground="Black"
|
|||
|
|
Text="{Binding Progress, ElementName=ringProgress, StringFormat={}{0}%}" />
|
|||
|
|
</Grid>
|
|||
|
|
|
|||
|
|
</Grid>
|
|||
|
|
</Border>
|
|||
|
|
|
|||
|
|
<!-- SOP执行列表 -->
|
|||
|
|
<Border
|
|||
|
|
Grid.Column="1"
|
|||
|
|
Margin="0,5,0,5"
|
|||
|
|
Background="White"
|
|||
|
|
CornerRadius="5">
|
|||
|
|
|
|||
|
|
<StackPanel>
|
|||
|
|
<TextBlock
|
|||
|
|
Margin="5"
|
|||
|
|
FontWeight="Bold"
|
|||
|
|
Text="SOP执行信息" />
|
|||
|
|
<DataGrid
|
|||
|
|
x:Name="dg_sopExec"
|
|||
|
|
Grid.Row="1"
|
|||
|
|
Margin="5"
|
|||
|
|
AutoGenerateColumns="False"
|
|||
|
|
Background="White"
|
|||
|
|
CanUserAddRows="False"
|
|||
|
|
CanUserSortColumns="True"
|
|||
|
|
FrozenColumnCount="1"
|
|||
|
|
HorizontalScrollBarVisibility="Auto"
|
|||
|
|
IsReadOnly="True"
|
|||
|
|
ItemsSource="{Binding SopExecInfo}"
|
|||
|
|
SelectionMode="Extended"
|
|||
|
|
VerticalScrollBarVisibility="Auto">
|
|||
|
|
<DataGrid.Columns>
|
|||
|
|
<DataGridTemplateColumn Width="0.5*" Header="">
|
|||
|
|
<DataGridTemplateColumn.CellTemplate>
|
|||
|
|
<DataTemplate>
|
|||
|
|
<Button
|
|||
|
|
Width="13"
|
|||
|
|
Height="13"
|
|||
|
|
Margin="0"
|
|||
|
|
HorizontalContentAlignment="Left"
|
|||
|
|
materialDesign:ButtonProgressAssist.IndicatorBackground="#ffcc80"
|
|||
|
|
materialDesign:ButtonProgressAssist.IndicatorForeground="#e65100"
|
|||
|
|
materialDesign:ButtonProgressAssist.IsIndeterminate="True"
|
|||
|
|
materialDesign:ButtonProgressAssist.IsIndicatorVisible="{Binding doIngShow}"
|
|||
|
|
materialDesign:ButtonProgressAssist.Value="-1"
|
|||
|
|
Style="{StaticResource MaterialDesignFloatingActionButton}" />
|
|||
|
|
</DataTemplate>
|
|||
|
|
</DataGridTemplateColumn.CellTemplate>
|
|||
|
|
</DataGridTemplateColumn>
|
|||
|
|
|
|||
|
|
<DataGridTextColumn
|
|||
|
|
Width="0.5*"
|
|||
|
|
Binding="{Binding state}"
|
|||
|
|
Header="状态" />
|
|||
|
|
|
|||
|
|
<DataGridTextColumn
|
|||
|
|
Width="*"
|
|||
|
|
Binding="{Binding sapmleName}"
|
|||
|
|
Header="样品名称" />
|
|||
|
|
<DataGridTextColumn
|
|||
|
|
Width="*"
|
|||
|
|
Binding="{Binding actionName}"
|
|||
|
|
Header="动作" />
|
|||
|
|
<DataGridTextColumn
|
|||
|
|
Width="*"
|
|||
|
|
Binding="{Binding starDate}"
|
|||
|
|
Header="开始时间" />
|
|||
|
|
<DataGridTextColumn
|
|||
|
|
Width="*"
|
|||
|
|
Binding="{Binding endDate}"
|
|||
|
|
Header="完成时间" />
|
|||
|
|
|
|||
|
|
</DataGrid.Columns>
|
|||
|
|
</DataGrid>
|
|||
|
|
</StackPanel>
|
|||
|
|
|
|||
|
|
|
|||
|
|
<!--<StackPanel>
|
|||
|
|
<TextBlock Text="SOP执行信息" Margin="5" FontWeight="Bold"/>
|
|||
|
|
<ListBox ItemsSource="{Binding SopExecInfo}">
|
|||
|
|
<ListBox.ItemTemplate>
|
|||
|
|
<DataTemplate>
|
|||
|
|
<StackPanel Orientation="Horizontal">
|
|||
|
|
|
|||
|
|
<Button
|
|||
|
|
Width="13"
|
|||
|
|
Height="13"
|
|||
|
|
Margin="5"
|
|||
|
|
HorizontalContentAlignment="Left"
|
|||
|
|
materialDesign:ButtonProgressAssist.IsIndeterminate="True"
|
|||
|
|
materialDesign:ButtonProgressAssist.IsIndicatorVisible="{Binding doIngShow}"
|
|||
|
|
materialDesign:ButtonProgressAssist.Value="-1"
|
|||
|
|
Style="{StaticResource MaterialDesignFloatingActionButton}" />
|
|||
|
|
|
|||
|
|
<TextBlock
|
|||
|
|
Margin="2,0,10,0"
|
|||
|
|
VerticalAlignment="Center"
|
|||
|
|
Text="{Binding state}" />
|
|||
|
|
|
|||
|
|
<TextBlock
|
|||
|
|
Margin="30,0"
|
|||
|
|
VerticalAlignment="Center"
|
|||
|
|
Text="{Binding sapmleName}" />
|
|||
|
|
<TextBlock
|
|||
|
|
Margin="30,0"
|
|||
|
|
VerticalAlignment="Center"
|
|||
|
|
Text="{Binding actionName}" />
|
|||
|
|
|
|||
|
|
<TextBlock
|
|||
|
|
Margin="30,0"
|
|||
|
|
VerticalAlignment="Center"
|
|||
|
|
Text="{Binding starDate}" />
|
|||
|
|
<TextBlock
|
|||
|
|
Margin="30,0"
|
|||
|
|
VerticalAlignment="Center"
|
|||
|
|
Text="{Binding endDate}" />
|
|||
|
|
</StackPanel>
|
|||
|
|
</DataTemplate>
|
|||
|
|
</ListBox.ItemTemplate>
|
|||
|
|
</ListBox>
|
|||
|
|
</StackPanel>-->
|
|||
|
|
|
|||
|
|
</Border>
|
|||
|
|
</Grid>
|
|||
|
|
|
|||
|
|
</Grid>
|
|||
|
|
|
|||
|
|
|
|||
|
|
<GridSplitter
|
|||
|
|
Grid.Column="1"
|
|||
|
|
Width="5"
|
|||
|
|
HorizontalAlignment="Stretch"
|
|||
|
|
VerticalAlignment="Stretch"
|
|||
|
|
Background="#e6e6e6" />
|
|||
|
|
|
|||
|
|
<!-- 功能单元 -->
|
|||
|
|
<Grid Grid.Column="2">
|
|||
|
|
<Grid.RowDefinitions>
|
|||
|
|
<RowDefinition Height="31*" />
|
|||
|
|
<RowDefinition Height="44*" />
|
|||
|
|
<RowDefinition Height="15*" />
|
|||
|
|
</Grid.RowDefinitions>
|
|||
|
|
|
|||
|
|
<!-- 功能岛信息 -->
|
|||
|
|
<Border
|
|||
|
|
Grid.RowSpan="2"
|
|||
|
|
Margin="0,5,5,5"
|
|||
|
|
Background="White"
|
|||
|
|
BorderThickness="1"
|
|||
|
|
CornerRadius="5">
|
|||
|
|
<Grid>
|
|||
|
|
<Grid.RowDefinitions>
|
|||
|
|
<RowDefinition Height="30" />
|
|||
|
|
<RowDefinition Height="*" />
|
|||
|
|
</Grid.RowDefinitions>
|
|||
|
|
|
|||
|
|
<StackPanel
|
|||
|
|
Grid.Row="0"
|
|||
|
|
Height="30"
|
|||
|
|
Margin="0,0"
|
|||
|
|
VerticalAlignment="Center">
|
|||
|
|
<TextBlock
|
|||
|
|
Margin="10,0"
|
|||
|
|
Padding="6"
|
|||
|
|
HorizontalAlignment="Left"
|
|||
|
|
VerticalAlignment="Center"
|
|||
|
|
FontWeight="Bold"
|
|||
|
|
Text="功能单元" />
|
|||
|
|
</StackPanel>
|
|||
|
|
|
|||
|
|
|
|||
|
|
<ItemsControl Grid.Row="1" ItemsSource="{Binding WorkUnits}">
|
|||
|
|
<ItemsControl.ItemsPanel>
|
|||
|
|
<ItemsPanelTemplate>
|
|||
|
|
<UniformGrid Margin="10,5" Columns="1" />
|
|||
|
|
</ItemsPanelTemplate>
|
|||
|
|
</ItemsControl.ItemsPanel>
|
|||
|
|
<ItemsControl.ItemTemplate>
|
|||
|
|
<DataTemplate>
|
|||
|
|
<!-- 给 Border 单独写 Style,实现默认背景 + 鼠标悬停背景 -->
|
|||
|
|
<Border
|
|||
|
|
Margin="0,10"
|
|||
|
|
BorderBrush="LightGray"
|
|||
|
|
BorderThickness="1"
|
|||
|
|
CornerRadius="4">
|
|||
|
|
<Border.Style>
|
|||
|
|
<Style TargetType="Border">
|
|||
|
|
<!-- 默认背景色 -->
|
|||
|
|
<Setter Property="Background" Value="White" />
|
|||
|
|
<!-- 鼠标悬停触发器 -->
|
|||
|
|
<Style.Triggers>
|
|||
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|||
|
|
<Setter Property="Background" Value="#FFF0F8FF" />
|
|||
|
|
|
|||
|
|
</Trigger>
|
|||
|
|
</Style.Triggers>
|
|||
|
|
</Style>
|
|||
|
|
</Border.Style>
|
|||
|
|
|
|||
|
|
<Grid>
|
|||
|
|
<Grid.RowDefinitions>
|
|||
|
|
<RowDefinition Height="auto" />
|
|||
|
|
<RowDefinition />
|
|||
|
|
</Grid.RowDefinitions>
|
|||
|
|
<Grid.ColumnDefinitions>
|
|||
|
|
<ColumnDefinition Width="auto" />
|
|||
|
|
<ColumnDefinition />
|
|||
|
|
</Grid.ColumnDefinitions>
|
|||
|
|
|
|||
|
|
<TextBlock
|
|||
|
|
Margin="5"
|
|||
|
|
HorizontalAlignment="Left"
|
|||
|
|
Text="{Binding unitName}" />
|
|||
|
|
<TextBlock
|
|||
|
|
Grid.Column="1"
|
|||
|
|
Margin="5"
|
|||
|
|
HorizontalAlignment="Right">
|
|||
|
|
<Hyperlink
|
|||
|
|
x:Name="hLinkDetail"
|
|||
|
|
Command="{Binding DataContext.HLinkDetailClickCommand, RelativeSource={RelativeSource AncestorType=ItemsControl}}"
|
|||
|
|
CommandParameter="{Binding unitName}">
|
|||
|
|
[详情]
|
|||
|
|
</Hyperlink>
|
|||
|
|
</TextBlock>
|
|||
|
|
<!--<Image Grid.Row="1" Grid.Column="0"
|
|||
|
|
Source="{Binding imgPath}" Height="48" Width="48" Margin="5"
|
|||
|
|
HorizontalAlignment="Center"
|
|||
|
|
VerticalAlignment="Center"/>-->
|
|||
|
|
|
|||
|
|
<Border
|
|||
|
|
Grid.Row="1"
|
|||
|
|
Grid.Column="0"
|
|||
|
|
Width="50"
|
|||
|
|
Height="50"
|
|||
|
|
Margin="5"
|
|||
|
|
BorderBrush="#0071b8"
|
|||
|
|
BorderThickness="2"
|
|||
|
|
CornerRadius="50">
|
|||
|
|
<materialDesign:PackIcon
|
|||
|
|
Width="40"
|
|||
|
|
Height="40"
|
|||
|
|
HorizontalAlignment="Center"
|
|||
|
|
VerticalAlignment="Center"
|
|||
|
|
Foreground="#0071b8"
|
|||
|
|
Kind="{Binding packIconKind}" />
|
|||
|
|
</Border>
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
<UniformGrid
|
|||
|
|
Grid.Row="1"
|
|||
|
|
Grid.Column="1"
|
|||
|
|
HorizontalAlignment="Center"
|
|||
|
|
VerticalAlignment="Center"
|
|||
|
|
Columns="1"
|
|||
|
|
Rows="2">
|
|||
|
|
|
|||
|
|
<StackPanel
|
|||
|
|
Margin="0,2"
|
|||
|
|
HorizontalAlignment="Center"
|
|||
|
|
Orientation="Horizontal">
|
|||
|
|
<TextBlock Margin="2" Text="动作:" />
|
|||
|
|
<TextBlock Margin="2" Text="{Binding actionName}" />
|
|||
|
|
</StackPanel>
|
|||
|
|
|
|||
|
|
<StackPanel
|
|||
|
|
Margin="0,2"
|
|||
|
|
HorizontalAlignment="Center"
|
|||
|
|
Orientation="Horizontal">
|
|||
|
|
<Border
|
|||
|
|
Width="6"
|
|||
|
|
Height="6"
|
|||
|
|
Margin="2"
|
|||
|
|
Background="{Binding RunColor}"
|
|||
|
|
CornerRadius="3" />
|
|||
|
|
<TextBlock VerticalAlignment="Center" Text="{Binding StateName}" />
|
|||
|
|
</StackPanel>
|
|||
|
|
</UniformGrid>
|
|||
|
|
</Grid>
|
|||
|
|
</Border>
|
|||
|
|
</DataTemplate>
|
|||
|
|
</ItemsControl.ItemTemplate>
|
|||
|
|
</ItemsControl>
|
|||
|
|
|
|||
|
|
</Grid>
|
|||
|
|
</Border>
|
|||
|
|
|
|||
|
|
|
|||
|
|
<!-- 故障信息 -->
|
|||
|
|
<Border
|
|||
|
|
Grid.Row="2"
|
|||
|
|
Margin="0,0,5,5"
|
|||
|
|
Background="White"
|
|||
|
|
BorderThickness="1"
|
|||
|
|
CornerRadius="5">
|
|||
|
|
<Grid>
|
|||
|
|
<Grid.RowDefinitions>
|
|||
|
|
<RowDefinition Height="30" />
|
|||
|
|
<RowDefinition Height="*" />
|
|||
|
|
</Grid.RowDefinitions>
|
|||
|
|
<StackPanel
|
|||
|
|
Grid.Row="0"
|
|||
|
|
Height="30"
|
|||
|
|
VerticalAlignment="Center">
|
|||
|
|
<TextBlock
|
|||
|
|
Margin="10,0"
|
|||
|
|
Padding="6"
|
|||
|
|
HorizontalAlignment="Left"
|
|||
|
|
VerticalAlignment="Center"
|
|||
|
|
FontWeight="Bold"
|
|||
|
|
Text="故障信息" />
|
|||
|
|
</StackPanel>
|
|||
|
|
<ListBox Grid.Row="1" ItemsSource="{Binding FaultInfos}">
|
|||
|
|
<ListBox.ItemTemplate>
|
|||
|
|
<DataTemplate>
|
|||
|
|
<StackPanel Orientation="Horizontal">
|
|||
|
|
|
|||
|
|
<Border
|
|||
|
|
Width="6"
|
|||
|
|
Height="6"
|
|||
|
|
Margin="2"
|
|||
|
|
Background="Red"
|
|||
|
|
CornerRadius="3" />
|
|||
|
|
<TextBlock
|
|||
|
|
Margin="3,0"
|
|||
|
|
VerticalAlignment="Center"
|
|||
|
|
Text="{Binding FaultName}" />
|
|||
|
|
</StackPanel>
|
|||
|
|
</DataTemplate>
|
|||
|
|
</ListBox.ItemTemplate>
|
|||
|
|
</ListBox>
|
|||
|
|
</Grid>
|
|||
|
|
|
|||
|
|
</Border>
|
|||
|
|
|
|||
|
|
|
|||
|
|
</Grid>
|
|||
|
|
</Grid>
|
|||
|
|
</UserControl>
|