王通 1 年間 前
コミット
a969f0c878
1 ファイル変更10 行追加101 行削除
  1. 10 101
      src/views/monitor.vue

+ 10 - 101
src/views/monitor.vue

@@ -748,10 +748,10 @@ export default {
           };
           if (item.deviceType == 1) {
             // 水质传感器
-            if (item.workingStatus==0)
+            if (item.workingStatus==1)
             {
               markersMap.icon = "sj-icon-map-not-centerdata_water_quality_sensor";
-            }else (item.workingStatus==1)
+            }else if(item.workingStatus==0)
             {
               markersMap.icon = "sj-icon-map-centerdata_water_quality_sensor";
             }
@@ -807,10 +807,10 @@ export default {
             markersMap.icon =
               "sj-icon-map-centerdata_hydrological_monitoring_equipment";
           } else if (item.deviceType == 2) {
-            if (item.workingStatus==0)
+            if (item.workingStatus==1)
             {
               markersMap.icon = "sj-icon-map-not-centerdata_soil_monitoring_equipment";
-            }else (item.workingStatus==1)
+            }else if (item.workingStatus==0)
             {
               markersMap.icon =
                 "sj-icon-map-centerdata_soil_monitoring_equipment";
@@ -888,11 +888,11 @@ export default {
               "                </span>" +
               "</div>";
           } else if (item.deviceType == 4) {
-            if (item.workingStatus==0)
+            if (item.workingStatus==1)
             {
               markersMap.icon =
                 "sj-icon-map-not-centerdata_pest_and_disease_monitoring_station";
-            }else (item.workingStatus==1)
+            }else if (item.workingStatus==0)
             {
               markersMap.icon =
                 "sj-icon-map-centerdata_pest_and_disease_monitoring_station";
@@ -900,10 +900,10 @@ export default {
             // 病虫害监测站
 
           } else if (item.deviceType == 5) {
-            if (item.workingStatus==0)
+            if (item.workingStatus==1)
             {
               markersMap.icon = "sj-icon-map-not-centerdata_atmospheric_sensor";
-            }else (item.workingStatus==1)
+            }else if (item.workingStatus==0)
             {
               markersMap.icon = "sj-icon-map-centerdata_atmospheric_sensor";
             }
@@ -955,10 +955,10 @@ export default {
               "                </span>" +
               "</div>";
           } else if (item.deviceType == 6) {
-            if (item.workingStatus==0)
+            if (item.workingStatus==1)
             {
               markersMap.icon = "sj-icon-map-not-centerdata_water_pressure_sensor";
-            }else (item.workingStatus==1)
+            }else  if (item.workingStatus==0)
             {
               markersMap.icon = "sj-icon-map-centerdata_water_pressure_sensor";
             }
@@ -1048,97 +1048,6 @@ export default {
         this.$refs.supermap.setMarkers(markersList);
       }, 2000);
     },
-    // 传感器
-    getSensorListByDeptId() {
-      let that = this;
-      let markersList = [];
-      getSensorListByDeptId(that.deptId)
-        .then(function (res) {
-          that.visuForestCloudCameraBOListSearch = [];
-          // that.sensorNum = res.data.length
-          if (res.data != null && res.data.length > 0) {
-            for (let j = 0; j < res.data.length; j++) {
-              let dat = {
-                cameraName: res.data[j].deviceName,
-                longitude: res.data[j].longitude,
-                latitude: res.data[j].latitude,
-              };
-              that.visuForestCloudCameraBOListSearch.push(dat);
-            }
-            for (let i = 0; i < res.data.length; i++) {
-              let markersMap = {
-                lng: 124.59,
-                lat: 43.02,
-                icon: "marker",
-                bindPopupHtml: "",
-                click: "",
-                parameter: "",
-                name: i,
-                keepBindPopup: false,
-                isAggregation: false,
-              };
-              if (res.data[i].deviceType == 1) {
-                // 水质传感器
-                markersMap.icon = "sj-icon-map-centerdata_water_quality_sensor";
-              } else if (res.data[i].deviceType == "002") {
-                // 水尺
-                markersMap.icon = "sj-icon-map-centerdata_water_gauge";
-              } else if (res.data[i].deviceType == "003") {
-                // 水文监测设备
-                markersMap.icon =
-                  "sj-icon-map-centerdata_hydrological_monitoring_equipment";
-              } else if (res.data[i].deviceType == 2) {
-                // 土壤监测设备
-                markersMap.icon =
-                  "sj-icon-map-centerdata_soil_monitoring_equipment";
-              } else if (res.data[i].deviceType == 4) {
-                // 病虫害监测站
-                markersMap.icon =
-                  "sj-icon-map-centerdata_pest_and_disease_monitoring_station";
-              } else if (res.data[i].deviceType == 5) {
-                // 大气传感器
-                markersMap.icon = "sj-icon-map-centerdata_atmospheric_sensor";
-              } else if (res.data[i].deviceType == 6) {
-                // 水压传感器
-                markersMap.icon =
-                  "sj-icon-map-centerdata_water_pressure_sensor";
-              }
-
-              markersMap.lng = res.data[i].longitude;
-              markersMap.lat = res.data[i].latitude;
-
-              markersList.push(markersMap);
-            }
-            // that.setcgqValue()
-            setTimeout(() => {
-              that.$refs.supermap.clearM();
-              that.$refs.supermap.clearMRadius();
-              that.$refs.supermap.setMarkers(markersList);
-            }, 2000);
-          } else {
-            setTimeout(() => {
-              that.$refs.supermap.clearM();
-              that.$refs.supermap.clearMRadius();
-            }, 2000);
-          }
-          that.onLa = false;
-          that.onShe = false;
-          that.onChuan = true;
-        })
-        .catch(function (error) {
-          console.error(error);
-        });
-    },
-    getSensorListByDeptIds() {
-      let that = this;
-      getSensorListByDeptId(that.deptId)
-        .then(function (res) {
-          that.sensorNum = res.data.length;
-        })
-        .catch(function (error) {
-          console.error(error);
-        });
-    },
     selectKeyAreaList() {
       this.keyAreaList = [];
       //获取重点区域列表