Przeglądaj źródła

监控中心传感器

王通 2 lat temu
rodzic
commit
0922f1de6a
1 zmienionych plików z 8 dodań i 8 usunięć
  1. 8 8
      src/views/monitor.vue

+ 8 - 8
src/views/monitor.vue

@@ -444,7 +444,7 @@
         let markersList = [];
         getSensorListByDeptId(that.deptId).then(function(res) {
             that.visuForestCloudCameraBOListSearch = []
-            that.sensorNum = res.data.length
+            // that.sensorNum = res.data.length
             if (res.data != null && res.data.length > 0) {
               for (let j = 0; j < res.data.length; j++) {
                 let dat = {
@@ -466,19 +466,19 @@
                   keepBindPopup: false,
                   isAggregation: false,
                 };
-                if (res.data[i].deviceCode == '001') { // 水质传感器
+                if (res.data[i].deviceType == 1) {  // 水质传感器
                   markersMap.icon = "sj-icon-map-centerdata_water_quality_sensor";
-                } else if (res.data[i].deviceCode == '002') { // 水尺
+                } else if (res.data[i].deviceType == '002') {  // 水尺
                   markersMap.icon = "sj-icon-map-centerdata_water_gauge";
-                } else if (res.data[i].deviceCode == '003') { // 水文监测设备
+                } else if (res.data[i].deviceType == '003') {  // 水文监测设备
                   markersMap.icon = "sj-icon-map-centerdata_hydrological_monitoring_equipment";
-                } else if (res.data[i].deviceCode == '004') { // 土壤监测设备
+                } else if (res.data[i].deviceType == 2) {  // 土壤监测设备
                   markersMap.icon = "sj-icon-map-centerdata_soil_monitoring_equipment";
-                } else if (res.data[i].deviceCode == '005') { // 病虫害监测站
+                } else if (res.data[i].deviceType == 4) {  // 病虫害监测站
                   markersMap.icon = "sj-icon-map-centerdata_pest_and_disease_monitoring_station";
-                } else if (res.data[i].deviceCode == '006') { // 大气传感器
+                } else if (res.data[i].deviceType == 5) {  // 大气传感器
                   markersMap.icon = "sj-icon-map-centerdata_atmospheric_sensor";
-                } else if (res.data[i].deviceCode == '007') { // 水压传感器
+                } else if (res.data[i].deviceType == 6) {  // 水压传感器
                   markersMap.icon = "sj-icon-map-centerdata_water_pressure_sensor";
                 }