From 2614964c9c3e0c8740e208d4d0606fa8a518b9c4 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期三, 01 九月 2021 15:16:39 +0800
Subject: [PATCH] Merge branch 'newBranch1' of http://172.16.1.23:6688/r/~wxr/HDL_APP_Project into wxr7

---
 HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs
index 5adc74f..adc01f9 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs
@@ -26,6 +26,7 @@
 
         Function function;
         List<Function> showFunctions;
+        List<Function> sensorList;
         /// <summary>
         /// 褰撳墠鏌ヨ绫诲瀷
         /// </summary>
@@ -45,6 +46,17 @@
         {
             bodyView = this;
             function = ss;
+            showFunctions = new List<Function>();
+            showFunctions.Add(ss);
+            sensorList = FunctionList.List.GetEnvirSensorsList();
+        }
+
+
+        public EnvironmentalSensorPage(Function ss,List<Function> functions)
+        {
+            bodyView = this;
+            function = ss;
+            sensorList = functions;
             showFunctions = new List<Function>();
             showFunctions.Add(ss);
         }
@@ -644,9 +656,8 @@
 
             bool initTitleButton = true;
 
-            var tempList = FunctionList.List.GetEnvirSensorsList();
 
-            foreach (var tempSensor in tempList)
+            foreach (var tempSensor in sensorList)
             {
                 if (tempSensor.sid == function.sid)
                 {
@@ -850,7 +861,7 @@
                         }
 
                         var sensorType = sr.spk.Split(".")[1];
-                        var queryType = sr.GetAttrState("spk")==null? "value": sr.GetAttrState("spk");
+                        var queryType = sr.GetAttrState("spk").ToString();
 
                         var revertObj = new HttpServerRequest().GetSensorHistory(curQueryType, sr.deviceId, queryType);
                         if (revertObj != null)

--
Gitblit v1.8.0