@model List @{ this.HtmlTitle = "设备列表"; var index = 0; }
@foreach (var item in Model) { }
IEEE地址 地址 名称 电压 电量 在线状态 设备状态 操作 删除
@(++index) @item.IEEE @item.Address @item.Name @item.Voltage @item.Battery @if (new int[] { 0x0002, 0x0009, 0x0081, 0x0202, 0x0051 }.Contains(item.DeviceId)) { if (item.SwitchState == 0) { } else if (item.SwitchState == 1) { } else if (item.SwitchState == 2) { } } else if (item.DeviceId == 0x0106) { @item.Light } else if (item.DeviceId == 0x0402) { @(item.IsWarning ? "报警" : "正常") } else if (item.DeviceId == 0x0309) { 温度:@item.Temperature 湿度:@item.Humidity PM 1.0:@item.PM10 PM 2.5:@item.PM25 PM 10:@item.PM100 } else if (item.DeviceId == 0x0220) { 亮度:@item.Brightness 色调:@item.Hue 饱和度:@item.Saturation 色温:@item.ColorTemperature } @if (new int[] { 0x0002, 0x0009, 0x0081, 0x0202, 0x0051 }.Contains(item.DeviceId)) { } @if (item.DeviceId == 0x0202) { } @if (item.DeviceId == 0x0163) { 查询 } @if (item.DeviceId == 0x0220) {
}
删除设备
@section scripts{ }