StatisticView.xaml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. <UserControl x:Class="AIPractice.LabellerServer.WPF.StatisticView"
  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="800">
  10. <Grid>
  11. <Grid.RowDefinitions>
  12. <RowDefinition Height="50"/>
  13. <RowDefinition Height="*"/>
  14. <RowDefinition Height="Auto"/>
  15. </Grid.RowDefinitions>
  16. <StackPanel Grid.Row="0" 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="100" Content="统计" Click="OnStatisticClick"/>
  30. <Button Margin="2" Style="{StaticResource btn-success}" Height="32" Width="100" Content="复制" Click="OnCopyClick"></Button>
  31. <Button Margin="2" Style="{StaticResource btn-warning}" Height="32" VerticalAlignment="Center" Width="100" Content="清除" Click="OnClearClick"/>
  32. </StackPanel>
  33. <DataGrid x:Name="Result" IsReadOnly="True" Grid.Row="1" AutoGenerateColumns="False" SelectionMode="Single" SelectionUnit="FullRow" RowHeight="56" ColumnHeaderHeight="48">
  34. <DataGrid.Columns>
  35. <DataGridTemplateColumn Width="0.16*">
  36. <DataGridTemplateColumn.Header>
  37. <StackPanel Orientation="Horizontal">
  38. <TextBlock VerticalAlignment="Center" Text="用户名"/>
  39. <CheckBox VerticalAlignment="Center" Margin="2" IsChecked="True"/>
  40. </StackPanel>
  41. </DataGridTemplateColumn.Header>
  42. <DataGridTemplateColumn.CellTemplate>
  43. <DataTemplate>
  44. <Grid>
  45. <StackPanel Orientation="Horizontal" Margin="0,0,18,0" VerticalAlignment="Center" HorizontalAlignment="Center">
  46. <Image Width="32" Height="32" VerticalAlignment="Center" Margin="2,2,6,2" Source="Resources/Images/Reviewer.png" ToolTip="审核员" Visibility="{Binding IsReviewer, Converter={x:Static local:BoolToVisibleConverter.Converter}}"></Image>
  47. <TextBlock Style="{StaticResource textblock-default}" FontWeight="Bold" VerticalAlignment="Center" FontSize="16" Text="{Binding Account}"/>
  48. </StackPanel>
  49. </Grid>
  50. </DataTemplate>
  51. </DataGridTemplateColumn.CellTemplate>
  52. </DataGridTemplateColumn>
  53. <DataGridTemplateColumn Width="0.12*">
  54. <DataGridTemplateColumn.Header>
  55. <StackPanel Orientation="Horizontal">
  56. <TextBlock VerticalAlignment="Center" Text="提交数"/>
  57. <CheckBox VerticalAlignment="Center" Margin="2" IsChecked="True"/>
  58. </StackPanel>
  59. </DataGridTemplateColumn.Header>
  60. <DataGridTemplateColumn.CellTemplate>
  61. <DataTemplate>
  62. <Grid>
  63. <TextBlock Margin="0,0,18,0" Style="{StaticResource textblock-default}" VerticalAlignment="Center" FontSize="16" Text="{Binding CommittedCount}" HorizontalAlignment="Center"/>
  64. </Grid>
  65. </DataTemplate>
  66. </DataGridTemplateColumn.CellTemplate>
  67. </DataGridTemplateColumn>
  68. <DataGridTemplateColumn Width="0.12*">
  69. <DataGridTemplateColumn.Header>
  70. <StackPanel Orientation="Horizontal">
  71. <TextBlock VerticalAlignment="Center" Text="提交部位数"/>
  72. <CheckBox VerticalAlignment="Center" Margin="2" IsChecked="True"/>
  73. </StackPanel>
  74. </DataGridTemplateColumn.Header>
  75. <DataGridTemplateColumn.CellTemplate>
  76. <DataTemplate>
  77. <Grid>
  78. <TextBlock Margin="0,0,18,0" Style="{StaticResource textblock-default}" VerticalAlignment="Center" FontSize="16" Text="{Binding CommittedPartCount}" HorizontalAlignment="Center"/>
  79. </Grid>
  80. </DataTemplate>
  81. </DataGridTemplateColumn.CellTemplate>
  82. </DataGridTemplateColumn>
  83. <DataGridTemplateColumn Width="0.12*">
  84. <DataGridTemplateColumn.Header>
  85. <StackPanel Orientation="Horizontal">
  86. <TextBlock VerticalAlignment="Center" Text="分配数"/>
  87. <CheckBox VerticalAlignment="Center" Margin="2" IsChecked="True"/>
  88. </StackPanel>
  89. </DataGridTemplateColumn.Header>
  90. <DataGridTemplateColumn.CellTemplate>
  91. <DataTemplate>
  92. <Grid>
  93. <TextBlock Margin="0,0,18,0" Style="{StaticResource textblock-default}" VerticalAlignment="Center" FontSize="16" Text="{Binding TotalCount}" HorizontalAlignment="Center"/>
  94. </Grid>
  95. </DataTemplate>
  96. </DataGridTemplateColumn.CellTemplate>
  97. </DataGridTemplateColumn>
  98. <DataGridTemplateColumn Width="0.12*">
  99. <DataGridTemplateColumn.Header>
  100. <StackPanel Orientation="Horizontal">
  101. <TextBlock VerticalAlignment="Center" Text="剩余数"/>
  102. <CheckBox VerticalAlignment="Center" Margin="2" IsChecked="True"/>
  103. </StackPanel>
  104. </DataGridTemplateColumn.Header>
  105. <DataGridTemplateColumn.CellTemplate>
  106. <DataTemplate>
  107. <Grid>
  108. <TextBlock Margin="0,0,18,0" Style="{StaticResource textblock-default}" VerticalAlignment="Center" FontSize="16" Text="{Binding LeftCount}" HorizontalAlignment="Center"/>
  109. </Grid>
  110. </DataTemplate>
  111. </DataGridTemplateColumn.CellTemplate>
  112. </DataGridTemplateColumn>
  113. <DataGridTemplateColumn Width="0.12*">
  114. <DataGridTemplateColumn.Header>
  115. <StackPanel Orientation="Horizontal">
  116. <TextBlock VerticalAlignment="Center" Text="历史提交总数"/>
  117. <CheckBox VerticalAlignment="Center" Margin="2" IsChecked="True"/>
  118. </StackPanel>
  119. </DataGridTemplateColumn.Header>
  120. <DataGridTemplateColumn.CellTemplate>
  121. <DataTemplate>
  122. <Grid>
  123. <TextBlock Margin="0,0,18,0" Style="{StaticResource textblock-default}" VerticalAlignment="Center" FontSize="16" Text="{Binding TotalCommittedCount}" HorizontalAlignment="Center"/>
  124. </Grid>
  125. </DataTemplate>
  126. </DataGridTemplateColumn.CellTemplate>
  127. </DataGridTemplateColumn>
  128. <DataGridTemplateColumn Width="0.12*">
  129. <DataGridTemplateColumn.Header>
  130. <StackPanel Orientation="Horizontal">
  131. <TextBlock VerticalAlignment="Center" Text="已被审核"/>
  132. <CheckBox VerticalAlignment="Center" Margin="2" IsChecked="True"/>
  133. </StackPanel>
  134. </DataGridTemplateColumn.Header>
  135. <DataGridTemplateColumn.CellTemplate>
  136. <DataTemplate>
  137. <Grid>
  138. <TextBlock Margin="0,0,18,0" Style="{StaticResource textblock-default}" VerticalAlignment="Center" FontSize="16" Text="{Binding ReviewedCount}" HorizontalAlignment="Center"/>
  139. </Grid>
  140. </DataTemplate>
  141. </DataGridTemplateColumn.CellTemplate>
  142. </DataGridTemplateColumn>
  143. <DataGridTemplateColumn Width="0.12*">
  144. <DataGridTemplateColumn.Header>
  145. <StackPanel Orientation="Horizontal">
  146. <TextBlock VerticalAlignment="Center" Text="得分"/>
  147. <CheckBox VerticalAlignment="Center" Margin="2" IsChecked="True"/>
  148. </StackPanel>
  149. </DataGridTemplateColumn.Header>
  150. <DataGridTemplateColumn.CellTemplate>
  151. <DataTemplate>
  152. <Grid>
  153. <TextBlock Margin="0,0,18,0" Style="{StaticResource textblock-default}" Foreground="{Binding ScoreColor}" VerticalAlignment="Center" FontSize="16" Text="{Binding Score}" HorizontalAlignment="Center"/>
  154. </Grid>
  155. </DataTemplate>
  156. </DataGridTemplateColumn.CellTemplate>
  157. </DataGridTemplateColumn>
  158. </DataGrid.Columns>
  159. </DataGrid>
  160. <TextBlock Style="{StaticResource textblock-default}" Grid.Row="2" Margin="4" x:Name="SystemStatistic" VerticalAlignment="Center" FontWeight="Bold" Foreground="#31708f" FontSize="14" Visibility="Collapsed"/>
  161. </Grid>
  162. </UserControl>