StatisticsView.xaml 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <UserControl x:Class="TeamAAS.Views.StatisticsView"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:hc="https://handyorg.github.io/handycontrol"
  5. xmlns:loc="clr-namespace:TeamAAS.Localization">
  6. <Grid Margin="16,12">
  7. <Grid.RowDefinitions>
  8. <RowDefinition Height="Auto"/>
  9. <RowDefinition Height="Auto"/>
  10. <RowDefinition Height="*"/>
  11. </Grid.RowDefinitions>
  12. <TextBlock Grid.Row="0" Text="{loc:Translate '产量统计'}" FontSize="20" FontWeight="Bold"
  13. Foreground="{DynamicResource PrimaryTextBrush}" Margin="0,0,0,16"/>
  14. <!-- Summary Cards -->
  15. <UniformGrid Grid.Row="1" Columns="4" Margin="0,0,0,16">
  16. <Border Background="{DynamicResource RegionBrush}" CornerRadius="8" Padding="16,12" Margin="0,0,8,0">
  17. <StackPanel>
  18. <TextBlock Text="{loc:Translate '总产量'}" Foreground="{DynamicResource SecondaryTextBrush}" FontSize="12"/>
  19. <TextBlock Text="{Binding Stats.TotalCount}" FontSize="24" FontWeight="Bold" Foreground="{DynamicResource PrimaryTextBrush}"/>
  20. </StackPanel>
  21. </Border>
  22. <Border Background="{DynamicResource RegionBrush}" CornerRadius="8" Padding="16,12" Margin="8,0,8,0">
  23. <StackPanel>
  24. <TextBlock Text="{loc:Translate 'OK数'}" Foreground="{DynamicResource SecondaryTextBrush}" FontSize="12"/>
  25. <TextBlock Text="{Binding Stats.OkCount}" FontSize="24" FontWeight="Bold" Foreground="#4CAF50"/>
  26. </StackPanel>
  27. </Border>
  28. <Border Background="{DynamicResource RegionBrush}" CornerRadius="8" Padding="16,12" Margin="8,0,8,0">
  29. <StackPanel>
  30. <TextBlock Text="{loc:Translate 'NG数'}" Foreground="{DynamicResource SecondaryTextBrush}" FontSize="12"/>
  31. <TextBlock Text="{Binding Stats.NgCount}" FontSize="24" FontWeight="Bold" Foreground="#F44336"/>
  32. </StackPanel>
  33. </Border>
  34. <Border Background="{DynamicResource RegionBrush}" CornerRadius="8" Padding="16,12" Margin="8,0,0,0">
  35. <StackPanel>
  36. <TextBlock Text="{loc:Translate '良率'}" Foreground="{DynamicResource SecondaryTextBrush}" FontSize="12"/>
  37. <TextBlock Text="{Binding Stats.YieldText}" FontSize="24" FontWeight="Bold" Foreground="{DynamicResource PrimaryBrush}"/>
  38. </StackPanel>
  39. </Border>
  40. </UniformGrid>
  41. <!-- Chart Placeholder -->
  42. <Border Grid.Row="2" Background="{DynamicResource RegionBrush}" CornerRadius="8" Padding="24">
  43. <StackPanel>
  44. <DockPanel>
  45. <Button DockPanel.Dock="Right" Content="{loc:Translate '清零'}" Padding="20,4" FontSize="12"
  46. Command="{Binding ResetStatisticsCommand}"/>
  47. <TextBlock Text="{loc:Translate '产量趋势图'}" FontSize="16" FontWeight="Bold"
  48. Foreground="{DynamicResource PrimaryTextBrush}" Margin="0,0,0,12"/>
  49. </DockPanel>
  50. <Border Background="{DynamicResource SecondaryRegionBrush}" CornerRadius="4"
  51. Height="300" VerticalAlignment="Stretch">
  52. <TextBlock Text="{loc:Translate '图表区域(待接入图表库)'}" HorizontalAlignment="Center" VerticalAlignment="Center"
  53. FontSize="20" Foreground="{DynamicResource SecondaryTextBrush}"/>
  54. </Border>
  55. </StackPanel>
  56. </Border>
  57. </Grid>
  58. </UserControl>