124 lines
7.5 KiB
XML
124 lines
7.5 KiB
XML
<UserControl x:Class="YY.Admin.Views.SysManage.DataDictionaryManagementView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:hc="https://handyorg.github.io/handycontrol"
|
|
xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes"
|
|
xmlns:core="clr-namespace:YY.Admin.Core;assembly=YY.Admin.Core"
|
|
xmlns:components="clr-namespace:YY.Admin.Views.Control"
|
|
mc:Ignorable="d">
|
|
|
|
<Grid Style="{StaticResource BaseViewStyle}">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<Border Grid.Row="0" CornerRadius="4" Margin="0 0 -10 0">
|
|
<hc:Row>
|
|
<hc:Col Layout="{hc:ColLayout Xs=12, Sm=8, Md=6, Lg=6, Xl=4}">
|
|
<hc:TextBox
|
|
Text="{Binding Input.DictCode, UpdateSourceTrigger=PropertyChanged}"
|
|
hc:InfoElement.Placeholder="请输入字典编码"
|
|
hc:InfoElement.Title="字典编码"
|
|
hc:InfoElement.TitleWidth="70"
|
|
hc:InfoElement.TitlePlacement="Left"
|
|
hc:InfoElement.ShowClearButton="True"
|
|
Margin="0 0 10 10"/>
|
|
</hc:Col>
|
|
<hc:Col Layout="{hc:ColLayout Xs=12, Sm=8, Md=6, Lg=6, Xl=4}">
|
|
<hc:TextBox
|
|
Text="{Binding Input.DictName, UpdateSourceTrigger=PropertyChanged}"
|
|
hc:InfoElement.Placeholder="请输入字典名称"
|
|
hc:InfoElement.Title="字典名称"
|
|
hc:InfoElement.TitleWidth="70"
|
|
hc:InfoElement.TitlePlacement="Left"
|
|
hc:InfoElement.ShowClearButton="True"
|
|
Margin="0 0 10 10"/>
|
|
</hc:Col>
|
|
<hc:Col Layout="{hc:ColLayout Xs=12, Sm=8, Md=6, Lg=6, Xl=4}">
|
|
<hc:TextBox
|
|
Text="{Binding Input.ItemText, UpdateSourceTrigger=PropertyChanged}"
|
|
hc:InfoElement.Placeholder="请输入字典项文本"
|
|
hc:InfoElement.Title="字典项文本"
|
|
hc:InfoElement.TitleWidth="70"
|
|
hc:InfoElement.TitlePlacement="Left"
|
|
hc:InfoElement.ShowClearButton="True"
|
|
Margin="0 0 10 10"/>
|
|
</hc:Col>
|
|
<hc:Col Layout="{hc:ColLayout Xs=12, Sm=8, Md=6, Lg=6, Xl=4}">
|
|
<hc:TextBox
|
|
Text="{Binding Input.ItemValue, UpdateSourceTrigger=PropertyChanged}"
|
|
hc:InfoElement.Placeholder="请输入字典项值"
|
|
hc:InfoElement.Title="字典项值"
|
|
hc:InfoElement.TitleWidth="70"
|
|
hc:InfoElement.TitlePlacement="Left"
|
|
hc:InfoElement.ShowClearButton="True"
|
|
Margin="0 0 10 10"/>
|
|
</hc:Col>
|
|
<hc:Col Layout="{hc:ColLayout Xs=12, Sm=8, Md=6, Lg=6, Xl=4}">
|
|
<hc:ComboBox
|
|
SelectedValue="{Binding Input.Status, Converter={StaticResource EnumToIntConverter}, ConverterParameter={x:Type core:StatusEnum}}"
|
|
ItemsSource="{Binding StatusList}"
|
|
DisplayMemberPath="Key"
|
|
SelectedValuePath="Value"
|
|
hc:InfoElement.Placeholder="请选择状态"
|
|
hc:InfoElement.Title="状态"
|
|
hc:InfoElement.TitleWidth="70"
|
|
hc:InfoElement.TitlePlacement="Left"
|
|
hc:InfoElement.ShowClearButton="True"
|
|
Margin="0 0 10 10"/>
|
|
</hc:Col>
|
|
</hc:Row>
|
|
</Border>
|
|
|
|
<Border Grid.Row="1" Margin="0,10">
|
|
<hc:UniformSpacingPanel Spacing="10">
|
|
<Button Style="{StaticResource ButtonPrimary}" Command="{Binding SearchCommand}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<md:PackIcon Kind="Search"/>
|
|
<TextBlock Text="搜索" Style="{StaticResource IconButtonStyle}"/>
|
|
</StackPanel>
|
|
</Button>
|
|
<Button Style="{StaticResource ButtonDefault}" Command="{Binding ResetCommand}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<md:PackIcon Kind="Refresh"/>
|
|
<TextBlock Text="重置" Style="{StaticResource IconButtonStyle}"/>
|
|
</StackPanel>
|
|
</Button>
|
|
<Button Style="{StaticResource ButtonSuccess}" Command="{Binding SyncCommand}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<md:PackIcon Kind="CloudSyncOutline"/>
|
|
<TextBlock Text="同步数据字典" Style="{StaticResource IconButtonStyle}"/>
|
|
</StackPanel>
|
|
</Button>
|
|
</hc:UniformSpacingPanel>
|
|
</Border>
|
|
|
|
<DataGrid
|
|
Grid.Row="2"
|
|
AutoGenerateColumns="False"
|
|
HeadersVisibility="All"
|
|
ItemsSource="{Binding PaginationDataGridViewModel.Data}"
|
|
ColumnHeaderStyle="{StaticResource CusDataGridColumnHeaderStyle}"
|
|
Style="{StaticResource CusDataGridStyle}">
|
|
<DataGrid.Columns>
|
|
<DataGridTextColumn IsReadOnly="True" Binding="{Binding DictCode}" Header="字典编码" Width="150" CellStyle="{StaticResource CusDataGridCellStyle}"/>
|
|
<DataGridTextColumn IsReadOnly="True" Binding="{Binding DictName}" Header="字典名称" Width="170" CellStyle="{StaticResource CusDataGridCellStyle}"/>
|
|
<DataGridTextColumn IsReadOnly="True" Binding="{Binding ItemText}" Header="字典项文本" Width="170" CellStyle="{StaticResource CusDataGridCellStyle}"/>
|
|
<DataGridTextColumn IsReadOnly="True" Binding="{Binding ItemValue}" Header="字典项值" Width="140" CellStyle="{StaticResource CusDataGridCellStyle}"/>
|
|
<DataGridTextColumn IsReadOnly="True" Binding="{Binding ItemDescription}" Header="描述" Width="220" CellStyle="{StaticResource CusDataGridCellStyle}"/>
|
|
<DataGridTextColumn IsReadOnly="True" Binding="{Binding SortOrder}" Header="排序" Width="80" CellStyle="{StaticResource CusDataGridCellStyle}"/>
|
|
<DataGridTextColumn IsReadOnly="True" Binding="{Binding Status, Converter={StaticResource EnumDescriptionConverter}}" Header="状态" Width="80" CellStyle="{StaticResource CusDataGridCellStyle}"/>
|
|
<DataGridTextColumn IsReadOnly="True" Binding="{Binding CreateTime, StringFormat='yyyy-MM-dd HH:mm:ss'}" Header="创建时间" Width="170" CellStyle="{StaticResource CusDataGridCellStyle}"/>
|
|
<DataGridTextColumn IsReadOnly="True" Binding="{Binding UpdateTime, StringFormat='yyyy-MM-dd HH:mm:ss'}" Header="更新时间" Width="170" CellStyle="{StaticResource CusDataGridCellStyle}"/>
|
|
</DataGrid.Columns>
|
|
</DataGrid>
|
|
|
|
<components:PaginationDataGridControl Grid.Row="3" DataContext="{Binding PaginationDataGridViewModel}"/>
|
|
</Grid>
|
|
</UserControl>
|