更新项目配置,新增设备同步模块,优化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,79 @@
using System.Windows.Controls;
using System.Windows;
namespace YY.Admin.Core
{
/// <summary>
/// DataGrid绑定数据源描述
/// </summary>
public class BindDescriptionAttribute : Attribute
{
/// <summary>
/// 列名
/// </summary>
public string HeaderName { get; set; }
/// <summary>
/// 显示为
/// </summary>
public ShowScheme ShowAs { get; set; }
/// <summary>
/// 显示顺序
/// </summary>
public int DisplayIndex { get; set; }
/// <summary>
/// DataGrid列绑定属性名称
/// </summary>
public string PropertyName { get; set; }
/// <summary>
/// 应用内的容模板Key
/// </summary>
public string ResourceKey { get; set; }
/// <summary>
/// 列宽
/// </summary>
public DataGridLength Width { get; set; }
/// <summary>
/// 列宽ByGrid
/// </summary>
public GridLength CloumnWidth { get; set; }
/// <summary>
/// DataGrid绑定数据源描述
/// </summary>
/// <param name="headerName">列名</param>
/// <param name="showAs">显示为</param>
/// <param name="width">宽度</param>
/// <param name="displayIndex">显示顺序</param>
/// <param name="resourceKey">自定义列Key</param>
public BindDescriptionAttribute(string headerName, ShowScheme showAs = ShowScheme., string width = "Auto", int displayIndex = 0, string resourceKey = "")
{
this.HeaderName= headerName;
DisplayIndex = displayIndex;
ResourceKey = resourceKey;
ShowAs = showAs;
var convert = new DataGridLengthConverter();
Width = (DataGridLength)convert.ConvertFrom(width);
var gridCOnvert = new GridLengthConverter();
CloumnWidth = (GridLength)gridCOnvert.ConvertFrom(width);
if (showAs == ShowScheme. && string.IsNullOrWhiteSpace(resourceKey))
throw new ArgumentException($"自定义列时需要指定{nameof(resourceKey)}参数!");
}
}
/// <summary>
/// 展示方式
/// </summary>
public enum ShowScheme
{
= 1,
= 4
}
}