Former-commit-id: 3f29fed68296d734d057cef9411229e66fda52c6
TangShanKaiPing
wanggang 6 years ago
parent 64e1dbee49
commit cd4cb0324a

@ -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());
}

@ -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}
});

@ -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');

Loading…
Cancel
Save