ReportView.xaml 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <UserControl x:Class="AIPractice.LabellerServer.WPF.ReportView"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:AIPractice.LabellerServer.WPF"
  7. xmlns:viewModels="clr-namespace:AIPractice.LabellerServer.ViewModels"
  8. mc:Ignorable="d"
  9. d:DesignHeight="450" d:DesignWidth="1280">
  10. <Grid>
  11. <Grid.RowDefinitions>
  12. <RowDefinition Height="90"/>
  13. <RowDefinition Height="*"/>
  14. </Grid.RowDefinitions>
  15. <StackPanel Grid.Row="0">
  16. <StackPanel Margin="2" Orientation="Horizontal" VerticalAlignment="Center">
  17. <TextBlock Style="{StaticResource textblock-default}" Margin="2" Text="开始时间: " VerticalAlignment="Center"/>
  18. <DatePicker Height="36" VerticalAlignment="Center" x:Name="StartDate" Width="140" FontSize="16" Margin="2"/>
  19. <TextBlock Style="{StaticResource textblock-default}" Margin="6,2,2,2" Text="结束时间: " VerticalAlignment="Center"/>
  20. <DatePicker Height="36" VerticalAlignment="Center" x:Name="EndDate" Width="140" FontSize="16" Margin="2"/>
  21. <TextBlock Style="{StaticResource textblock-default}" Margin="6,2,2,2" Text="选择出报告的人员: " VerticalAlignment="Center"/>
  22. <local:MultiSelector x:Name="AccountSelector" Margin="2,2,4,2" Height="36" Width="220" SelectUnSelectAll="OnSelectUnSelectAllAccounts" Refreshed="OnAccountsOnRefreshed">
  23. <local:MultiSelector.ItemTemplate>
  24. <DataTemplate DataType="{x:Type viewModels:AccountViewModel}">
  25. <CheckBox Margin="8,2,2,2" VerticalAlignment="Center" IsChecked="{Binding IsSelected}" Content="{Binding FriendlyName}"/>
  26. </DataTemplate>
  27. </local:MultiSelector.ItemTemplate>
  28. </local:MultiSelector>
  29. <Button Margin="12,2,2,2" Style="{StaticResource btn-primary}" Height="32" VerticalAlignment="Center" Width="125" Content="统计审核数据" Click="OnCalcReviewedClick"/>
  30. <Button Margin="2" Style="{StaticResource btn-warning}" Height="32" VerticalAlignment="Center" Width="125" Content="清除" Click="OnClearClick"/>
  31. </StackPanel>
  32. <StackPanel Margin="2" Orientation="Horizontal">
  33. <Button Margin="2" Style="{StaticResource btn-success}" Height="32" Width="200" Content="导出总不合格报告" Click="OnExportTotalBadReportClick"></Button>
  34. <Button Margin="2" Style="{StaticResource btn-info}" Height="32" Width="200" Content="发送不合格报告给每个用户" Click="OnSendBadReportsClick"></Button>
  35. <TextBlock Style="{StaticResource textblock-default}" Margin="2" Text="SMTP服务器: " VerticalAlignment="Center"/>
  36. <TextBox Height="32" VerticalAlignment="Center" x:Name="SmtpServer" Width="180" Margin="2,2,8,2"/>
  37. <TextBlock Style="{StaticResource textblock-default}" Margin="2" Text="用户名: " VerticalAlignment="Center"/>
  38. <TextBox Height="32" VerticalAlignment="Center" x:Name="SmtpAccount" Width="180" Margin="2,2,8,2"/>
  39. <TextBlock Style="{StaticResource textblock-default}" Margin="2" Text="密码: " VerticalAlignment="Center"/>
  40. <PasswordBox Height="32" VerticalAlignment="Center" x:Name="SmtpPassword" Width="180" Margin="2,2,8,2"/>
  41. </StackPanel>
  42. <Border Margin="0,2,0,2" Height="1" BorderThickness="1" BorderBrush="Gray"></Border>
  43. </StackPanel>
  44. <DataGrid x:Name="Result" IsReadOnly="True" Grid.Row="1" AutoGenerateColumns="False" SelectionMode="Single" SelectionUnit="FullRow" RowHeight="56" ColumnHeaderHeight="48">
  45. <DataGrid.Columns>
  46. <DataGridTemplateColumn Width="0.16*">
  47. <DataGridTemplateColumn.Header>
  48. <StackPanel Orientation="Horizontal">
  49. <TextBlock VerticalAlignment="Center" Text="用户名"/>
  50. </StackPanel>
  51. </DataGridTemplateColumn.Header>
  52. <DataGridTemplateColumn.CellTemplate>
  53. <DataTemplate>
  54. <Grid>
  55. <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center">
  56. <TextBlock Style="{StaticResource textblock-default}" FontWeight="Bold" VerticalAlignment="Center" FontSize="16" Text="{Binding Name}"/>
  57. </StackPanel>
  58. </Grid>
  59. </DataTemplate>
  60. </DataGridTemplateColumn.CellTemplate>
  61. </DataGridTemplateColumn>
  62. <DataGridTemplateColumn Width="0.12*">
  63. <DataGridTemplateColumn.Header>
  64. <StackPanel Orientation="Horizontal">
  65. <TextBlock VerticalAlignment="Center" Text="最佳"/>
  66. </StackPanel>
  67. </DataGridTemplateColumn.Header>
  68. <DataGridTemplateColumn.CellTemplate>
  69. <DataTemplate>
  70. <Grid>
  71. <TextBlock Style="{StaticResource textblock-default}" VerticalAlignment="Center" FontSize="16" Text="{Binding Best}" HorizontalAlignment="Center"/>
  72. </Grid>
  73. </DataTemplate>
  74. </DataGridTemplateColumn.CellTemplate>
  75. </DataGridTemplateColumn>
  76. <DataGridTemplateColumn Width="0.12*">
  77. <DataGridTemplateColumn.Header>
  78. <StackPanel Orientation="Horizontal">
  79. <TextBlock VerticalAlignment="Center" Text="合格"/>
  80. </StackPanel>
  81. </DataGridTemplateColumn.Header>
  82. <DataGridTemplateColumn.CellTemplate>
  83. <DataTemplate>
  84. <Grid>
  85. <TextBlock Style="{StaticResource textblock-default}" VerticalAlignment="Center" FontSize="16" Text="{Binding Ok}" HorizontalAlignment="Center"/>
  86. </Grid>
  87. </DataTemplate>
  88. </DataGridTemplateColumn.CellTemplate>
  89. </DataGridTemplateColumn>
  90. <DataGridTemplateColumn Width="0.12*">
  91. <DataGridTemplateColumn.Header>
  92. <StackPanel Orientation="Horizontal">
  93. <TextBlock VerticalAlignment="Center" Text="不合格"/>
  94. </StackPanel>
  95. </DataGridTemplateColumn.Header>
  96. <DataGridTemplateColumn.CellTemplate>
  97. <DataTemplate>
  98. <Grid>
  99. <TextBlock Style="{StaticResource textblock-default}" VerticalAlignment="Center" FontSize="16" Text="{Binding Bad}" HorizontalAlignment="Center"/>
  100. </Grid>
  101. </DataTemplate>
  102. </DataGridTemplateColumn.CellTemplate>
  103. </DataGridTemplateColumn>
  104. <DataGridTemplateColumn Width="0.12*">
  105. <DataGridTemplateColumn.Header>
  106. <StackPanel Orientation="Horizontal">
  107. <TextBlock VerticalAlignment="Center" Text="总计"/>
  108. </StackPanel>
  109. </DataGridTemplateColumn.Header>
  110. <DataGridTemplateColumn.CellTemplate>
  111. <DataTemplate>
  112. <Grid>
  113. <TextBlock Style="{StaticResource textblock-default}" VerticalAlignment="Center" FontSize="16" Text="{Binding Total}" HorizontalAlignment="Center"/>
  114. </Grid>
  115. </DataTemplate>
  116. </DataGridTemplateColumn.CellTemplate>
  117. </DataGridTemplateColumn>
  118. <DataGridTemplateColumn Width="0.12*">
  119. <DataGridTemplateColumn.Header>
  120. <StackPanel Orientation="Horizontal">
  121. <TextBlock VerticalAlignment="Center" Text="错误率"/>
  122. </StackPanel>
  123. </DataGridTemplateColumn.Header>
  124. <DataGridTemplateColumn.CellTemplate>
  125. <DataTemplate>
  126. <Grid>
  127. <TextBlock Style="{StaticResource textblock-default}" VerticalAlignment="Center" FontSize="16" Text="{Binding BadLv}" HorizontalAlignment="Center"/>
  128. </Grid>
  129. </DataTemplate>
  130. </DataGridTemplateColumn.CellTemplate>
  131. </DataGridTemplateColumn>
  132. </DataGrid.Columns>
  133. </DataGrid>
  134. </Grid>
  135. </UserControl>