From 4ad6d53e2a8dc59d99405a053ddc46f49ae7a1b3 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期四, 14 十月 2021 11:55:51 +0800
Subject: [PATCH] 干接点新spk 兼容问题
---
HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs | 21 ++++++++++++++++++---
1 files changed, 18 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..996a4e5 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,11 @@
}
var sensorType = sr.spk.Split(".")[1];
- var queryType = sr.GetAttrState("spk")==null? "value": sr.GetAttrState("spk");
+ var queryType = sr.GetAttrState("spk").ToString();
+ if(queryType == "0")
+ {
+ queryType = "value";
+ }
var revertObj = new HttpServerRequest().GetSensorHistory(curQueryType, sr.deviceId, queryType);
if (revertObj != null)
--
Gitblit v1.8.0