|
@@ -576,83 +576,84 @@ export default {
|
|
|
} else if (item.deviceType == 5) {
|
|
|
// 大气传感器
|
|
|
markersMap.icon = "sj-icon-map-centerdata_atmospheric_sensor";
|
|
|
- markersMap.bindPopupHtml +=
|
|
|
- '<div class="map-tip">' +
|
|
|
- "<span>" +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- " <h4>二氧化硫:" +
|
|
|
- (item.data.sulfurDioxide
|
|
|
- ? item.data.sulfurDioxide + "ug/m³"
|
|
|
- : "0ug/m³") +' | '+
|
|
|
- (item.threshold ? item.threshold.sulfurDioxideThreshold+ "ug/m³": "0ug/m³") +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span>" +
|
|
|
- "<span>" +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- " <h4>一氧化碳:" +
|
|
|
- (item.data.carbonMonoxide
|
|
|
- ? item.data.carbonMonoxide + "ug/m³"
|
|
|
- : "0ug/m³") +' | '+
|
|
|
- (item.threshold ? item.threshold.carbonMonoxideThreshold+ "ug/m³": "0ug/m³") +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span>" +
|
|
|
- "<span>" +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- " <h4>温度:" +
|
|
|
- (item.data.temperature ? item.data.temperature + "°C" : "0°C") +' | '+
|
|
|
- (item.threshold ? item.threshold.temperatureThresholdUp+ "ug/m³": "0ug/m³") +'-'+
|
|
|
- (item.threshold ? item.threshold.temperatureThresholdDown+ "ug/m³": "0ug/m³") +
|
|
|
- "</h4>" +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span>" +
|
|
|
- "<span>" +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- " <h4>二氧化氮:" +
|
|
|
- (item.data.nitrogenDioxide
|
|
|
- ? item.data.nitrogenDioxide + "ug/m³"
|
|
|
- : "0ug/m³")+' | '+
|
|
|
- (item.threshold ? item.threshold.nitrogenDioxideThreshold+ "ug/m³": "0ug/m³") +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span>" +
|
|
|
- "<span>" +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- " <h4>臭氧:" +
|
|
|
- (item.data.ozone
|
|
|
- ? item.data.ozone + "ug/m³"
|
|
|
- : "0ug/m³")+' | '+
|
|
|
- (item.threshold ? item.threshold.ozoneThreshold+ "ug/m³": "0ug/m³") +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span>" +
|
|
|
- "<span>" +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- " <h4>湿度:" +
|
|
|
- (item.data.humidity
|
|
|
- ? item.data.humidity + "ug/m³"
|
|
|
- : "0ug/m³") +' | '+
|
|
|
- (item.threshold ? item.threshold.humidityThresholdUp+ "ug/m³": "0ug/m³") +'-'
|
|
|
- +(item.threshold ? item.threshold.humidityThresholdDown+ "ug/m³": "0ug/m³") +
|
|
|
- "</h4>" +
|
|
|
- " </div>" +
|
|
|
- " </div>" +
|
|
|
- " </span>" +
|
|
|
- "</div>";
|
|
|
-
|
|
|
+ if(item.data != null){
|
|
|
+ markersMap.bindPopupHtml +=
|
|
|
+ '<div class="map-tip">' +
|
|
|
+ "<span>" +
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
+ " <h4>二氧化硫:" +
|
|
|
+ (item.data.sulfurDioxide
|
|
|
+ ? item.data.sulfurDioxide + "ug/m³"
|
|
|
+ : "0ug/m³") +' | '+
|
|
|
+ (item.threshold ? item.threshold.sulfurDioxideThreshold+ "ug/m³": "0ug/m³") +
|
|
|
+ "</h4>" +
|
|
|
+ " </div>" +
|
|
|
+ " </div>" +
|
|
|
+ " </span>" +
|
|
|
+ "<span>" +
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
+ " <h4>一氧化碳:" +
|
|
|
+ (item.data.carbonMonoxide
|
|
|
+ ? item.data.carbonMonoxide + "ug/m³"
|
|
|
+ : "0ug/m³") +' | '+
|
|
|
+ (item.threshold ? item.threshold.carbonMonoxideThreshold+ "ug/m³": "0ug/m³") +
|
|
|
+ "</h4>" +
|
|
|
+ " </div>" +
|
|
|
+ " </div>" +
|
|
|
+ " </span>" +
|
|
|
+ "<span>" +
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
+ " <h4>温度:" +
|
|
|
+ (item.data.temperature ? item.data.temperature + "°C" : "0°C") +' | '+
|
|
|
+ (item.threshold ? item.threshold.temperatureThresholdUp+ "ug/m³": "0ug/m³") +'-'+
|
|
|
+ (item.threshold ? item.threshold.temperatureThresholdDown+ "ug/m³": "0ug/m³") +
|
|
|
+ "</h4>" +
|
|
|
+ "</h4>" +
|
|
|
+ " </div>" +
|
|
|
+ " </div>" +
|
|
|
+ " </span>" +
|
|
|
+ "<span>" +
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
+ " <h4>二氧化氮:" +
|
|
|
+ (item.data.nitrogenDioxide
|
|
|
+ ? item.data.nitrogenDioxide + "ug/m³"
|
|
|
+ : "0ug/m³")+' | '+
|
|
|
+ (item.threshold ? item.threshold.nitrogenDioxideThreshold+ "ug/m³": "0ug/m³") +
|
|
|
+ "</h4>" +
|
|
|
+ " </div>" +
|
|
|
+ " </div>" +
|
|
|
+ " </span>" +
|
|
|
+ "<span>" +
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
+ " <h4>臭氧:" +
|
|
|
+ (item.data.ozone
|
|
|
+ ? item.data.ozone + "ug/m³"
|
|
|
+ : "0ug/m³")+' | '+
|
|
|
+ (item.threshold ? item.threshold.ozoneThreshold+ "ug/m³": "0ug/m³") +
|
|
|
+ "</h4>" +
|
|
|
+ " </div>" +
|
|
|
+ " </div>" +
|
|
|
+ " </span>" +
|
|
|
+ "<span>" +
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
+ " <h4>湿度:" +
|
|
|
+ (item.data.humidity
|
|
|
+ ? item.data.humidity + "ug/m³"
|
|
|
+ : "0ug/m³") +' | '+
|
|
|
+ (item.threshold ? item.threshold.humidityThresholdUp+ "ug/m³": "0ug/m³") +'-'
|
|
|
+ +(item.threshold ? item.threshold.humidityThresholdDown+ "ug/m³": "0ug/m³") +
|
|
|
+ "</h4>" +
|
|
|
+ " </div>" +
|
|
|
+ " </div>" +
|
|
|
+ " </span>" +
|
|
|
+ "</div>";
|
|
|
+ }
|
|
|
} else if (item.deviceType == 6) {
|
|
|
// 水压传感器
|
|
|
markersMap.icon = "sj-icon-map-centerdata_water_pressure_sensor";
|