Explorar o código

修改预案信息在签收后方可修改

王通 %!s(int64=2) %!d(string=hai) anos
pai
achega
62b261eb91
Modificáronse 1 ficheiros con 104 adicións e 105 borrados
  1. 104 105
      src/views/monitor.vue

+ 104 - 105
src/views/monitor.vue

@@ -292,15 +292,13 @@
         window.open("https://sts.sty1818.com");
       },
       chuanSet() {
-        let that = this
-        setInterval(function() {
-
-          that.getMonitorDeviceAndDataList()
-
-        }, 20000)
+       if(this.onChuan) {
+         let that = this
+         setInterval(function() {
+           that.getMonitorDeviceAndDataList()
+         }, 20000)
+       }
       },
-
-
       getMonitorDeviceAndDataList() {
         let list = []
         let markersList = [];
@@ -595,35 +593,35 @@
         }, 2000);
       },
 
-      setcgqValue: function() {
-        let that = this
-        for (let i = 0; i < that.visuForestCloudCameraBOListSearch.length; i++) {
-          var color = "green";
-          var value = Math.random();
-          var up = "▲";
-          var down = "▼";
-          if (value > 0.5) {
-            color = "red";
-            value = value + "" + up;
-          } else {
-            value = value + "" + down;
-          }
-          that.cgqData.push("<span style='color:" + color + "'>" + value + "</span>")
-        }
-        setInterval(function() {
-          var color = "green";
-          var value = Math.random();
-          var up = "▲";
-          var down = "▼";
-          if (value > 0.5) {
-            color = "red";
-            value = value + "" + up;
-          } else {
-            value = value + "" + down;
-          }
-          that.cgqData = "<span style='color:" + color + "'>" + value + "</span>";
-        }, 1000)
-      },
+      // setcgqValue: function() {
+      //   let that = this
+      //   for (let i = 0; i < that.visuForestCloudCameraBOListSearch.length; i++) {
+      //     var color = "green";
+      //     var value = Math.random();
+      //     var up = "▲";
+      //     var down = "▼";
+      //     if (value > 0.5) {
+      //       color = "red";
+      //       value = value + "" + up;
+      //     } else {
+      //       value = value + "" + down;
+      //     }
+      //     that.cgqData.push("<span style='color:" + color + "'>" + value + "</span>")
+      //   }
+      //   setInterval(function() {
+      //     var color = "green";
+      //     var value = Math.random();
+      //     var up = "▲";
+      //     var down = "▼";
+      //     if (value > 0.5) {
+      //       color = "red";
+      //       value = value + "" + up;
+      //     } else {
+      //       value = value + "" + down;
+      //     }
+      //     that.cgqData = "<span style='color:" + color + "'>" + value + "</span>";
+      //   }, 1000)
+      // },
       /* 电视墙替换开始 */
       showTVWall(channelCode, channelName) {
         let tvListJson = [{
@@ -685,6 +683,7 @@
         // this.findCameraByDept(data.id)
         if (that.localMark == 'she') {
           that.selectCameraByDeptId(data.id);
+          debugger
           getCamerasByDeptId(data.id).then(res => {
             that.$refs.TVWalls.showTVWall(res.data, {
               longitude: data.deptLongitude,
@@ -831,74 +830,74 @@
           });
       },
       // 传感器
-      getSensorListByDeptId() {
-        let that = this;
-        let markersList = [];
-        getSensorListByDeptId(that.deptId).then(function(res) {
-            that.setcgqValue()
-            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: "",
-                  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);
-          });
-      },
+      // getSensorListByDeptId() {
+      //   let that = this;
+      //   let markersList = [];
+      //   getSensorListByDeptId(that.deptId).then(function(res) {
+      //       that.setcgqValue()
+      //       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: "",
+      //             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;
         let markersList = [];