更新项目配置,新增设备同步模块,优化WebSocket和Swagger配置,增强SCADA系统的免登录接口,支持数据字典项和登录日志的免登录查询与记录。调整Java编译设置,确保更好的开发体验。

This commit is contained in:
geht
2026-04-28 10:23:58 +08:00
parent bbe46dcf2d
commit 142a0bdaba
1013 changed files with 41858 additions and 28 deletions

View File

@@ -0,0 +1,101 @@
<UserControl x:Class="YY.Admin.Views.Dialogs.AlertDialogView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:prism="http://prismlibrary.com/"
xmlns:ctls="clr-namespace:YY.Admin.Core.Controls;assembly=YY.Admin.Core"
Width="400" Height="260">
<UserControl.Resources>
<Style x:Key="DialogButton" TargetType="Button">
<Setter Property="Background" Value="#1890ff"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Height" Value="32"/>
<Setter Property="Width" Value="80"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="FontWeight" Value="SemiBold"/>
</Style>
</UserControl.Resources>
<Border Background="White"
CornerRadius="8"
BorderBrush="#f0f0f0"
BorderThickness="1"
>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- 标题栏 -->
<Border Grid.Row="0"
Background="#1890ff"
CornerRadius="8,8,0,0"
Height="50">
<Grid Margin="16,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<!-- 图标和标题 -->
<StackPanel Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center">
<ctls:FontAwesomeIcon
Icon="&#xf05a;"
Foreground="White"
FontSize="16"
Margin="0,0,8,0"/>
<TextBlock Text="{Binding Title}"
Foreground="White"
FontWeight="Bold"
FontSize="14"
VerticalAlignment="Center"/>
</StackPanel>
<!-- 关闭按钮 -->
<Button Grid.Column="2"
Command="{Binding CloseCommand}"
Style="{StaticResource ButtonIcon}"
Foreground="White"
Background="Transparent"
BorderThickness="0"
Width="24" Height="24"
hc:IconElement.Geometry="{StaticResource ErrorGeometry}"
Padding="0"
VerticalAlignment="Center"/>
</Grid>
</Border>
<!-- 内容区域 -->
<Border Grid.Row="1" Padding="20">
<ScrollViewer VerticalScrollBarVisibility="Auto">
<TextBlock Text="{Binding Message}"
TextWrapping="Wrap"
TextAlignment="Center"
VerticalAlignment="Center"
HorizontalAlignment="Center"
FontSize="14"
Foreground="#666666"
LineHeight="20"/>
</ScrollViewer>
</Border>
<!-- 按钮区域 -->
<Border Grid.Row="2"
Background="#fafafa"
CornerRadius="0,0,8,8"
Height="60">
<Button Content="确定"
Command="{Binding CloseCommand}"
Style="{StaticResource DialogButton}"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Border>
</Grid>
</Border>
</UserControl>

View File

@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace YY.Admin.Views.Dialogs
{
/// <summary>
/// AlertDialogView.xaml 的交互逻辑
/// </summary>
public partial class AlertDialogView : UserControl
{
public AlertDialogView()
{
InitializeComponent();
}
}
}

View File

