添加项目文件。

This commit is contained in:
Administrator
2026-06-29 14:46:32 +08:00
parent 9a9c508618
commit d9e0324b1d
175 changed files with 17983 additions and 0 deletions

View File

@@ -0,0 +1,438 @@
<Page x:Class="WPFWCSDemo.Views.DataInfoView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"
xmlns:local="clr-namespace:WPFWCSDemo.Views"
xmlns:viewmodels="clr-namespace:WPFWCSDemo.ViewModels"
d:DataContext="{d:DesignInstance Type=viewmodels:DataInfoViewModel}"
mc:Ignorable="d"
d:DesignHeight="800" d:DesignWidth="1600"
Title="DataInfoView">
<!--页面样式-->
<Page.Resources>
<!--任务信息参数名称-->
<Style x:Key="taskNameStyle" TargetType="TextBlock">
<Setter Property="Foreground" Value="Gray"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="FontFamily" Value="微软雅黑"/>
<Setter Property="Margin" Value="10"/>
<Setter Property="HorizontalAlignment" Value="Right"/>
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
<!--任务信息参数值-->
<Style x:Key="taskValueStyle" TargetType="TextBlock">
<Setter Property="FontSize" Value="14"/>
<Setter Property="FontFamily" Value="微软雅黑"/>
<Setter Property="FontStyle" Value="Italic"/>
<Setter Property="Margin" Value="5,10"/>
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
<!--任务类型文本颜色区分-->
<Style x:Key="taskTypeTextColor" TargetType="TextBlock" BasedOn="{StaticResource taskValueStyle}">
<Style.Triggers>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" Value="1">
<Setter Property="Foreground" Value="DarkGreen"/>
<Setter Property="Text" Value="常规任务"/>
</DataTrigger>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" Value="10">
<Setter Property="Foreground" Value="DarkGreen"/>
<Setter Property="Text" Value="实垛任务"/>
</DataTrigger>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" Value="11">
<Setter Property="Foreground" Value="DarkOrange"/>
<Setter Property="Text" Value="空托任务"/>
</DataTrigger>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" Value="2">
<Setter Property="Foreground" Value="Firebrick"/>
<Setter Property="Text" Value="进入休息区"/>
</DataTrigger>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" Value="3">
<Setter Property="Foreground" Value="Firebrick"/>
<Setter Property="Text" Value="返回轨道"/>
</DataTrigger>
</Style.Triggers>
</Style>
<!--执行阶段文本-->
<Style x:Key="scheduleStateTextColor" TargetType="TextBlock" BasedOn="{StaticResource taskValueStyle}">
<Style.Triggers>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" Value="T6-0">
<Setter Property="Foreground" Value="DarkGreen"/>
<Setter Property="Text" Value="待执行"/>
</DataTrigger>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" Value="T6-2">
<Setter Property="Foreground" Value="ForestGreen"/>
<Setter Property="Text" Value="取货途中"/>
</DataTrigger>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" Value="T6-3">
<Setter Property="Foreground" Value="ForestGreen"/>
<Setter Property="Text" Value="取货中"/>
</DataTrigger>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" Value="T6-4">
<Setter Property="Foreground" Value="ForestGreen"/>
<Setter Property="Text" Value="放货途中"/>
</DataTrigger>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" Value="T6-5">
<Setter Property="Foreground" Value="ForestGreen"/>
<Setter Property="Text" Value="放货中"/>
</DataTrigger>
</Style.Triggers>
</Style>
<!--任务类型背景颜色区分-->
<Style x:Key="taskTypeBackColor" TargetType="Border">
<Setter Property="CornerRadius" Value="10"/>
<Setter Property="Margin" Value="10"/>
<Style.Triggers>
<!--鼠标悬停阴影-->
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Effect">
<Setter.Value>
<DropShadowEffect BlurRadius="10" Color="Gray" ShadowDepth="7" Opacity=".2"/>
</Setter.Value>
</Setter>
</Trigger>
<!--常规任务-->
<DataTrigger Binding="{Binding ElementName=tbValueTaskType, Path=Tag}" Value="1">
<Setter Property="Background">
<Setter.Value>
<SolidColorBrush Color="PaleGreen" Opacity=".5"/>
</Setter.Value>
</Setter>
</DataTrigger>
<DataTrigger Binding="{Binding ElementName=tbValueTaskType, Path=Tag}" Value="10">
<Setter Property="Background">
<Setter.Value>
<SolidColorBrush Color="PaleGreen" Opacity=".5"/>
</Setter.Value>
</Setter>
</DataTrigger>
<DataTrigger Binding="{Binding ElementName=tbValueTaskType, Path=Tag}" Value="11">
<Setter Property="Background">
<Setter.Value>
<SolidColorBrush Color="Khaki" Opacity=".5"/>
</Setter.Value>
</Setter>
</DataTrigger>
<!--特殊任务-->
<DataTrigger Binding="{Binding ElementName=tbValueTaskType, Path=Tag}" Value="2">
<Setter Property="Background">
<Setter.Value>
<SolidColorBrush Color="DarkOrange" Opacity=".5"/>
</Setter.Value>
</Setter>
</DataTrigger>
<DataTrigger Binding="{Binding ElementName=tbValueTaskType, Path=Tag}" Value="3">
<Setter Property="Background">
<Setter.Value>
<SolidColorBrush Color="Orange" Opacity=".5"/>
</Setter.Value>
</Setter>
</DataTrigger>
<!--显示空时-->
<DataTrigger Binding="{Binding ElementName=tbValueTaskType, Path=Text}" Value="">
<Setter Property="Background">
<Setter.Value>
<SolidColorBrush Color="Gainsboro" Opacity=".5"/>
</Setter.Value>
</Setter>
</DataTrigger>
</Style.Triggers>
</Style>
<Style x:Key="TaskBorder" TargetType="Border">
<Style.Triggers>
<!--<EventTrigger>
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseLeftButtonDown">
<i:InvokeCommandAction Command="{Binding BorderClickCommand}"/>
</i:EventTrigger>
</i:Interaction.Triggers>
</EventTrigger>-->
<!--鼠标悬停阴影-->
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Effect">
<Setter.Value>
<DropShadowEffect Color="Gray" ShadowDepth="10" BlurRadius="20"/>
</Setter.Value>
</Setter>
<Setter Property="Opacity" Value="1"/>
</Trigger>
</Style.Triggers>
<Style.Setters>
<Setter Property="Effect">
<Setter.Value>
<DropShadowEffect Color="Gray" ShadowDepth="5" BlurRadius="10"/>
</Setter.Value>
</Setter>
</Style.Setters>
</Style>
</Page.Resources>
<!--页面布局-->
<!--页面布局-->
<!--页面布局-->
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="170"/>
<RowDefinition Height="*"/>
<RowDefinition Height="10"/>
</Grid.RowDefinitions>
<TextBlock Text="数据统计" Style="{StaticResource screenTitle}"/>
<ItemsControl x:Name="ic" Grid.Row="1" ItemsSource="{Binding TaskBars}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="4"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<!--顶部面板x4-->
<Border Background="{Binding Color}" Margin="10" CornerRadius="5" Style="{StaticResource TaskBorder}">
<!--<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseLeftButtonUp">
<i:InvokeCommandAction Command="{Binding ElementName=ic,Path=DataContext.BorderClickCommand}"/>
</i:EventTrigger>
</i:Interaction.Triggers>-->
<Grid>
<!--面板信息-->
<StackPanel x:Name="sp">
<md:PackIcon Kind="{Binding Icon}" Foreground="White" Width="30" Height="30" Margin="20 10 10 10"/>
<TextBlock Text="{Binding Title}" FontSize="25" Foreground="White" FontWeight="Bold" FontFamily="微软雅黑" Margin="20 0 10 10"/>
<TextBlock x:Name="taskCount" Text="{Binding Content}" FontSize="30" Foreground="White" FontWeight="Bold" FontFamily="微软雅黑" Margin="20 0 10 10"/>
</StackPanel>
<!--图案绘制 ClipToBounds="True"===超出部分裁剪掉-->
<Canvas ClipToBounds="True">
<Border Canvas.Top="20" Canvas.Right="-50" Width="120" Height="120" Background="#FFFFFF" Opacity="0.3" CornerRadius="100"/>
<Border Canvas.Top="80" Canvas.Right="-10" Width="110" Height="110" Background="#FFFFFF" Opacity="0.2" CornerRadius="100"/>
<Border Canvas.Top="-20" Canvas.Right="180" Width="90" Height="90" Background="#FFFFFF" Opacity="0.2" CornerRadius="100"/>
<Border Canvas.Top="-20" Canvas.Right="80" Width="150" Height="150" Background="#FFFFFF" Opacity="0.1" CornerRadius="100"/>
</Canvas>
<!--<Button Height="{Binding }" Background="Transparent" BorderThickness="0" Command="{Binding ElementName=ic,Path=DataContext.BorderClickCommand}" CommandParameter="{Binding Target}"/>-->
<Button Height="{Binding }" Cursor="Arrow" Background="Transparent" BorderThickness="0" IsEnabled="False" CommandParameter="{Binding Target}"/>
</Grid>
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<!--其他补充的元素-->
<ProgressBar Grid.Row="1" HorizontalAlignment="Center" Margin="0 0 520 23" Width="30" Visibility="{Binding TaskExecutingProgressIsVisible}" Foreground="Ivory" IsIndeterminate="True" Style="{StaticResource MaterialDesignCircularProgressBar}" Value="80"/>
<ProgressBar Grid.Row="1" HorizontalAlignment="Right" Margin="200 0 220 23" Width="30" Visibility="{Binding AlarmProgressIsVisible}" Foreground="Ivory" IsIndeterminate="True" Style="{StaticResource MaterialDesignCircularProgressBar}" Value="50"/>
<Grid Grid.Row="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!--3任务展示-->
<Border x:Name="taskPanel" Background="GhostWhite" Grid.Column="0" BorderThickness="0" CornerRadius="15" Margin="10,40,10,10" Padding="0,60,0,30">
<Border.Effect>
<DropShadowEffect BlurRadius="10" Color="Gray" ShadowDepth="2" Opacity=".5"/>
</Border.Effect>
<ItemsControl Grid.Row="1" ItemsSource="{Binding Tasks}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="1"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Border Style="{StaticResource taskTypeBackColor}">
<!--任务展示-->
<StackPanel Orientation="Vertical" Margin="18">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="80"/>
</Grid.ColumnDefinitions>
<!--参数名-->
<TextBlock Text="设备编号:" Style="{StaticResource taskNameStyle}"/>
<TextBlock Grid.Row="1" Text="任务号:" Style="{StaticResource taskNameStyle}"/>
<TextBlock Grid.Row="0" Grid.Column="2" Text="执行阶段:" Style="{StaticResource taskNameStyle}"/>
<TextBlock Grid.Row="1" Grid.Column="2" Text="任务类型:" Style="{StaticResource taskNameStyle}"/>
<TextBlock Grid.Row="0" Grid.Column="4" Text="源站点:" Style="{StaticResource taskNameStyle}"/>
<TextBlock Grid.Row="1" Grid.Column="4" Text="目标站点:" Style="{StaticResource taskNameStyle}"/>
<!--参数值-->
<!--作业号-->
<TextBlock Grid.Row="0" Grid.Column="1" Text="{Binding JobId}" Style="{StaticResource taskValueStyle}"/>
<!--任务号-->
<TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding TaskId}" Style="{StaticResource taskValueStyle}"/>
<!--执行阶段-->
<TextBlock x:Name="tbScheduleState" Grid.Row="0" Grid.Column="3" Tag="{Binding ScheduleState}" Style="{StaticResource scheduleStateTextColor}"/>
<!--类型-->
<TextBlock x:Name="tbValueTaskType" Grid.Row="1" Grid.Column="3" Tag="{Binding TaskType}" Style="{StaticResource taskTypeTextColor}"/>
<!--源站-->
<TextBlock Grid.Row="0" Grid.Column="5" Text="{Binding SourceLocation}" Style="{StaticResource taskValueStyle}" Margin="5,10,10,10"/>
<!--目标站-->
<TextBlock Grid.Row="1" Grid.Column="5" Text="{Binding TargetLocation}" Style="{StaticResource taskValueStyle}" Margin="5,10,10,10"/>
</Grid>
</StackPanel>
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Border>
<!--任务展示标题-->
<md:ColorZone Height="70" Width="300" CornerRadius="15" md:ElevationAssist.Elevation="Dp6" Mode="PrimaryMid" Margin="0,10">
<TextBlock Text="在执行任务" FontSize="25" Foreground="White" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</md:ColorZone>
<!--图表区-->
<Grid Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1.61*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!--图表1:总任务量-->
<Grid>
<!--图表1背景-->
<Border Background="GhostWhite" CornerRadius="15" Margin="10,40,10,10">
<Border.Effect>
<DropShadowEffect ShadowDepth="3" BlurRadius="10" Opacity=".5"/>
</Border.Effect>
<!--图表1-->
<lvc:CartesianChart LegendLocation="Top" Margin="10,20,10,10">
<lvc:CartesianChart.Series>
<lvc:LineSeries Fill="#DBF3F9" Stroke="#5CD0E1" Values="{Binding LineValuesCount}" Title="任务数" DataLabels="True"/>
</lvc:CartesianChart.Series>
<lvc:CartesianChart.AxisX>
<lvc:Axis Labels="{Binding LineLabels}" Margin="10">
<lvc:Axis.Separator>
<lvc:Separator StrokeThickness="0.5" Step="1" />
</lvc:Axis.Separator>
</lvc:Axis>
</lvc:CartesianChart.AxisX>
<lvc:CartesianChart.AxisY>
<lvc:Axis MinValue="0" ShowLabels="True"/>
</lvc:CartesianChart.AxisY>
</lvc:CartesianChart>
</Border>
<!--图表1标题-->
<md:ColorZone Height="40" Width="300" CornerRadius="15" md:ElevationAssist.Elevation="Dp4" Mode="PrimaryMid" Margin="0,10">
<TextBlock Text="月内任务统计/周" FontSize="20" Foreground="White" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</md:ColorZone>
</Grid>
<!--图表2:出入库对比-->
<Grid Grid.Row="1" Grid.ColumnSpan="1">
<!--图表2背景-->
<Border Background="GhostWhite" CornerRadius="15" Margin="10,40,10,10">
<Border.Effect>
<DropShadowEffect ShadowDepth="3" BlurRadius="10" Opacity=".5"/>
</Border.Effect>
<!--图表2-->
<lvc:CartesianChart Margin="10,20,10,10" LegendLocation="Top">
<lvc:CartesianChart.Series>
<lvc:LineSeries Stroke="#3BC8D7" Title="实垛任务"
PointGeometrySize="0" Values="{Binding LineValuesPallets}" DataLabels="True">
<lvc:LineSeries.Fill>
<SolidColorBrush Color="#E1F2F6" Opacity=".9"/>
</lvc:LineSeries.Fill>
</lvc:LineSeries>
<lvc:LineSeries Stroke="#FF7261" Title="空托任务"
PointGeometrySize="0" Values="{Binding LineValuesGoods}" DataLabels="True">
<lvc:LineSeries.Fill>
<SolidColorBrush Color="#FFE3E0" Opacity=".9"/>
</lvc:LineSeries.Fill>
</lvc:LineSeries>
</lvc:CartesianChart.Series>
<lvc:CartesianChart.AxisX>
<lvc:Axis Labels="{Binding LineLabels1}" Margin="10">
<lvc:Axis.Separator>
<lvc:Separator StrokeThickness="0.5" Step="1" />
</lvc:Axis.Separator>
</lvc:Axis>
</lvc:CartesianChart.AxisX>
<lvc:CartesianChart.AxisY>
<lvc:Axis MinValue="0" ShowLabels="True"/>
</lvc:CartesianChart.AxisY>
</lvc:CartesianChart>
</Border>
<!--图表2标题-->
<md:ColorZone Height="40" Width="300" CornerRadius="15" md:ElevationAssist.Elevation="Dp4" Mode="PrimaryMid" Margin="0,10">
<TextBlock Text="周内任务" FontSize="20" Foreground="White" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</md:ColorZone>
<!--图表提示-->
<!--<TextBlock Text="数据供参考,具体以实际数据为准" Foreground="Gray" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="10 10 10 -20"/>-->
</Grid>
<!--图表3:设备运行-->
<Grid Grid.Column="1" Grid.RowSpan="2">
<Border Background="GhostWhite" CornerRadius="15" Margin="10,40,10,10">
<Border.Effect>
<DropShadowEffect ShadowDepth="3" BlurRadius="10" Opacity=".5"/>
</Border.Effect>
<!--<lvc:PieChart Height="200" InnerRadius="30" Margin="0,20,36,10" StartingRotationAngle="0" Series="{Binding PieSeriesCollection}" LegendLocation="Right">
<lvc:PieChart.ChartLegend>
<lvc:DefaultLegend BulletSize="10"></lvc:DefaultLegend>
</lvc:PieChart.ChartLegend>
<lvc:PieChart.DataTooltip>
<lvc:DefaultTooltip BulletSize="10"></lvc:DefaultTooltip>
</lvc:PieChart.DataTooltip>
</lvc:PieChart>-->
<lvc:CartesianChart Series="{Binding RowSeriesCollection}" Margin="10 20 10 10">
<lvc:CartesianChart.AxisX>
<lvc:Axis Title="运行里程数(km)" Labels="{Binding RowValues}"/>
</lvc:CartesianChart.AxisX>
<lvc:CartesianChart.AxisY>
<lvc:Axis Labels="{Binding RowSeriesTitles}"/>
</lvc:CartesianChart.AxisY>
<lvc:CartesianChart.DataTooltip>
<lvc:DefaultTooltip SelectionMode="SharedYValues"/>
</lvc:CartesianChart.DataTooltip>
</lvc:CartesianChart>
</Border>
<!--图表3标题-->
<md:ColorZone Height="40" Width="200" CornerRadius="15" md:ElevationAssist.Elevation="Dp4" Mode="PrimaryMid" Margin="0,10">
<TextBlock Text="设备运行里程" FontSize="20" Foreground="White" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</md:ColorZone>
<!--图表提示-->
<TextBlock Text="数据供参考,具体以实际数据为准" Foreground="Gray" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="10 10 10 -20"/>
</Grid>
</Grid>
</Grid>
</Grid>
</Page>