From cd1029a11d96f55337430cec97b7d4cd510f5d5f Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期四, 17 十二月 2020 15:09:38 +0800 Subject: [PATCH] 2020-12-17 1.成员管理UI还原度修改。2.增加右键删除。3.增加无区域功能管理。 --- HDL_ON/Entity/Function/Function.cs | 58 ++++++++++++++++++---------------------------------------- 1 files changed, 18 insertions(+), 40 deletions(-) diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs index 0fb021f..e33e5c6 100644 --- a/HDL_ON/Entity/Function/Function.cs +++ b/HDL_ON/Entity/Function/Function.cs @@ -119,7 +119,7 @@ /// bus鍗忚鏁版嵁鏍煎紡 /// 浣跨敤A鍗忚鎺у埗鏃讹紝鏀瑰睘鎬т负绌� /// </summary> - public BusData bus_Data; + public BusData bus; /// <summary> /// 鏄惁鏀惰棌 /// </summary> @@ -148,37 +148,6 @@ /// 寤舵椂 /// </summary> public int delay = 0; - /// <summary> - /// 寤舵椂鏄剧ず鐨勬枃鏈� - /// </summary> - [Newtonsoft.Json.JsonIgnore] - public string delayText - { - get - { - string text = ""; - switch (delay) - { - case 0: - text = Language.StringByID(StringId.NoDelay); - break; - case 30: - text = "30s"; - break; - case 60: - text = "1min"; - break; - case 120: - text = "2min"; - break; - case 300: - text = "5min"; - break; - } - return text; - } - } - /// <summary> /// 鏈�鍚庢帶鍒剁殑涓�娆$姸鎬� /// </summary> @@ -222,7 +191,8 @@ /// <summary> /// 浣跨敤棰戠巼 /// </summary> - public double usageFrequency { + public double usageFrequency + { get { return usageCount / 7; @@ -236,9 +206,9 @@ public string GetBusId() { string busId = ""; - if (bus_Data != null) + if (bus != null) { - busId = bus_Data.SubnetID + "_" + bus_Data.DeviceID + "_" + bus_Data.loopId; + busId = bus.SubnetID + "_" + bus.DeviceID + "_" + bus.loopId; } return busId; } @@ -305,7 +275,7 @@ Common.FileUtlis.Files.WriteFileByBytes(savePath, ssd); } } - + /// <summary> /// 杞崲鎴愬満鏅姛鑳藉璞� @@ -316,7 +286,15 @@ var sFunc = new SceneFunction(); foreach (var attr in attributes) { - sFunc.status.Add(new SceneFunctionStatus() { key = attr.key, value = attr.curValue.ToString() }); + if (attr.key == FunctionAttributeKey.SetTemp) + { + var vv = Convert.ToDouble(attr.value); + sFunc.status.Add(new SceneFunctionStatus() { key = attr.key, value = Convert.ToInt32(vv).ToString() }); + } + else + { + sFunc.status.Add(new SceneFunctionStatus() { key = attr.key, value = attr.curValue.ToString() }); + } sFunc.sid = this.sid; } return sFunc; @@ -455,11 +433,11 @@ /// <summary> /// 鏈�澶у�� /// </summary> - public int max=100; + public int max = 100; /// <summary> /// 鏈�灏忓�� /// </summary> - public int min=0; + public int min = 0; /// <summary> /// 鏁版嵁绫诲瀷 /// </summary> @@ -658,4 +636,4 @@ public const string ElectricFan = "electric.fan"; } -} +} \ No newline at end of file -- Gitblit v1.8.0