OperationLogPage.xaml 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <UserControl
  2. x:Class="LogoForceTestApp.Modules.MainModule.Views.OperationLogPage"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:hc="https://handyorg.github.io/handycontrol"
  7. xmlns:local="clr-namespace:LogoForceTestApp.Modules.MainModule.Views"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. xmlns:viewmodels="clr-namespace:LogoForceTestApp.Modules.MainModule.ViewModels"
  10. d:DataContext="{d:DesignInstance Type=viewmodels:OperationLogPageViewModel}"
  11. d:DesignHeight="450"
  12. d:DesignWidth="800"
  13. mc:Ignorable="d">
  14. <Grid>
  15. <Grid.RowDefinitions>
  16. <RowDefinition Height="auto" />
  17. <RowDefinition />
  18. <RowDefinition Height="auto" />
  19. </Grid.RowDefinitions>
  20. <StackPanel Orientation="Horizontal">
  21. <hc:DatePicker
  22. Margin="4,0"
  23. hc:InfoElement.Title="选择开始时间"
  24. SelectedDate="{Binding SelectedStartDate}" />
  25. <hc:DatePicker
  26. Margin="4,0"
  27. hc:InfoElement.Title="选择结束时间"
  28. SelectedDate="{Binding SelectedEndDate}" />
  29. <Button
  30. Margin="4,0"
  31. VerticalAlignment="Bottom"
  32. Command="{Binding QueryCommand}"
  33. Content="查询" />
  34. </StackPanel>
  35. <DataGrid
  36. Grid.Row="1"
  37. AutoGenerateColumns="False"
  38. IsReadOnly="True"
  39. ItemsSource="{Binding LogModels}">
  40. <DataGrid.Columns>
  41. <DataGridTextColumn Binding="{Binding Id}" Header="ID" />
  42. <DataGridTextColumn Binding="{Binding UserName}" Header="用户" />
  43. <DataGridTextColumn Binding="{Binding Content}" Header="日志" />
  44. <DataGridTextColumn Binding="{Binding OperateAction}" Header="行为" />
  45. <DataGridTextColumn Binding="{Binding OperateObject}" Header="操作对象" />
  46. </DataGrid.Columns>
  47. </DataGrid>
  48. <hc:Pagination
  49. Grid.Row="2"
  50. HorizontalAlignment="Center"
  51. IsJumpEnabled="True"
  52. MaxPageCount="{Binding MaxCount}"
  53. PageIndex="{Binding PageIndex}">
  54. <hc:Interaction.Triggers>
  55. <hc:EventTrigger EventName="PageUpdated">
  56. <hc:EventToCommand Command="{Binding PageUpdatedCmd}" PassEventArgsToCommand="True" />
  57. </hc:EventTrigger>
  58. </hc:Interaction.Triggers>
  59. </hc:Pagination>
  60. </Grid>
  61. </UserControl>