|
|
@@ -260,12 +260,23 @@ namespace DataVAPI.UpAndDown |
|
|
|
}); |
|
|
|
int index = 0; |
|
|
|
|
|
|
|
if (receiveModel.status.value == "离线") { index = devModel.operatingDeviceStatus.data.Count - 1; } |
|
|
|
else index = devModel.operatingDeviceStatus.data.FindIndex(0, ar => ar.DeviceZT.Contains("离线")); |
|
|
|
if (index > devModel.operatingDeviceStatus.data.Count - 1) index = devModel.operatingDeviceStatus.data.Count - 1; |
|
|
|
if (receiveModel.status.value == "离线") |
|
|
|
{ |
|
|
|
//离线移除并添加到最后一位 |
|
|
|
devModel.operatingDeviceStatus.data.Remove(dev); |
|
|
|
devModel.operatingDeviceStatus.data.Add(dev); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
//在线 往上一点 |
|
|
|
index = devModel.operatingDeviceStatus.data.FindIndex(0, ar => ar.DeviceZT.Contains("离线")); |
|
|
|
if (index > devModel.operatingDeviceStatus.data.Count - 1) index = devModel.operatingDeviceStatus.data.Count - 1; |
|
|
|
int now = devModel.operatingDeviceStatus.data.IndexOf(dev); |
|
|
|
Swap(devModel.operatingDeviceStatus.data, index, now); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
int now = devModel.operatingDeviceStatus.data.IndexOf(dev); |
|
|
|
Swap(devModel.operatingDeviceStatus.data, index, now); |
|
|
|
|
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|