Former-commit-id: 5092feef0f84d28b9117c2dd56fe12bb66d2d7eb
Former-commit-id: 6d4fc4d9fbd14661966470118737f9a6acc3890e
1.0
wanggang 4 years ago
parent 8840dd3452
commit 711936bc62

@ -14,6 +14,7 @@
<link rel="shortcut icon" href="~/favicon.ico" />
<link rel="stylesheet" href="~/lib/fontawesome-free/css/all.min.css" />
<link rel="stylesheet" href="~/lib/ionicons/css/ionicons.min.css" />
<link rel="stylesheet" href="~/lib/weui/style/weui.min.css" />
<link rel="stylesheet" href="~/lib/bootstrap/css/bootstrap.min.css" />
<link rel="stylesheet" href="~/lib/admin-lte/css/adminlte.min.css" />
<link rel="stylesheet" href="~/lib/fancybox/jquery.fancybox.min.css" />
@ -110,7 +111,6 @@
<div class="weui-mask_transparent"></div>
<div class="weui-toast">
<i class="weui-loading weui-icon_toast"></i>
<p class="weui-toast__content">加载中</p>
</div>
</div>
</div>

@ -73,7 +73,10 @@ namespace IoT.Shared.Areas.IoTCenter.Controlls
public override void ToEditModel(IoTData entity, EditIoTDataModel model)
{
model.IoTGatewayId = entity?.IoTDevice?.IoTGatewayId;
if(entity!=null)
{
model.IoTGatewayId = entity?.IoTDevice?.IoTGatewayId;
}
ViewData.SelectList(o => model.IoTProductId, () => this._ajax.GetIoTProduct(model.IoTProductId).SelectList());
ViewData.SelectList(o => model.IoTGatewayId, () => this._ajax.GetIoTGateway(model.IoTGatewayId).SelectList());
if (model.IoTGatewayId.HasValue)

@ -23,7 +23,7 @@ namespace IoT.Shared.Areas.IoTCenter.Controlls
public override IQueryable<IoTProduct> Query(PagedListModel<EditIoTProductModel> model, IQueryable<IoTProduct> query)
{
return base.Query(model, query)
return query
.WhereIf(!string.IsNullOrEmpty(model.Query.Name), o => o.Name.Contains(model.Query.Name))
.WhereIf(!string.IsNullOrEmpty(model.Query.Number), o => o.Number.Contains(model.Query.Number))
.WhereIf(!string.IsNullOrEmpty(model.Query.Path), o => o.Path.Contains(model.Query.Path))

@ -575,8 +575,17 @@ namespace IoTNode.DeviceServices.FBee
tempBytes.AddRange(props[0x00]);
tempBytes.Add(0x00);
tempBytes.Add(0x00);
var electricity = BitConverter.ToInt64(tempBytes.ToArray()) / 1000f;
this.UpdateIoTData(device.Id, DataKeys.Electricity, electricity);
if (tempBytes.Count == 8)
{
var multiplier = this.GetIoTDataValue(device.Id, DataKeys.ElectricityMultiplier);
var divisor = this.GetIoTDataValue(device.Id, DataKeys.ElectricityDivisor);
if (!string.IsNullOrEmpty(multiplier) && !string.IsNullOrEmpty(divisor))
{
var electricity = BitConverter.ToInt64(tempBytes.ToArray());
var value = electricity * Convert.ToInt16(multiplier) / Convert.ToSingle(divisor);
this.UpdateIoTData(device.Id, DataKeys.Electricity, value);
}
}
}
}
else if (clusterId == ClusterId.doorlock)

@ -1,5 +1,4 @@
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="nav-icon false">
<li class="nav-item"><a class="@GetLinkClass("Home","Index","")" href="@Url.Action("Index","Home")"><i class="far fa-circle nav-icon"></i><p>首页</p></a></li>
<li class="nav-item"><a class="@GetLinkClass("Setting","Index","Admin")" href="@Url.Action("Index","Setting",new { area="Admin"})"><i class="far fa-circle nav-icon"></i><p>系统设置</p></a></li>
<li class="nav-item"><a class="@GetLinkClass("IoTProduct","Index","IoTCenter")" href="@Url.Action("Index","IoTProduct",new { area="IoTCenter"})"><i class="far fa-circle nav-icon"></i><span>产品管理</span></a></li>
<li class="nav-item"><a class="@GetLinkClass("IoTGateway","Index","IoTCenter")" href="@Url.Action("Index","IoTGateway",new { area="IoTCenter"})"><i class="far fa-circle nav-icon"></i><span>网关管理</span></a></li>

@ -151,7 +151,6 @@
<div class="weui-mask_transparent"></div>
<div class="weui-toast">
<i class="weui-loading weui-icon_toast"></i>
<p class="weui-toast__content">加载中</p>
</div>
</div>
</div>

@ -115,6 +115,7 @@ const app = new Vue({
store: store,
mounted: function () {
//router.push('/components/views/home/index.html')
connect();
console.log('app start');
}
});
Loading…
Cancel
Save