浏览代码

版本更新

Shun 2 年之前
父节点
当前提交
63bc5ac8cf

+ 1 - 1
src/YSAI.DAQ/YSAI.Core/YSAI.Core.csproj

@@ -5,7 +5,7 @@
     <ImplicitUsings>enable</ImplicitUsings>
     <Nullable>enable</Nullable>
     <GeneratePackageOnBuild>True</GeneratePackageOnBuild>
-    <Version>1.0.0.73</Version>
+    <Version>1.0.0.74</Version>
     <Authors>Shun</Authors>
     <Company>YSAI</Company>
     <Product>SCADA</Product>

+ 44 - 0
src/YSAI.DAQ/YSAI.Core/attribute/DisplayAttribute.cs

@@ -0,0 +1,44 @@
+using YSAI.Core.data;
+using static YSAI.Core.data.ParamStructure.subset.propertie;
+
+namespace YSAI.Core.attribute
+{
+    /// <summary>
+    /// WEB端展示特性
+    /// </summary>
+    [AttributeUsage(AttributeTargets.All)]
+    public class DisplayAttribute : Attribute
+    {
+        /// <summary>
+        /// WEB端展示
+        /// </summary>
+        /// <param name="Use">是否使用</param>
+        /// <param name="Show">是否显示</param>
+        /// <param name="DataCate">数据类型</param>
+        public DisplayAttribute(bool Use, bool Show, ParamStructure.subset.propertie.dataCate DataCate)
+        {
+            this.Use = Use;
+            this.Show = Show;
+            this.DataCate = DataCate;
+        }
+
+        /// <summary>
+        /// 是否显示,
+        /// true:展示
+        /// false:隐藏
+        /// </summary>
+        public bool Show { get; set; }
+
+        /// <summary>
+        /// 是否使用,
+        /// false:不让输入
+        /// true:正常输入
+        /// </summary>
+        public bool Use { get; set; }
+
+        /// <summary>
+        /// 数据类型
+        /// </summary>
+        public dataCate DataCate { get; set; }
+    }
+}

+ 1 - 1
src/YSAI.DAQ/YSAI.Core/attribute/UnitAttribute.cs

@@ -9,7 +9,7 @@ namespace YSAI.Core.attribute
     /// <summary>
     /// 单位特性
     /// </summary>
-    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property)]
+    [AttributeUsage(AttributeTargets.All)]
     public class UnitAttribute : Attribute
     {
         /// <summary>

+ 1 - 1
src/YSAI.DAQ/YSAI.Core/attribute/VerifyAttribute.cs

@@ -9,7 +9,7 @@ namespace YSAI.Core.attribute
     /// <summary>
     /// 验证特性
     /// </summary>
-    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property)]
+    [AttributeUsage(AttributeTargets.All)]
     public class VerifyAttribute : Attribute
     {
         /// <summary>

+ 23 - 12
src/YSAI.DAQ/YSAI.Core/data/LibParamStructure.cs

@@ -1,17 +1,24 @@
 using Newtonsoft.Json;
 using Newtonsoft.Json.Converters;
+using YSAI.Unility;
 
 namespace YSAI.Core.data
 {
     /// <summary>
     /// 库文件参数结构
     /// </summary>
-    public class LibParamStructure
+    public class ParamStructure
     {
         /// <summary>
         /// 代码
         /// </summary>
-        public string Code { get; set; }
+        public string Code
+        {
+            get
+            {
+                return Name;
+            }
+        }
 
         /// <summary>
         /// 名称
@@ -88,7 +95,12 @@ namespace YSAI.Core.data
                 /// <summary>
                 /// 默认值
                 /// </summary>
-                public string Default { get; set; }
+                public object? Default { get; set; }
+
+                /// <summary>
+                /// 初始值
+                /// </summary>
+                public object? Initial { get; set; }
 
                 /// <summary>
                 /// 描述
@@ -101,19 +113,18 @@ namespace YSAI.Core.data
                 public string PropertyName { get; set; }
 
                 /// <summary>
-                /// 初始值
-                /// </summary>
-                public object? Value { get; set; }
-
-                /// <summary>
-                /// 是否显示
+                /// 是否显示,
+                /// true:展示
+                /// false:隐藏
                 /// </summary>
-                public bool IsShow { get; set; }
+                public bool Show { get; set; } = true;
 
                 /// <summary>
-                /// 是否使用
+                /// 是否使用,
+                /// false:不让输入
+                /// true:正常输入
                 /// </summary>
-                public bool IsMust { get; set; }
+                public bool Use { get; set; } = true;
 
                 /// <summary>
                 /// 正则表达式