From 474783457240f62d4f926e628fea2abb1c4b8b0d Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期一, 11 十月 2021 14:53:37 +0800 Subject: [PATCH] spk更新异常,安防中心传感器状态无显示 --- HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddInputPage.cs | 27 +++++++++++++++++++++++++-- 1 files changed, 25 insertions(+), 2 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddInputPage.cs b/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddInputPage.cs index ded7468..969d913 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddInputPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddInputPage.cs @@ -163,12 +163,35 @@ input = new SecurityInput(); input.sid = function.sid; + var inKey = "status"; + var inValue = "true"; + switch(function.spk) + { + case SPK.SensorWater: + inKey = ""; + break; + case SPK.SensorPir: + inKey = "people_status"; + break; + case SPK.SensorSmoke: + inKey = "alarm_status"; + inValue = "alarm"; + break; + case SPK.SensorGas: + inKey = "alarm_status"; + inValue = "alarm"; + break; + case SPK.SensorDoorWindow: + inKey = "contact_status"; + inValue = "open"; + break; + } input.condition = new List<SecurityInputCondition>() { new SecurityInputCondition() { - key = "status", - value = "true", + key = inKey, + value = inValue, } }; -- Gitblit v1.8.0