WinLogInfo.xaml
14.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
<win:HideCloseWindow
x:Class="HHECS.WinClient.View.SysLogInfo.WinLogInfo"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:win="clr-namespace:HHECS.WinCommon.Win;assembly=HHECS.WinCommon"
xmlns:local="clr-namespace:HHECS.WinClient.View.SysLogInfo"
Title="系统日志查询"
Height="450"
Width="800"
d:DataContext="{d:DesignInstance Type=local:LogInfoVM}"
mc:Ignorable="d">
<Window.Resources>
<Style x:Key="sp" TargetType="StackPanel">
<Setter Property="Orientation" Value="Horizontal"/>
<Setter Property="HorizontalAlignment" Value="Right"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Margin" Value="5"/>
</Style>
<Style TargetType="TextBox" BasedOn="{StaticResource {x:Type TextBox}}">
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="MinWidth" Value="100"/>
<Setter Property="MaxWidth" Value="200"/>
</Style>
<Style TargetType="ComboBox" BasedOn="{StaticResource {x:Type ComboBox}}">
<Setter Property="MinWidth" Value="100"/>
<Setter Property="Height" Value="30"/>
</Style>
<Style x:Key="btn" TargetType="Button" BasedOn="{StaticResource BaseButtonStyle}">
<Setter Property="Margin" Value="2"/>
</Style>
</Window.Resources>
<TabControl>
<TabItem x:Name="TabInterfaceLog" Header="接口日志">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<WrapPanel Grid.Row="0">
<StackPanel Style="{StaticResource sp}">
<TextBlock Text="接口名:"/>
<ComboBox SelectedValue="{Binding InterfaceName}" ItemsSource="{Binding InterfaceNames}" DisplayMemberPath="Key" SelectedValuePath="Value" SelectedIndex="0"/>
</StackPanel>
<StackPanel Style="{StaticResource sp}">
<TextBlock Text="Url:"/>
<TextBox Text="{Binding InterfaceLogUrl}"/>
</StackPanel>
<StackPanel Style="{StaticResource sp}">
<TextBlock Text="请求:"/>
<TextBox Text="{Binding InterfaceLogRequest}"/>
</StackPanel>
<StackPanel Style="{StaticResource sp}">
<TextBlock Text="回复:"/>
<TextBox Text="{Binding InterfaceLogResponse}"/>
</StackPanel>
<StackPanel Style="{StaticResource sp}">
<TextBlock Text="标志:"/>
<ComboBox SelectedValue="{Binding InterfaceLogFlag}" ItemsSource="{Binding InterfaceLogFlags}" DisplayMemberPath="Key" SelectedValuePath="Value" SelectedIndex="0"/>
</StackPanel>
<StackPanel Style="{StaticResource sp}">
<TextBlock Text="开始时间:"/>
<hc:DateTimePicker SelectedDateTime="{Binding InterfaceLogStartTime}"/>
<TextBlock Text="结束时间:"/>
<hc:DateTimePicker SelectedDateTime="{Binding InterfaceLogEndTime}"/>
</StackPanel>
</WrapPanel>
<WrapPanel Grid.Row="1" HorizontalAlignment="Right">
<Button x:Name="BtnQueryInterfaceLog" Content="查询" Style="{StaticResource btn}" Click="BtnQueryInterfaceLog_Click" Tag="log:interfacelogquery"/>
<Button x:Name="BtnExportInterfaceLog" Content="导出" Style="{StaticResource btn}" Click="BtnExportInterfaceLog_Click" Tag="log:interfacelogexport"/>
</WrapPanel>
<DockPanel Grid.Row="2">
<hc:Pagination
x:Name="PageInterfaceLog"
DockPanel.Dock="Bottom"
MaxPageCount="{Binding PageInterfaceLogInfo.MaxPage}"
PageIndex="{Binding PageInterfaceLogInfo.PageIndex,Mode=TwoWay}"
HorizontalAlignment="Center"
IsJumpEnabled="True"
PageUpdated="PageInterfaceLog_PageUpdated"/>
<DataGrid x:Name="DGInterfaceLog" ItemsSource="{Binding InterfaceLogs}">
<DataGrid.Columns>
<DataGridTextColumn Header="内部Id" Binding="{Binding Id}"/>
<DataGridTextColumn Header="接口名" Binding="{Binding InterfaceName}"/>
<DataGridTextColumn Header="Url" Binding="{Binding Url}"/>
<DataGridTextColumn Header="请求" Binding="{Binding Request}" Width="500">
<DataGridTextColumn.ElementStyle>
<Style TargetType="TextBlock">
<Setter Property="TextWrapping" Value="Wrap"/>
<Setter Property="Height" Value="auto"/>
</Style>
</DataGridTextColumn.ElementStyle>
</DataGridTextColumn>
<DataGridTextColumn Header="回复" Binding="{Binding Response}" Width="500">
<DataGridTextColumn.ElementStyle>
<Style TargetType="TextBlock">
<Setter Property="TextWrapping" Value="Wrap"/>
<Setter Property="Height" Value="auto"/>
</Style>
</DataGridTextColumn.ElementStyle>
</DataGridTextColumn>
<DataGridTextColumn Header="标志" Binding="{Binding Flag}"/>
<DataGridTextColumn Header="内容" Binding="{Binding Content}"/>
<DataGridTextColumn Header="备注" Binding="{Binding Remark}"/>
<DataGridTextColumn Header="开始调用时间" Binding="{Binding Created}"/>
<DataGridTextColumn Header="调用结束时间" Binding="{Binding Updated}"/>
<DataGridTextColumn Header="创建人" Binding="{Binding CreatedBy}"/>
</DataGrid.Columns>
</DataGrid>
</DockPanel>
</Grid>
</TabItem>
<TabItem x:Name="TabContentLog" Header="内容日志">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<WrapPanel Grid.Row="0">
<StackPanel Style="{StaticResource sp}">
<TextBlock Text="标题:"/>
<ComboBox SelectedValue="{Binding ContentLogTitle}" ItemsSource="{Binding ContentLogTitles}" DisplayMemberPath="Key" SelectedValuePath="Value" SelectedIndex="0"/>
</StackPanel>
<StackPanel Style="{StaticResource sp}">
<TextBlock Text="内容:"/>
<TextBox Text="{Binding ContentLogContent}"/>
</StackPanel>
<StackPanel Style="{StaticResource sp}">
<TextBlock Text="标志"/>
<ComboBox SelectedValue="{Binding ContentLogFlag}" ItemsSource="{Binding ContentLogFlags}" DisplayMemberPath="Key" SelectedValuePath="Value" SelectedIndex="0"/>
</StackPanel>
<StackPanel Style="{StaticResource sp}">
<TextBlock Text="开始时间:"/>
<hc:DateTimePicker SelectedDateTime="{Binding ContentLogStartTime}"/>
<TextBlock Text="结束时间:"/>
<hc:DateTimePicker SelectedDateTime="{Binding ContentLogEndTime}"/>
</StackPanel>
</WrapPanel>
<WrapPanel Grid.Row="1" HorizontalAlignment="Right">
<Button x:Name="BtnQueryContentLog" Content="查询" Style="{StaticResource btn}" Click="BtnQueryContentLog_Click" Tag="log:contentlogquery"/>
<Button x:Name="BtnExportContentLog" Content="导出" Style="{StaticResource btn}" Click="BtnExportContentLog_Click" Tag="log:contentlogexport"/>
</WrapPanel>
<DockPanel Grid.Row="2">
<hc:Pagination
x:Name="PageContentLog"
DockPanel.Dock="Bottom"
MaxPageCount="{Binding PageContentLogInfo.MaxPage}"
PageIndex="{Binding PageContentLogInfo.PageIndex,Mode=TwoWay}"
HorizontalAlignment="Center"
IsJumpEnabled="True"
PageUpdated="PageContentLog_PageUpdated"/>
<DataGrid x:Name="DGContentLog" ItemsSource="{Binding ContentLogs}">
<DataGrid.Columns>
<DataGridTextColumn Header="内部Id" Binding="{Binding Id}"/>
<DataGridTextColumn Header="标题" Binding="{Binding Title}"/>
<DataGridTextColumn Header="内容" Binding="{Binding Content}"/>
<DataGridTextColumn Header="标志" Binding="{Binding Flag}"/>
<DataGridTextColumn Header="创建时间" Binding="{Binding Created}"/>
<DataGridTextColumn Header="创建人" Binding="{Binding CreatedBy}"/>
</DataGrid.Columns>
</DataGrid>
</DockPanel>
</Grid>
</TabItem>
<TabItem x:Name="TabOperationLog" Header="操作日志">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<WrapPanel Grid.Row="0">
<StackPanel Style="{StaticResource sp}">
<TextBlock Text="标题:"/>
<ComboBox SelectedValue="{Binding OperationLogTitle}" ItemsSource="{Binding OperationLogTitles}" DisplayMemberPath="Key" SelectedValuePath="Value" SelectedIndex="0"/>
</StackPanel>
<StackPanel Style="{StaticResource sp}">
<TextBlock Text="模块:"/>
<ComboBox SelectedValue="{Binding OperationLogModule}" ItemsSource="{Binding OperationLogModules}" DisplayMemberPath="Key" SelectedValuePath="Value" SelectedIndex="0"/>
</StackPanel>
<StackPanel Style="{StaticResource sp}">
<TextBlock Text="内容"/>
<TextBox Text="{Binding OperationLogContent}"/>
</StackPanel>
<StackPanel Style="{StaticResource sp}">
<TextBlock Text="结果"/>
<ComboBox SelectedValue="{Binding OperationLogResult}" ItemsSource="{Binding OperationLogResults}" DisplayMemberPath="Key" SelectedValuePath="Value" SelectedIndex="0"/>
</StackPanel>
<StackPanel Style="{StaticResource sp}">
<TextBlock Text="开始时间:"/>
<hc:DateTimePicker SelectedDateTime="{Binding OperationLogStartTime}"/>
<TextBlock Text="结束时间:"/>
<hc:DateTimePicker SelectedDateTime="{Binding OperationLogEndTime}"/>
</StackPanel>
</WrapPanel>
<WrapPanel Grid.Row="1" HorizontalAlignment="Right">
<Button x:Name="BtnQueryOperationLog" Style="{StaticResource btn}" Click="BtnQueryOperationLog_Click" Tag="log:operationlogquery">查询</Button>
<Button x:Name="BtnExportOperationLog" Style="{StaticResource btn}" Click="BtnExportOperationLog_Click" Tag="log:operationlogexport">导出</Button>
</WrapPanel>
<DockPanel Grid.Row="2">
<hc:Pagination
x:Name="PageOperationLog"
DockPanel.Dock="Bottom"
MaxPageCount="{Binding PageOperationLogInfo.MaxPage}"
PageIndex="{Binding PageOperationLogInfo.PageIndex,Mode=TwoWay}"
HorizontalAlignment="Center"
IsJumpEnabled="True"
PageUpdated="PageOperationLog_PageUpdated"/>
<DataGrid x:Name="DGOperationLog" ItemsSource="{Binding OperationLogs}">
<DataGrid.Columns>
<DataGridTextColumn Header="内部Id" Binding="{Binding Id}"/>
<DataGridTextColumn Header="标题" Binding="{Binding Title}"/>
<DataGridTextColumn Header="模块" Binding="{Binding Module}"/>
<DataGridTextColumn Header="内容" Binding="{Binding Content}"/>
<DataGridTextColumn Header="结果" Binding="{Binding Result}"/>
<DataGridTextColumn Header="创建时间" Binding="{Binding Created}"/>
<DataGridTextColumn Header="创建人" Binding="{Binding CreatedBy}"/>
</DataGrid.Columns>
</DataGrid>
</DockPanel>
</Grid>
</TabItem>
</TabControl>
</win:HideCloseWindow>