diff --git a/projects/IoTCenter/Controllers/AppController.cs b/projects/IoTCenter/Controllers/AppController.cs index a13d8a70..3d0ad41f 100644 --- a/projects/IoTCenter/Controllers/AppController.cs +++ b/projects/IoTCenter/Controllers/AppController.cs @@ -224,13 +224,25 @@ namespace IoTCenter.Controllers public IActionResult AllSwitchOn(string connectionId, string[] nodes) { - this.Power(connectionId, nodes, "On", o => o.Name.Contains("开关")); + this.Power(connectionId, nodes, "On", o => o.Name.Contains("一路开关")); return Json(ApiResponse.AsyncSuccess()); } public IActionResult AllSwitchOff(string connectionId, string[] nodes) { - this.Power(connectionId, nodes, "Off", o => o.Name.Contains("开关")); + this.Power(connectionId, nodes, "Off", o => o.Name.Contains("一路开关")); + return Json(ApiResponse.AsyncSuccess()); + } + + public IActionResult AllSwitch3On(string connectionId, string[] nodes) + { + this.Power(connectionId, nodes, "On", o => o.Name.Contains("三路开关")); + return Json(ApiResponse.AsyncSuccess()); + } + + public IActionResult AllSwitch3Off(string connectionId, string[] nodes) + { + this.Power(connectionId, nodes, "Off", o => o.Name.Contains("三路开关")); return Json(ApiResponse.AsyncSuccess()); } diff --git a/projects/IoTCenter/wwwroot/home.default.html b/projects/IoTCenter/wwwroot/home.default.html index a0564b40..5faf4ed1 100644 --- a/projects/IoTCenter/wwwroot/home.default.html +++ b/projects/IoTCenter/wwwroot/home.default.html @@ -31,31 +31,41 @@
-
+ +
+ + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
@@ -212,6 +222,10 @@ ajax('/App/AllSwitchOn', { nodes: data }, 'post'); } else if ($(this).hasClass('AllSwitchOff')) { ajax('/App/AllSwitchOff', { nodes: data }, 'post'); + } else if ($(this).hasClass('AllSwitch3On')) { + ajax('/App/AllSwitch3On', { nodes: data }, 'post'); + } else if ($(this).hasClass('AllSwitch3Off')) { + ajax('/App/AllSwitch3Off', { nodes: data }, 'post'); } else if ($(this).hasClass('AllSocketOn')) { ajax('/App/AllSocketOn', { nodes: data }, 'post'); } else if ($(this).hasClass('AllSocketOff')) { diff --git a/projects/IoTCenter/wwwroot/node.default.html b/projects/IoTCenter/wwwroot/node.default.html index b6f03347..dc4eb505 100644 --- a/projects/IoTCenter/wwwroot/node.default.html +++ b/projects/IoTCenter/wwwroot/node.default.html @@ -1,593 +1,596 @@ - -
-
-
- -
- -
-
-
-
-
-
-
-
- -
-
-

{{GetData('温度','Description')}}

-
-
- 温度:{{GetData('温度','Value') }} {{GetData('温度','Unit')}} -
-
-
-
-
-
-
-
- -
-
-

{{GetData('湿度','Description')}}

-
-
- 湿度:{{GetData('湿度','Value') }} {{GetData('湿度','Unit')}} -
-
-
-
-
-
-
-
-
-
- -
-
-

{{GetDataByTag('前门','光照度','Description')}}

-
-
- 前门光照:{{GetDataByTag('前门','光照度','Value') }} {{GetDataByTag('前门','光照度','Unit')}} -
-
-
-
-
-
-
-
- -
-
-

{{GetDataByTag('后门','光照度','Description')}}

-
-
- 后门光照:{{GetDataByTag('后门','光照度','Value') }} {{GetDataByTag('后门','光照度','Unit')}} -
-
-
-
-
-
-
-
-
-
- -
-
- -
-
- 前门人体:{{GetDataByTag('前门','状态','Value') }} -
-
-
-
-
-
-
-
- -
-
- -
-
- 后门人体:{{GetDataByTag('后门','状态','Value') }} -
-
-
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
-
-
用电:
-
-
-
-
-
-
- -
-
-
-
-
-
一路开关:
-
-
-
-
-
-
-
- - -
-
- {{device.Name||device.DisplayName}} -
-
-
-
- -
-
-
三路开关:
-
-
-
-
-
-
-
- - - - - - -
-
- {{device.Name||device.DisplayName}} -
-
-
-
-
-
-
插座:
-
-
-
-
-
-
-
- - -
-
- {{device.Name||device.DisplayName}} -
-
-
-
-
-
- - - - - - + + + + + \ No newline at end of file