Browse Source

传感器添加阈值

王通 2 năm trước cách đây
mục cha
commit
4d5d971f7b
1 tập tin đã thay đổi với 62 bổ sung9 xóa
  1. 62 9
      src/views/monitor.vue

+ 62 - 9
src/views/monitor.vue

@@ -430,16 +430,19 @@ export default {
               '                  <div class="d-l-con">' +
               '                  <div class="d-l-l-text">' +
               "                  <h4>水中PH:" +
-              (item.data.waterPh ? item.data.waterPh + "pH" : "0pH") +
-              "</h4>" +
-              "                </div>" +
+              (item.data.waterPh ? item.data.waterPh + "pH" : "0pH")  + '    |   '+
+              (item.threshold ?  item.threshold.waterPhThresholdUp+ "pH " : "0pH") +'-'+
+              (item.threshold ?  item.threshold.waterPhThresholdDown+ "pH": "0pH") +
+              "</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.data.cod ? item.data.cod + "mg/L" : "0mg/L") + '    |   '+
+              (item.threshold ?  item.threshold.codThreshold+ "mg/L " : "0mg/L") +
               "</h4>" +
               "                </div>" +
               "                </div>" +
@@ -450,7 +453,8 @@ export default {
               "                  <h4>氨氮:" +
               (item.data.ammoniaNitrogen
                 ? item.data.ammoniaNitrogen + "mg/L"
-                : "0mg/L") +
+                : "0mg/L")  + '    |   '+
+              (item.threshold ?  item.threshold.ammoniaNitrogenThreshold+ "mg/L " : "0mg/L") +
               "</h4>" +
               "                </div>" +
               "                </div>" +
@@ -462,6 +466,23 @@ export default {
               (item.data.waterTemperature
                 ? item.data.waterTemperature + "°C"
                 : "0°C") +
+              '    |   '+
+              (item.threshold ?  item.threshold.waterTemperatureThresholdUp+ "°C " : "0°C") +'-'+
+              (item.threshold ?  item.threshold.waterTemperatureThresholdDown+ "°C": "0°C") +
+              "</h4>" +
+              "                </div>" +
+              "                </div>" +
+              "                </span>" +
+              "<span>" +
+              '                  <div class="d-l-con">' +
+              '                  <div class="d-l-l-text">' +
+              "                  <h4>电导率:" +
+              (item.data.conductivity
+                ? item.data.conductivity + "S/m"
+                : "0S/m") +
+              '    |   '+
+              (item.threshold ?  item.threshold.conductivityThresholdUp+ "S/m " : "0S/m") +'-'+
+              (item.threshold ?  item.threshold.conductivityThresholdDown+ "S/m": "0S/m") +
               "</h4>" +
               "                </div>" +
               "                </div>" +
@@ -563,7 +584,8 @@ export default {
               "                  <h4>二氧化硫:" +
               (item.data.sulfurDioxide
                 ? item.data.sulfurDioxide + "ug/m³"
-                : "0ug/m³") +
+                : "0ug/m³") +'  |  '+
+              (item.threshold ?  item.threshold.sulfurDioxideThreshold+ "ug/m³": "0ug/m³") +
               "</h4>" +
               "                </div>" +
               "                </div>" +
@@ -574,7 +596,8 @@ export default {
               "                  <h4>一氧化碳:" +
               (item.data.carbonMonoxide
                 ? item.data.carbonMonoxide + "ug/m³"
-                : "0ug/m³") +
+                : "0ug/m³") +'  |  '+
+              (item.threshold ?  item.threshold.carbonMonoxideThreshold+ "ug/m³": "0ug/m³") +
               "</h4>" +
               "                </div>" +
               "                </div>" +
@@ -583,7 +606,10 @@ export default {
               '                  <div class="d-l-con">' +
               '                  <div class="d-l-l-text">' +
               "                  <h4>温度:" +
-              (item.data.temperature ? item.data.temperature + "°C" : "0°C") +
+              (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>" +
@@ -594,12 +620,39 @@ export default {
               "                  <h4>二氧化氮:" +
               (item.data.nitrogenDioxide
                 ? item.data.nitrogenDioxide + "ug/m³"
-                : "0ug/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";