@@ -0,0 +1,116 @@
<UserControl x:Class="YY.Admin.Views.Dialogs.ConfirmDialogView"
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:local="clr-namespace:YY.Admin.Views.Dialogs"
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:prism="http://prismlibrary.com/"
mc:Ignorable="d"
Width="420" Height="280">
<UserControl.Resources>
<Style x:Key="PrimaryButtonStyle" TargetType="Button">
<Setter Property="Background" Value="#1890ff"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Height" Value="32"/>
<Setter Property="Width" Value="80"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="FontSize" Value="14"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#40a9ff"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="#096dd9"/>
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="SecondaryButtonStyle" TargetType="Button">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Foreground" Value="#666666"/>
<Setter Property="BorderBrush" Value="#d9d9d9"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Height" Value="32"/>
<Setter Property="Width" Value="80"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="FontSize" Value="14"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#f5f5f5"/>
<Setter Property="BorderBrush" Value="#40a9ff"/>
<Setter Property="Foreground" Value="#40a9ff"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="#e6f7ff"/>
<Setter Property="BorderBrush" Value="#096dd9"/>
<Setter Property="Foreground" Value="#096dd9"/>
</Trigger>
</Style.Triggers>
</Style>
</UserControl.Resources>
<Border Background="White"
BorderBrush="#f0f0f0"
BorderThickness="1"
CornerRadius="4">
<Grid Margin="0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- 标题栏 -->
<Border Grid.Row="0"
Background="#fafafa"
Height="40"
CornerRadius="4,4,0,0"
BorderThickness="0,0,0,1"
BorderBrush="#f0f0f0">
<StackPanel Orientation="Horizontal" Margin="16,0">
<TextBlock Text="提示"
VerticalAlignment="Center"
FontWeight="SemiBold"
Foreground="#333333"/>
</StackPanel>
</Border>
<!-- 消息内容 -->
<ScrollViewer Grid.Row="1"
VerticalScrollBarVisibility="Auto"
Padding="16">
<TextBlock Text="{Binding Message}"
TextWrapping="Wrap"
TextAlignment="Center"
VerticalAlignment="Center"
HorizontalAlignment="Center"
FontSize="14"
Foreground="#666666"
LineHeight="20"/>
</ScrollViewer>
<!-- 按钮区域 -->
<Border Grid.Row="2"
Background="#fafafa"
Height="60"
CornerRadius="0,0,4,4"
BorderThickness="0,1,0,0"
BorderBrush="#f0f0f0">
<StackPanel Orientation="Horizontal"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<Button Content="确定"
Command="{Binding YesCommand}"
Style="{StaticResource PrimaryButtonStyle}"
Margin="0,0,12,0"/>
<Button Content="取消"
Command="{Binding NoCommand}"
Style="{StaticResource SecondaryButtonStyle}"/>
</StackPanel>
</Border>
</Grid>
</Border>
</UserControl>

View File

@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace YY.Admin.Views.Dialogs
{
/// <summary>
/// ConfirmDialogView.xaml 的交互逻辑
/// </summary>
public partial class ConfirmDialogView : UserControl
{
public ConfirmDialogView()
{
InitializeComponent();
}
}
}

View File

@@ -0,0 +1,78 @@
<UserControl x:Class="YY.Admin.Views.Dialogs.ErrorDialogView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:ctls="clr-namespace:YY.Admin.Core.Controls;assembly=YY.Admin.Core"
Width="420" Height="280">
<Border Background="White"
CornerRadius="8"
BorderBrush="#f0f0f0"
BorderThickness="1">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- 标题栏 -->
<Border Grid.Row="0"
Background="#ff4d4f"
CornerRadius="8,8,0,0"
Height="50">
<Grid Margin="16,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center">
<ctls:FontAwesomeIcon
Icon="&#xf06a;"
Foreground="White"
FontSize="16"
Margin="0,0,8,0"/>
<TextBlock Text="错误提示"
Foreground="White"
FontWeight="Bold"
FontSize="14"
VerticalAlignment="Center"/>
</StackPanel>
<Button Grid.Column="2"
Command="{Binding CloseCommand}"
Style="{StaticResource ButtonIcon}"
Foreground="White"
Background="Transparent"
BorderThickness="0"
Width="24" Height="24"
hc:IconElement.Geometry="{StaticResource ErrorGeometry}"
Padding="0"
VerticalAlignment="Center"/>
</Grid>
</Border>
<!-- 内容区域 -->
<Border Grid.Row="1" Padding="20">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- 错误消息 -->
<ScrollViewer Grid.Column="1" VerticalScrollBarVisibility="Auto">
<TextBlock Text="{Binding Message}"
TextWrapping="Wrap"
VerticalAlignment="Center"
FontSize="14"
Foreground="#666666"
LineHeight="20"/>
</ScrollViewer>
</Grid>
</Border>
</Grid>
</Border>
</UserControl>

View File

@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace YY.Admin.Views.Dialogs
{
/// <summary>
/// ErrorDialogView.xaml 的交互逻辑
/// </summary>
public partial class ErrorDialogView : UserControl
{
public ErrorDialogView()
{
InitializeComponent();
}
}
}

View File

