diff --git a/projects/IoTCenter/Controllers/AppController.cs b/projects/IoTCenter/Controllers/AppController.cs index 3d0ad41f..ada94b00 100644 --- a/projects/IoTCenter/Controllers/AppController.cs +++ b/projects/IoTCenter/Controllers/AppController.cs @@ -272,13 +272,25 @@ namespace IoTCenter.Controllers public IActionResult NodeSwitchOn(string connectionId, string node) { - this.Power(connectionId, new string[] { node }, "On", o => o.Name.Contains("开关")); + this.Power(connectionId, new string[] { node }, "On", o => o.Name.Contains("一路开关")); return Json(ApiResponse.AsyncSuccess()); } public IActionResult NodeSwitchOff(string connectionId, string node) { - this.Power(connectionId, new string[] { node }, "Off", o => o.Name.Contains("开关")); + this.Power(connectionId, new string[] { node }, "Off", o => o.Name.Contains("一路开关")); + return Json(ApiResponse.AsyncSuccess()); + } + + public IActionResult NodeSwitch3On(string connectionId, string node) + { + this.Power(connectionId, new string[] { node }, "On", o => o.Name.Contains("三路开关")); + return Json(ApiResponse.AsyncSuccess()); + } + + public IActionResult NodeSwitch3Off(string connectionId, string node) + { + this.Power(connectionId, new string[] { node }, "Off", o => o.Name.Contains("三路开关")); return Json(ApiResponse.AsyncSuccess()); } diff --git a/projects/IoTCenter/Program.cs b/projects/IoTCenter/Program.cs index 2f9c0a4b..5673086d 100644 --- a/projects/IoTCenter/Program.cs +++ b/projects/IoTCenter/Program.cs @@ -28,7 +28,7 @@ namespace IoTCenter new EFConfigurationValue { Id = "influxdb:usr", Value= "admin"}, new EFConfigurationValue { Id = "influxdb:pwd", Value= "admin"}, // - new EFConfigurationValue { Id = "name", Value= "物联网平台"}, + new EFConfigurationValue { Id = "name", Value= "物联网管控平台"}, new EFConfigurationValue { Id = "logo", Value= "/images/logo.png",Type= InputType.ImageUrl}, new EFConfigurationValue { Id = "copyright", Value= "Copyright © {now} Company. All rights reserved",Type= InputType.Html} }); diff --git a/projects/IoTCenter/wwwroot/node.default.html b/projects/IoTCenter/wwwroot/node.default.html index 23feaed7..d8cbfc64 100644 --- a/projects/IoTCenter/wwwroot/node.default.html +++ b/projects/IoTCenter/wwwroot/node.default.html @@ -402,7 +402,12 @@ ajax('/App/NodeSwitchOn', { node: $(this).attr('data-node-number') }, 'post'); } else if ($(this).hasClass('NodeSwitchOff')) { ajax('/App/NodeSwitchOff', { node: $(this).attr('data-node-number') }, 'post'); - } else if ($(this).hasClass('NodeSocketOn')) { + } else if ($(this).hasClass('NodeSwitch3On')) { + ajax('/App/NodeSwitch3On', { node: $(this).attr('data-node-number') }, 'post'); + } else if ($(this).hasClass('NodeSwitch3Off')) { + ajax('/App/NodeSwitch3Off', { node: $(this).attr('data-node-number') }, 'post'); + } + else if ($(this).hasClass('NodeSocketOn')) { ajax('/App/NodeSocketOn', { node: $(this).attr('data-node-number') }, 'post'); } else if ($(this).hasClass('NodeSocketOff')) { ajax('/App/NodeSocketOff', { node: $(this).attr('data-node-number') }, 'post');