|
@@ -152,20 +152,23 @@ const getDeviceList = () => {
|
|
|
deviceRealTimeData.value[deviceId] = {};
|
|
|
}
|
|
|
|
|
|
- deviceParamMapList.forEach((paramItem) => {
|
|
|
- Object.assign(deviceRealTimeData.value[item.deviceId], paramItem);
|
|
|
- });
|
|
|
-
|
|
|
- if (isDeviceChillerUnit) {
|
|
|
- Object.assign(deviceRealTimeData.value[item.deviceId], chillerUnitExtraParams);
|
|
|
- }
|
|
|
-
|
|
|
const times = deviceParamMapList
|
|
|
.filter((item) => item.time)
|
|
|
.map((item) => item.time)
|
|
|
.sort(timeSorter);
|
|
|
+ const mostRecentTime = times[times.length - 1];
|
|
|
+
|
|
|
+ if (mostRecentTime) {
|
|
|
+ deviceParamMapList.forEach((paramItem) => {
|
|
|
+ if (paramItem.time === mostRecentTime) {
|
|
|
+ Object.assign(deviceRealTimeData.value[item.deviceId], paramItem);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
- deviceRealTimeData.value[item.deviceId].time = times[times.length - 1];
|
|
|
+ if (isDeviceChillerUnit) {
|
|
|
+ Object.assign(deviceRealTimeData.value[item.deviceId], chillerUnitExtraParams);
|
|
|
+ }
|
|
|
});
|
|
|
|
|
|
deviceList.value.push(...records);
|