@@ -0,0 +1,51 @@
<UserControl x:Class="YY.Admin.Views.Dialogs.ServerSettingsDialogView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ctls="clr-namespace:YY.Admin.Core.Controls;assembly=YY.Admin.Core"
Width="460" Height="360">
<Border Background="White" BorderBrush="#f0f0f0" BorderThickness="1" CornerRadius="4">
<Grid Margin="0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Border Grid.Row="0" Background="#fafafa" Height="42" CornerRadius="4,4,0,0" BorderThickness="0,0,0,1" BorderBrush="#f0f0f0">
<StackPanel Orientation="Horizontal" Margin="16,0">
<TextBlock Text="服务器设置" VerticalAlignment="Center" FontWeight="SemiBold" Foreground="#333333"/>
</StackPanel>
</Border>
<StackPanel Grid.Row="1" Margin="20,16,20,0">
<TextBlock Text="IP" Margin="0,0,0,6"/>
<TextBox Text="{Binding Ip, UpdateSourceTrigger=PropertyChanged}" Height="32"/>
<TextBlock Text="端口" Margin="0,12,0,6"/>
<TextBox Text="{Binding Port, UpdateSourceTrigger=PropertyChanged}" Height="32"/>
<TextBlock Text="WebSocket 地址(可选)" Margin="0,12,0,6"/>
<TextBox Text="{Binding WebSocketUrl, UpdateSourceTrigger=PropertyChanged}" Height="32"/>
<TextBlock Text="后端上下文路径" Margin="0,12,0,6"/>
<TextBox Text="{Binding BasePath, UpdateSourceTrigger=PropertyChanged}" Height="32"/>
<TextBlock Text="{Binding ErrorMessage}" Foreground="Red" Margin="0,12,0,0"/>
</StackPanel>
<Border Grid.Row="2" Background="#fafafa" Height="62" CornerRadius="0,0,4,4" BorderThickness="0,1,0,0" BorderBrush="#f0f0f0">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<Button Command="{Binding SaveCommand}" Width="90" Height="34" Margin="0,0,12,0" Background="#1890ff" Foreground="White" BorderThickness="0">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<ctls:FontAwesomeIcon Icon="&#xf0c7;" IconFamily="Solid" Margin="0,0,6,0"/>
<TextBlock Text="保存"/>
</StackPanel>
</Button>
<Button Command="{Binding CancelCommand}" Width="90" Height="34" Background="Transparent" BorderBrush="#d9d9d9">
<TextBlock Text="取消"/>
</Button>
</StackPanel>
</Border>
</Grid>
</Border>
</UserControl>

View File

@@ -0,0 +1,15 @@
using System.Windows.Controls;
namespace YY.Admin.Views.Dialogs
{
/// <summary>
/// ServerSettingsDialogView.xaml 的交互逻辑
/// </summary>
public partial class ServerSettingsDialogView : UserControl
{
public ServerSettingsDialogView()
{
InitializeComponent();
}
}
}

View File

@@ -0,0 +1,110 @@
<UserControl x:Class="YY.Admin.Views.Dialogs.SuccessDialogView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:ctls="clr-namespace:YY.Admin.Core.Controls;assembly=YY.Admin.Core"
Width="420" Height="280">
<UserControl.Resources>
<Style x:Key="SuccessButton" TargetType="Button" BasedOn="{StaticResource DialogButton}">
<Setter Property="Background" Value="#52c41a"/>
</Style>
</UserControl.Resources>
<Border Background="White"
CornerRadius="8"
BorderBrush="#f0f0f0"
BorderThickness="1">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- 标题栏 -->
<Border Grid.Row="0"
Background="#52c41a"
CornerRadius="8,8,0,0"
Height="50">
<Grid Margin="16,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center">
<ctls:FontAwesomeIcon
Icon="&#xf058;"
Foreground="White"
FontSize="16"
Margin="0,0,8,0"/>
<TextBlock Text="操作成功"
Foreground="White"
FontWeight="Bold"
FontSize="14"
VerticalAlignment="Center"/>
</StackPanel>
<Button Grid.Column="2"
Command="{Binding CloseCommand}"
Style="{StaticResource ButtonIcon}"
Foreground="White"
Background="Transparent"
BorderThickness="0"
Width="24" Height="24"
hc:IconElement.Geometry="{StaticResource ErrorGeometry}"
Padding="0"
VerticalAlignment="Center"/>
</Grid>
</Border>
<!-- 内容区域 -->
<Border Grid.Row="1" Padding="20">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- 成功图标 -->
<Border Grid.Column="0"
Background="#f6ffed"
Width="48" Height="48"
CornerRadius="24"
Margin="0,0,16,0">
<ctls:FontAwesomeIcon
Icon="&#xf058;"
Foreground="#52c41a"
FontSize="20"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Border>
<!-- 成功消息 -->
<ScrollViewer Grid.Column="1" VerticalScrollBarVisibility="Auto">
<TextBlock Text="{Binding Message}"
TextWrapping="Wrap"
VerticalAlignment="Center"
FontSize="14"
Foreground="#666666"
LineHeight="20"/>
</ScrollViewer>
</Grid>
</Border>
<!-- 按钮区域 -->
<Border Grid.Row="2"
Background="#fafafa"
CornerRadius="0,0,8,8"
Height="60">
<Button Content="确定"
Command="{Binding CloseCommand}"
Style="{StaticResource SuccessButton}"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Border>
</Grid>
</Border>
</UserControl>

