Explorar o código

气泡改字段

qinhouyu hai 1 ano
pai
achega
aa7a62ba55
Modificáronse 1 ficheiros con 470 adicións e 304 borrados
  1. 470 304
      src/views/monitor.vue

+ 470 - 304
src/views/monitor.vue

@@ -608,7 +608,7 @@
                 "<span>" +
                 '                  <div class="d-l-con">' +
                 '                  <div class="d-l-l-text">' +
-                "                  <h4>类型:" +
+                "                  <h4>厂家:" +
                 (item.brand ? item.brand : "") +
                 "</h4>" +
                 "                </div>" +
@@ -618,7 +618,9 @@
                 '                  <div class="d-l-con">' +
                 '                  <div class="d-l-l-text">' +
                 "                  <h4>经纬度:" +
-                item.longitude + "," + item.latitude +
+                item.longitude +
+                "," +
+                item.latitude +
                 "</h4>" +
                 "                </div>" +
                 "                </div>" +
@@ -632,330 +634,494 @@
               isAggregation: false,
             };
             if (item.deviceType == 1) {
-              if (item.workingStatus==0)
-              {
+              // 水质传感器
+              if (item.workingStatus == 0) {
                 markersMap.icon = "sj-icon-map-centerdata_water_quality_sensor";
-              }else{
-                // 水质传感器
+              } else if (item.workingStatus == 1) {
                 markersMap.icon = "sj-icon-map-not-centerdata_water_quality_sensor";
               }
-              markersMap.bindPopupHtml +=
-                '<div class="map-tip">' +
-                "<span>" +
-                '                  <div class="d-l-con">' +
-                '                  <div class="d-l-l-text">' +
-                "                  <h4>水中PH:" +
-                (item.data.waterPh ? item.data.waterPh + "pH" : "0pH") + "  |  " + (item.threshold.waterPhThresholdUp ? item.threshold.waterPhThresholdUp + "pH" : "null")  +
-                "</h4>" +
-                "                </div>" +
-                "                </div>" +
-                "                </span>" +
-                "<span>" +
-                '                  <div class="d-l-con">' +
-                '                  <div class="d-l-l-text">' +
-                "                  <h4>化学需氧量:" +
-                (item.data.cod ? item.data.cod + "mg/L" : "0mg/L") + "  |  " + (item.threshold.codThreshold ? item.threshold.codThreshold + "mg/L" : "null")  +
-                "</h4>" +
-                "                </div>" +
-                "                </div>" +
-                "                </span>" +
-                "<span>" +
-                '                  <div class="d-l-con">' +
-                '                  <div class="d-l-l-text">' +
-                "                  <h4>氨氮:" +
-                (item.data.ammoniaNitrogen
-                  ? item.data.ammoniaNitrogen + "mg/L"
-                  : "0mg/L") + "  |  " + (item.threshold.ammoniaNitrogenThreshold ? item.threshold.ammoniaNitrogenThreshold + "mg/L" : "null")  +
-                "</h4>" +
-                "                </div>" +
-                "                </div>" +
-                "                </span>" +
-                "<span>" +
-                '                  <div class="d-l-con">' +
-                '                  <div class="d-l-l-text">' +
-                "                  <h4>水温:" +
-                (item.data.waterTemperature
-                  ? item.data.waterTemperature + "°C"
-                  : "0°C") + "  |  " + (item.threshold.waterTemperatureThresholdUp ? item.threshold.waterTemperatureThresholdUp + "°C" : "null")  +
-                "</h4>" +
-                "                </div>" +
-                "                </div>" +
-                "                </span>" +
-                "</div>";
-            }
-            else if (item.deviceType == 8) {
-              if (item.workingStatus==0)
-              {
+              if (item.data != null) {
+                markersMap.bindPopupHtml +=
+                  '<div class="map-tip">' +
+                  "<span>" +
+                  '                  <div class="d-l-con">' +
+                  '                  <div class="d-l-l-text">' +
+                  "                  <h4>类型:水质传感器" +
+                  "</h4>" +
+                  "                </div>" +
+                  "                </div>" +
+                  "                </span>" +
+                  "<span>" +
+                  '                  <div class="d-l-con">' +
+                  '                  <div class="d-l-l-text">' +
+                  "                  <h4>水质悬浮物:" +
+                  (item.data.waterQualitySuspension ? item.data.waterQualitySuspension + "mg/L" : "0mg/L") +
+                  "</h4>" +
+                  "                </div>" +
+                  "                </div>" +
+                  "                </span>" +
+                  "<span>" +
+                  '                  <div class="d-l-con">' +
+                  '                  <div class="d-l-l-text">' +
+                  "                  <h4>化学需氧量:" +
+                  (item.data.cod ? item.data.cod + "mg/L" : "0mg/L") +
+                  "</h4>" +
+                  "                </div>" +
+                  "                </div>" +
+                  "                </span>" +
+                  "<span>" +
+                  '                  <div class="d-l-con">' +
+                  '                  <div class="d-l-l-text">' +
+                  "                  <h4>氨氮:" +
+                  (item.data.ammoniaNitrogen ?
+                    item.data.ammoniaNitrogen + "mg/L" :
+                    "0mg/L") +
+                  "</h4>" +
+                  "                </div>" +
+                  "                </div>" +
+                  "                </span>" +
+                  "<span>" +
+                  '                  <div class="d-l-con">' +
+                  '                  <div class="d-l-l-text">' +
+                  "                  <h4>水中PH:" +
+                  (item.data.waterPh ? item.data.waterPh + "pH | " + (item.threshold ? item.threshold
+                      .waterPhThresholdUp + "pH - " + item.threshold.waterPhThresholdDown + "pH" : "0pH - 0pH"
+                  ) : "0pH | 0pH - 0pH") +
+                  "</h4>" +
+                  "                </div>" +
+                  "                </div>" +
+                  "                </span>" +
+                  "<span>" +
+                  '                  <div class="d-l-con">' +
+                  '                  <div class="d-l-l-text">' +
+                  "                  <h4>生化需氧量:" +
+                  (item.data.bod ? item.data.bod + "mg/L " : "0mg/L") +
+                  "</h4>" +
+                  "                </div>" +
+                  "                </div>" +
+                  "                </span>" +
+
+                  "<span>" +
+                  '                  <div class="d-l-con">' +
+                  '                  <div class="d-l-l-text">' +
+                  "                  <h4>水温:" +
+                  (item.data.waterTemperature ? item.data.waterTemperature + "°C | " + (item.threshold ? item
+                    .threshold.waterTemperatureThresholdUp + "°C - " + item.threshold
+                    .waterTemperatureThresholdDown + "°C" : "0°C - 0°C") : "0°C | 0°C - 0°C") +
+                  "</h4>" +
+                  "                </div>" +
+                  "                </div>" +
+                  "                </span>" +
+                  "</div>";
+              }
+            } else if (item.deviceType == 8) {
+              // 水尺
+              if (item.workingStatus == 0) {
                 markersMap.icon = "sj-icon-map-centerdata_water_gauge";
-              }else{
-                // 水尺
+              } else if (item.workingStatus == 1) {
                 markersMap.icon = "sj-icon-map-not-centerdata_water_gauge";
               }
-              '<div class="map-tip">' +
-              "<span>" +
-              '                  <div class="d-l-con">' +
-              '                  <div class="d-l-l-text">' +
-              "                  <h4>地址:" +
-              (item.address ? item.address : "") +
-              "</h4>" +
-              "                </div>" +
-              "                </div>" +
-              "                </span>" +
-              "</div>";
-            }
-            else if (item.deviceType == "003") {
-              if (item.workingStatus==0)
-              {
-                markersMap.icon = "sj-icon-map-centerdata_hydrological_monitoring_equipment";
-              }else{
-                markersMap.icon =
-                  "sj-icon-map-not-centerdata_hydrological_monitoring_equipment";
+            } else if (item.deviceType == 3) {
+              // 水文监测设备
+              markersMap.icon = "sj-icon-map-centerdata_hydrological_monitoring_equipment";
+            } else if (item.deviceType == 2) {
+              // 土壤监测设备
+              if (item.workingStatus == 0) {
+                markersMap.icon = "sj-icon-map-centerdata_soil_monitoring_equipment";
+              } else if (item.workingStatus == 1) {
+                markersMap.icon = "sj-icon-map-not-centerdata_soil_monitoring_equipment";
               }
+              if (item.data != null) {
+                markersMap.bindPopupHtml +=
+                  '<div class="map-tip">' +
+                  "<span>" +
+                  '                  <div class="d-l-con">' +
+                  '                  <div class="d-l-l-text">' +
+                  "                  <h4>类型:土壤监测设备" +
+                  "</h4>" +
+                  "                </div>" +
+                  "                </div>" +
+                  "                </span>" +
+                  "<span>" +
+                  '                  <div class="d-l-con">' +
+                  '                  <div class="d-l-l-text">' +
+                  "                  <h4>温度:" +
+                  (item.data.temperature ? item.data.temperature + "°C | " + (item.threshold ? item.threshold
+                    .temperatureThresholdUp + "°C - " + item.threshold.temperatureThresholdDown + "°C" :
+                    "0°C - 0°C") : "0°C | 0°C - 0°C") +
+                  "</h4>" +
+                  "                </div>" +
+                  "                </div>" +
+                  "                </span>" +
+                  "<span>" +
+                  '                  <div class="d-l-con">' +
+                  '                  <div class="d-l-l-text">' +
+                  "                  <h4>湿度:" +
+                  (item.data.humidity ? item.data.humidity + "%RH | " + (item.threshold ? item.threshold
+                    .humidityThresholdDown + "%RH - " + item.threshold.humidityThresholdUp + "%RH" :
+                    "0%RH - 0%RH") : "0%RH | 0%RH - 0%RH") +
 
-            }
-            else if (item.deviceType == 2) {
-              if (item.workingStatus==0)
-              {
-                markersMap.icon = "sj-icon-map-centerdata_soil_monitoring_equipment";
-              }else{
-                markersMap.icon =
-                  "sj-icon-map-not-centerdata_soil_monitoring_equipment";
+                  "</h4>" +
+                  "                </div>" +
+                  "                </div>" +
+                  "                </span>" +
+                  "<span>" +
+                  '                  <div class="d-l-con">' +
+                  '                  <div class="d-l-l-text">' +
+                  "                  <h4>ph值:" +
+                  (item.data.ph ? item.data.ph + "pH | " + (item.threshold ? item.threshold.phThresholdUp +
+                    "pH - " + item.threshold.phThresholdDown + "pH" : "0pH - 0pH") : "0pH | 0pH - 0pH") +
+                  "</h4>" +
+                  "                </div>" +
+                  "                </div>" +
+                  "                </span>" +
+                  "<span>" +
+                  '                  <div class="d-l-con">' +
+                  '                  <div class="d-l-l-text">' +
+                  "                  <h4>导电率:" +
+                  (item.data.conductivity ? item.data.conductivity + "us/cm | " + (item.threshold ? item
+                    .threshold.conductivityThresholdUp + "us/cm - " + item.threshold
+                    .conductivityThresholdDown + "us/cm" : "0us/cm - 0us/cm") : "0us/cm | 0us/cm - 0us/cm") +
+                  "</h4>" +
+                  "                </div>" +
+                  "                </div>" +
+                  "                </span>" +
+                  "<span>" +
+                  '                  <div class="d-l-con">' +
+                  '                  <div class="d-l-l-text">' +
+                  "                  <h4>氮含量:" +
+                  (item.data.nitrogen ? item.data.nitrogen + "mg/kg | " + (item.threshold ? item.threshold
+                    .nitrogenThresholdUp + "mg/kg - " + item.threshold.nitrogenThresholdDown + "mg/kg" :
+                    "0mg/kg - 0mg/kg") : "0mg/kg | 0mg/kg - 0mg/kg") +
+
+                  "</h4>" +
+                  "                </div>" +
+                  "                </div>" +
+                  "                </span>" +
+                  "<span>" +
+                  '                  <div class="d-l-con">' +
+                  '                  <div class="d-l-l-text">' +
+                  "                  <h4>磷含量:" +
+                  (item.data.phosphorus ? item.data.phosphorus + "mg/kg | " + (item.threshold ? item.threshold
+                    .phosphorusThresholdUp + "mg/kg - " + item.threshold.phosphorusThresholdDown + "mg/kg" :
+                    "0mg/kg - 0mg/kg") : "0mg/kg | 0mg/kg - 0mg/kg") +
+
+                  "</h4>" +
+                  "                </div>" +
+                  "                </div>" +
+                  "                </span>" +
+                  "<span>" +
+                  '                  <div class="d-l-con">' +
+                  '                  <div class="d-l-l-text">' +
+                  "                  <h4>钾含量:" +
+                  (item.data.potassium ? item.data.potassium + "mg/kg | " + (item.threshold ? item.threshold
+                    .potassiumThresholdUp + "mg/kg - " + item.threshold.potassiumThresholdDown + "mg/kg" :
+                    "0mg/kg - 0mg/kg") : "0mg/kg | 0mg/kg - 0mg/kg") +
+                  "</h4>" +
+                  "                </div>" +
+                  "                </div>" +
+                  "                </span>" +
+                  "</div>";
               }
-              markersMap.bindPopupHtml +=
-                '<div class="map-tip">' +
-                "<span>" +
-                '                  <div class="d-l-con">' +
-                '                  <div class="d-l-l-text">' +
-                "                  <h4>钾含量:" +
-                (item.data.potassium ? item.data.potassium + "mg/kg" : "0mg/kg") +
-                "</h4>" +
-                "                </div>" +
-                "                </div>" +
-                "                </span>" +
-                "<span>" +
-                '                  <div class="d-l-con">' +
-                '                  <div class="d-l-l-text">' +
-                "                  <h4>导电率:" +
-                (item.data.conductivity
-                  ? item.data.conductivity + "us/cm"
-                  : "0us/cm") +
-                "</h4>" +
-                "                </div>" +
-                "                </div>" +
-                "                </span>" +
-                "<span>" +
-                '                  <div class="d-l-con">' +
-                '                  <div class="d-l-l-text">' +
-                "                  <h4>氮含量:" +
-                (item.data.nitrogen ? item.data.nitrogen + "mg/kg" : "0mg/kg") +
-                "</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") +
-                "</h4>" +
-                "                </div>" +
-                "                </div>" +
-                "                </span>" +
-                "<span>" +
-                '                  <div class="d-l-con">' +
-                '                  <div class="d-l-l-text">' +
-                "                  <h4>ph值:" +
-                (item.data.ph ? item.data.ph + "PH" : "0PH") +
-                "</h4>" +
-                "                </div>" +
-                "                </div>" +
-                "                </span>" +
-                "<span>" +
-                '                  <div class="d-l-con">' +
-                '                  <div class="d-l-l-text">' +
-                "                  <h4>湿度:" +
-                (item.data.humidity ? item.data.humidity + "%RH" : "0%RH") +
-                "</h4>" +
-                "                </div>" +
-                "                </div>" +
-                "                </span>" +
-                "<span>" +
-                '                  <div class="d-l-con">' +
-                '                  <div class="d-l-l-text">' +
-                "                  <h4>磷含量:" +
-                (item.data.phosphorus
-                  ? item.data.phosphorus + "mg/kg"
-                  : "0mg/kg") +
-                "</h4>" +
-                "                </div>" +
-                "                </div>" +
-                "                </span>" +
-                "</div>";
-            }
-            else if (item.deviceType == 4) {
-              if (item.workingStatus==0)
-              {
-                markersMap.icon =
-                  "sj-icon-map-centerdata_pest_and_disease_monitoring_station";
-              }else{
-                markersMap.icon =
-                  "sj-icon-map-not-centerdata_pest_and_disease_monitoring_station";
+            } else if (item.deviceType == 4) {
+              // 病虫害监测站
+              if (item.workingStatus == 0) {
+                markersMap.icon = "sj-icon-map-centerdata_pest_and_disease_monitoring_station";
+              } else if (item.workingStatus == 1) {
+                markersMap.icon = "sj-icon-map-not-centerdata_pest_and_disease_monitoring_station";
               }
-
-            }
-            else if (item.deviceType == 5) {
-              if (item.workingStatus==0)
-              {
+              if (item.data != null) {
+                markersMap.bindPopupHtml +=
+                  '<div class="map-tip">' +
+                  "<span>" +
+                  '                  <div class="d-l-con">' +
+                  '                  <div class="d-l-l-text">' +
+                  "                  <h4>类型:病虫害传感器" +
+                  "</h4>" +
+                  "                </div>" +
+                  "                </div>" +
+                  "                </span>" +
+                  "<span>" +
+                  '                  <div class="d-l-con">' +
+                  '                  <div class="d-l-l-text">' +
+                  "                  <h4>最新识别数量:" +
+                  (item.data.newCount ? item.data.newCount : "") +
+                  "</h4>" +
+                  "                </div>" +
+                  "                </div>" +
+                  "                </span>" +
+                  "<span>" +
+                  '                  <div class="d-l-con">' +
+                  '                  <div class="d-l-l-text">' +
+                  "                  <h4>最新识别结果:" +
+                  (item.data.results ? item.data.results : "") +
+                  "</h4>" +
+                  "                </div>" +
+                  "                </div>" +
+                  "                </span>" +
+                  "<span>" +
+                  '                  <div class="d-l-con">' +
+                  '                  <div class="d-l-l-text">' +
+                  "                  <h4>标注后图片:" +
+                  "<img class=\"image1\" src=" + item.data.taggingImgUrl + "/>" +
+                  "</h4>" +
+                  "                </div>" +
+                  "                </div>" +
+                  "                </span>" +
+                  "<span>" +
+                  '                  <div class="d-l-con">' +
+                  '                  <div class="d-l-l-text">' +
+                  "                  <h4>更新时间:" +
+                  (item.data.createTime ? item.data.createTime : "") +
+                  "</h4>" +
+                  "                </div>" +
+                  "                </div>" +
+                  "                </span>" +
+                  "<span>" +
+                  '                  <div class="d-l-con">' +
+                  '                  <div class="d-l-l-text">' +
+                  "                  <h4>更新时间:" +
+                  (item.data.createTime ? item.data.createTime : "") +
+                  "</h4>" +
+                  "                </div>" +
+                  "                </div>" +
+                  "                </span>" +
+                  "</div>";
+              }
+            } else if (item.deviceType == 5) {
+              // 大气传感器
+              if (item.workingStatus == 0) {
                 markersMap.icon = "sj-icon-map-centerdata_atmospheric_sensor";
-              }else{
-                markersMap.icon =
-                  "sj-icon-map-not-centerdata_atmospheric_sensor";
+              } else if (item.workingStatus == 1) {
+                markersMap.icon = "sj-icon-map-not-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³") +
-                "</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³") +
-                "</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") +
-                "</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³") +
-                "</h4>" +
-                "                </div>" +
-                "                </div>" +
-                "                </span>" +
-                "</div>";
-            }
-            else if (item.deviceType == 6) {
-              if (item.workingStatus==0)
-              {
+              if (item.data != null) {
+                markersMap.bindPopupHtml +=
+                  '<div class="map-tip">' +
+                  "<span>" +
+                  '                  <div class="d-l-con">' +
+                  '                  <div class="d-l-l-text">' +
+                  "                  <h4>类型:大气传感器" +
+                  "</h4>" +
+                  "                </div>" +
+                  "                </div>" +
+                  "                </span>" +
+                  "<span>" +
+                  '                  <div class="d-l-con">' +
+                  '                  <div class="d-l-l-text">' +
+                  "                  <h4>二氧化硫:" +
+                  (item.data.sulfurDioxide ?
+                    item.data.sulfurDioxide + "ug/m³" :
+                    "0ug/m³") +
+                  "</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³") +
+                  "</h4>" +
+                  "                </div>" +
+                  "                </div>" +
+                  "                </span>" +
+                  "<span>" +
+                  '                  <div class="d-l-con">' +
+                  '                  <div class="d-l-l-text">' +
+                  "                  <h4>细颗粒:" +
+                  (item.data.fineParticle ?
+                    item.data.fineParticle + "ug/m³" :
+                    "0ug/m³") +
+                  "</h4>" +
+                  "                </div>" +
+                  "                </div>" +
+                  "                </span>" +
+                  "<span>" +
+                  '                  <div class="d-l-con">' +
+                  '                  <div class="d-l-l-text">' +
+                  "                  <h4>大气压:" +
+                  (item.data.atmos ?
+                    item.data.atmos + "Kpa" :
+                    "0Kpa") +
+                  "</h4>" +
+                  "                </div>" +
+                  "                </div>" +
+                  "                </span>" +
+
+                  "<span>" +
+                  '                  <div class="d-l-con">' +
+                  '                  <div class="d-l-l-text">' +
+                  "                  <h4>光照度:" +
+                  (item.data.illuminance ?
+                    item.data.illuminance + "Lux" :
+                    "0Lux") +
+                  "</h4>" +
+                  "                </div>" +
+                  "                </div>" +
+                  "                </span>" +
+                  "<span>" +
+                  '                  <div class="d-l-con">' +
+                  '                  <div class="d-l-l-text">' +
+                  "                  <h4>温度:" +
+                  (item.data.temperature ? item.data.temperature + "°C | " + (item.threshold ? item.threshold
+                    .temperatureThresholdUp + "°C - " + item.threshold.temperatureThresholdDown + "°C" :
+                    "0°C - 0°C") : "0°C | 0°C - 0°C") +
+                  "</h4>" +
+                  "                </div>" +
+                  "                </div>" +
+                  "                </span>" +
+                  "<span>" +
+                  '                  <div class="d-l-con">' +
+                  '                  <div class="d-l-l-text">' +
+                  "                  <h4>湿度:" +
+                  (item.data.humidity ?
+                    item.data.humidity + "%RH" :
+                    "%RH") +
+                  "</h4>" +
+                  "                </div>" +
+                  "                </div>" +
+                  "                </span>" +
+                  "<span>" +
+                  '                  <div class="d-l-con">' +
+                  '                  <div class="d-l-l-text">' +
+                  "                  <h4>微粒:" +
+                  (item.data.suctionParticle ?
+                    item.data.suctionParticle + "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³") +
+                  "</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³") +
+                  "</h4>" +
+                  "                </div>" +
+                  "                </div>" +
+                  "                </span>" +
+                  "</div>";
+              }
+            } else if (item.deviceType == 6) {
+              // 水压传感器
+              if (item.workingStatus == 0) {
                 markersMap.icon = "sj-icon-map-centerdata_water_pressure_sensor";
-              }else{
+              } else if (item.workingStatus == 1) {
                 markersMap.icon = "sj-icon-map-not-centerdata_water_pressure_sensor";
               }
-
-              markersMap.bindPopupHtml +=
-                '<div class="map-tip">' +
-                "<span>" +
-                '                  <div class="d-l-con">' +
-                '                  <div class="d-l-l-text">' +
-                "                  <h4>下限警报使能:" +
-                (item.data.thresholdLowEnable
-                  ? item.data.thresholdLowEnable + "MPa"
-                  : "0MPa") +
-                "</h4>" +
-                "                </div>" +
-                "                </div>" +
-                "                </span>" +
-                "<span>" +
-                '                  <div class="d-l-con">' +
-                '                  <div class="d-l-l-text">' +
-                "                  <h4>上限警报使能:" +
-                (item.data.thresholdHighEnable
-                  ? item.data.thresholdHighEnable + "MPa"
-                  : "0MPa") +
-                "</h4>" +
-                "                </div>" +
-                "                </div>" +
-                "                </span>" +
-                "<span>" +
-                '                  <div class="d-l-con">' +
-                '                  <div class="d-l-l-text">' +
-                "                  <h4>水压力值:" +
-                (item.data.hydraulicValue
-                  ? item.data.hydraulicValue + "MPa"
-                  : "0MPa") +
-                "</h4>" +
-                "                </div>" +
-                "                </div>" +
-                "                </span>" +
-                "<span>" +
-                '                  <div class="d-l-con">' +
-                '                  <div class="d-l-l-text">' +
-                "                  <h4>水压下限阈值:" +
-                (item.data.hydraulicThresholdMin
-                  ? item.data.hydraulicThresholdMin + "MPa"
-                  : "0MPa") +
-                "</h4>" +
-                "                </div>" +
-                "                </div>" +
-                "                </span>" +
-                "<span>" +
-                '                  <div class="d-l-con">' +
-                '                  <div class="d-l-l-text">' +
-                "                  <h4>水压上限阈值:" +
-                (item.data.hydraulicThresholdMax
-                  ? item.data.hydraulicThresholdMax + "MPa"
-                  : "0MPa") +
-                "</h4>" +
-                "                </div>" +
-                "                </div>" +
-                "                </span>" +
-                "</div>";
-            }
-            else if (item.deviceType == 7) {
-              if (item.workingStatus==0)
-              {
+              if (item.data != null) {
+                markersMap.bindPopupHtml +=
+                  '<div class="map-tip">' +
+                  "<span>" +
+                  '                  <div class="d-l-con">' +
+                  '                  <div class="d-l-l-text">' +
+                  "                  <h4>类型:水压传感器" +
+                  "</h4>" +
+                  "                </div>" +
+                  "                </div>" +
+                  "                </span>" +
+                  '<div class="map-tip">' +
+                  "<span>" +
+                  '                  <div class="d-l-con">' +
+                  '                  <div class="d-l-l-text">' +
+                  "                  <h4>电池电量:" +
+                  (item.data.batteryValue ? item.data.batteryValue + "%" : "0%") +
+                  "</h4>" +
+                  "                </div>" +
+                  "                </div>" +
+                  "                </span>" +
+                  "<span>" +
+                  '                  <div class="d-l-con">' +
+                  '                  <div class="d-l-l-text">' +
+                  "                  <h4 style='color:" + (item.data.hydraulicThresholdMax >= item.data
+                    .hydraulicValue >= item.data.hydraulicThresholdMin ? 'green' : 'red') + "'" + ">水压力值:" +
+                  (item.data.hydraulicValue ? item.data.hydraulicValue + "MPa" : "0MPa") + '   | ' + (item.data
+                    .hydraulicThresholdMin ? item.data.hydraulicThresholdMin + "MPa" : "0MPa") + "-" + (item
+                    .data.hydraulicThresholdMax ? item.data.hydraulicThresholdMax + "MPa" : "0MPa") +
+                  "</h4>" +
+                  "                </div>" +
+                  "                </div>" +
+                  "                </span>" +
+                  "</div>";
+              }
+            } else if (item.deviceType == 7) {
+              //水流速传感器
+              if (item.workingStatus == 0) {
                 markersMap.icon = "sj-icon-map-centerdata_water_flow_rate";
-              }else{
+              } else if (item.workingStatus == 1) {
                 markersMap.icon = "sj-icon-map-not-centerdata_water_flow_rate";
               }
-              markersMap.bindPopupHtml +=
-                '<div class="map-tip">' +
-                "<span>" +
-                '                  <div class="d-l-con">' +
-                '                  <div class="d-l-l-text">' +
-                "                  <h4>瞬时流速:" +
-                (item.data!=null?((item.data.V1 ? item.data.V1 + "m/s" : "0m/s") + "  |  " + (item.threshold.vThreshold ? item.threshold.vThreshold + "m/s" : "null")):(("0m/s") + "  |  " + (item.threshold.vThreshold ? item.threshold.vThreshold + "m/s" : "null"))) +
-                "</h4>" +
-                "                </div>" +
-                "                </div>" +
-                "                </span>" +
-                "<span>" +
-                '                  <div class="d-l-con">' +
-                '                  <div class="d-l-l-text">' +
-                "                  <h4>瞬时流量:" +
-                (item.data!=null?((item.data.Q ? item.data.Q + "m³/s" : "0m³/s") + "  |  " + (item.threshold.vThreshold ? item.threshold.vThreshold + "m³/s" : "null")):(("0m³/s") + "  |  " + (item.threshold.vThreshold ? item.threshold.vThreshold + "m³/s" : "null"))) +
-                "</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>类型:水流速传感器" +
+                  "</h4>" +
+                  "                </div>" +
+                  "                </div>" +
+                  "                </span>" +
+                  "<span>" +
+                  '                  <div class="d-l-con">' +
+                  '                  <div class="d-l-l-text">' +
+                  "                  <h4>瞬时流速:" +
+                  (item.data.V1 ? item.data.V1 + "m/s" : "0m/s") +
+                  "</h4>" +
+                  "                </div>" +
+                  "                </div>" +
+                  "                </span>" +
+                  "<span>" +
+                  '                  <div class="d-l-con">' +
+                  '                  <div class="d-l-l-text">' +
+                  "                  <h4>瞬时流量:" +
+                  (item.data.Q ? item.data.Q + "m³/s" : "0m³/s") +
+                  "</h4>" +
+                  "                </div>" +
+                  "                </div>" +
+                  "                </span>" +
+                  "<span>" +
+                  '                  <div class="d-l-con">' +
+                  '                  <div class="d-l-l-text">' +
+                  "                  <h4>水位:" +
+                  (item.data.Z ? item.data.Z + "" : "0") +
+                  "</h4>" +
+                  "                </div>" +
+                  "                </div>" +
+                  "                </span>" +
+                  "<span>" +
+                  '                  <div class="d-l-con">' +
+                  '                  <div class="d-l-l-text">' +
+                  "                  <h4>水深:" +
+                  (item.data.Z1 ? item.data.Z1 + "" : "0") +
+                  "</h4>" +
+                  "                </div>" +
+                  "                </div>" +
+                  "                </span>" +
+                  "</div>";
+              }
             }
             markersMap.lng = item.longitude;
             markersMap.lat = item.latitude;
             markersList.push(markersMap);
-          })
+          });
           console.log(markersList)
         })
         setTimeout(() => {