View File

@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace YY.Admin.Views.Dialogs
{
/// <summary>
/// SuccessDialogView.xaml 的交互逻辑
/// </summary>
public partial class SuccessDialogView : UserControl
{
public SuccessDialogView()
{
InitializeComponent();
}
}
}

View File

@@ -0,0 +1,110 @@
<UserControl x:Class="YY.Admin.Views.Dialogs.WarningDialogView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:ctls="clr-namespace:YY.Admin.Core.Controls;assembly=YY.Admin.Core"
Width="420" Height="280">
<UserControl.Resources>
<Style x:Key="WarningButton" TargetType="Button">
<Setter Property="Background" Value="#faad14"/>
</Style>
</UserControl.Resources>
<Border Background="White"
CornerRadius="8"
BorderBrush="#f0f0f0"
BorderThickness="1">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- 标题栏 -->
<Border Grid.Row="0"
Background="#faad14"
CornerRadius="8,8,0,0"
Height="50">
<Grid Margin="16,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center">
<ctls:FontAwesomeIcon
Icon="&#xf071;"
Foreground="White"
FontSize="16"
Margin="0,0,8,0"/>
<TextBlock Text="警告提示"
Foreground="White"
FontWeight="Bold"
FontSize="14"
VerticalAlignment="Center"/>
</StackPanel>
<Button Grid.Column="2"
Command="{Binding CloseCommand}"
Style="{StaticResource ButtonIcon}"
Foreground="White"
Background="Transparent"
BorderThickness="0"
Width="24" Height="24"
hc:IconElement.Geometry="{StaticResource ErrorGeometry}"
Padding="0"
VerticalAlignment="Center"/>
</Grid>
</Border>
<!-- 内容区域 -->
<Border Grid.Row="1" Padding="20">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- 警告图标 -->
<Border Grid.Column="0"
Background="#fffbe6"
Width="48" Height="48"
CornerRadius="24"
Margin="0,0,16,0">
<ctls:FontAwesomeIcon
Icon="&#xf071;"
Foreground="#faad14"
FontSize="20"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Border>
<!-- 警告消息 -->
<ScrollViewer Grid.Column="1" VerticalScrollBarVisibility="Auto">
<TextBlock Text="{Binding Message}"
TextWrapping="Wrap"
VerticalAlignment="Center"
FontSize="14"
Foreground="#666666"
LineHeight="20"/>
</ScrollViewer>
</Grid>
</Border>
<!-- 按钮区域 -->
<Border Grid.Row="2"
Background="#fafafa"
CornerRadius="0,0,8,8"
Height="60">
<Button Content="确定"
Command="{Binding CloseCommand}"
Style="{StaticResource WarningButton}"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Border>
</Grid>
</Border>
</UserControl>

View File

@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace YY.Admin.Views.Dialogs
{
/// <summary>
/// WarningDialogView.xaml 的交互逻辑
/// </summary>
public partial class WarningDialogView : UserControl
{
public WarningDialogView()
{
InitializeComponent();
}
}
}