Kaynağa Gözat

数据中心

彭宇 3 yıl önce
ebeveyn
işleme
801390ea34
2 değiştirilmiş dosya ile 41 ekleme ve 35 silme
  1. 21 23
      src/views/event.vue
  2. 20 12
      src/views/forest.vue

+ 21 - 23
src/views/event.vue

@@ -1028,8 +1028,6 @@
         //点击今日事件前三个按钮列表
         let that = this
         getEventStatusList(eventStatus).then(res => {
-          that.$refs.supermap.clearM(false)
-          that.$refs.supermap.clearM(true)
           that.markersList = [];
           that.eventList = [];
           if(res.data.eventList!=null&&res.data.eventList.length>0){
@@ -1082,26 +1080,18 @@
               that.markersList.push(markersMap)
             }
             that.eventList=res.data.eventList;
-            that.$refs.supermap.setMarkers(that.markersList)
           }
-          // eventCode: "718b040cf1f747eb8ab4ffc6db643ca0"
-          // eventContent: "集安-东明-可见光2022-06-27 02:42:04烟雾报警"
-          // eventSource: "event_source_2"
-          // eventStatus: "event_event_status_4"
-          // eventTitle: "集安-东明点位2022-06-27 02:42:04烟雾报警"
-          // id: "01458301eb834f3da5be16a75cd38bb6"
-          // latitude: "43.85618180244526"
-          // longitude: "125.31971797326736"
-          // reportBy: "集安-东明点位"
-          // reportTime: "2022-06-27 02:42:04"
+          setTimeout(() => {
+            that.$refs.supermap.clearM(true)
+            that.$refs.supermap.clearM(false)
+            that.$refs.supermap.setMarkers(that.markersList)
+          },500)
         })
       },
       todayEventSourcetSetMarkers(eventSource) {
         //点击今日事件后三个按钮列表
         let that = this
         getEventSourceList(eventSource).then(res => {
-          that.$refs.supermap.clearM(true)
-          that.$refs.supermap.clearM(false)
           that.eventList = [];
           that.markersList = [];
           let markersMap = {
@@ -1152,8 +1142,12 @@
               that.markersList.push(markersMap)
             }
             that.eventList=res.data.eventList;
-            that.$refs.supermap.setMarkers(that.markersList)
           }
+          setTimeout(() => {
+            that.$refs.supermap.clearM(true)
+            that.$refs.supermap.clearM(false)
+            that.$refs.supermap.setMarkers(that.markersList)
+          },500)
           // eventCode: "718b040cf1f747eb8ab4ffc6db643ca0"
           // eventContent: "集安-东明-可见光2022-06-27 02:42:04烟雾报警"
           // eventSource: "event_source_2"
@@ -1170,8 +1164,6 @@
         //点击事件分类
         let that = this
         getEventListByDeptIdList(deptId).then(res => {
-          that.$refs.supermap.clearM(true)
-          that.$refs.supermap.clearM(false)
           that.markersList = [];
           that.eventList = [];
           let markersMap = {
@@ -1222,8 +1214,12 @@
               that.markersList.push(markersMap)
             }
             that.eventList=res.data.eventList;
-            that.$refs.supermap.setMarkers(that.markersList)
           }
+          setTimeout(() => {
+            that.$refs.supermap.clearM(true)
+            that.$refs.supermap.clearM(false)
+            that.$refs.supermap.setMarkers(that.markersList)
+          },500)
           // eventCode: "718b040cf1f747eb8ab4ffc6db643ca0"
           // eventContent: "集安-东明-可见光2022-06-27 02:42:04烟雾报警"
           // eventSource: "event_source_2"
@@ -1240,8 +1236,6 @@
         //点击事件分类
         let that = this
         getEventListByTypeList(eventType).then(res => {
-          that.$refs.supermap.clearM(true)
-          that.$refs.supermap.clearM(false)
           that.markersList = [];
           that.eventList = [];
           if(res.data.eventList!=null&&res.data.eventList.length>0){
@@ -1291,9 +1285,13 @@
                 '</div>';
               that.markersList.push(markersMap)
             }
-            that.$refs.supermap.setMarkers(that.markersList)
+            that.eventList=res.data.eventList;
           }
-          that.eventList=res.data.eventList;
+          setTimeout(() => {
+            that.$refs.supermap.clearM(true)
+            that.$refs.supermap.clearM(false)
+            that.$refs.supermap.setMarkers(that.markersList)
+          },500)
           // eventCode: "718b040cf1f747eb8ab4ffc6db643ca0"
           // eventContent: "集安-东明-可见光2022-06-27 02:42:04烟雾报警"
           // eventSource: "event_source_2"

+ 20 - 12
src/views/forest.vue

@@ -1379,9 +1379,7 @@
         //点击今日事件前三个按钮列表
         let that = this
         getEventStatusList(eventStatus).then(res => {
-          that.$refs.supermap.clearM(false)
-          that.$refs.supermap.clearM(true)
-          that.eventList=res.data.eventList;
+          that.eventList=[];
           that.markersList = [];
           if(res.data.eventList!=null&&res.data.eventList.length>0){
             for (let i = 0; i < res.data.eventList.length; i++) {
@@ -1432,8 +1430,13 @@
                 '</div>';
               that.markersList.push(markersMap)
             }
-            that.$refs.supermap.setMarkers(that.markersList)
+            that.eventList=res.data.eventList;
           }
+          setTimeout(() => {
+            that.$refs.supermap.clearM(true)
+            that.$refs.supermap.clearM(false)
+            that.$refs.supermap.setMarkers(that.markersList)
+          },500)
           // eventCode: "718b040cf1f747eb8ab4ffc6db643ca0"
           // eventContent: "集安-东明-可见光2022-06-27 02:42:04烟雾报警"
           // eventSource: "event_source_2"
@@ -1450,11 +1453,8 @@
         //点击今日事件后三个按钮列表
         let that = this
         getEventSourceList(eventSource).then(res => {
-          that.$refs.supermap.clearM(true)
-          that.$refs.supermap.clearM(false)
           that.markersList = [];
           if(res.data.eventList!=null&&res.data.eventList.length>0){
-
             for (let i = 0; i < res.data.eventList.length; i++) {
               let markersMap = {
                 lng: 124.59,
@@ -1502,8 +1502,13 @@
                 '</div>';
               that.markersList.push(markersMap)
             }
-            that.$refs.supermap.setMarkers(that.markersList)
           }
+          setTimeout(() => {
+            that.$refs.supermap.clearM(true)
+            that.$refs.supermap.clearM(false)
+            that.$refs.supermap.setMarkers(that.markersList)
+          },500)
+
           // eventCode: "718b040cf1f747eb8ab4ffc6db643ca0"
           // eventContent: "集安-东明-可见光2022-06-27 02:42:04烟雾报警"
           // eventSource: "event_source_2"
@@ -1520,9 +1525,7 @@
         //点击事件分类
         let that = this
         getEventListByDeptIdList(deptId).then(res => {
-          that.$refs.supermap.clearM(true)
-          that.$refs.supermap.clearM(false)
-          that.eventList=res.data.eventList;
+          that.eventList=[];
           that.markersList = [];
 
           if(res.data.eventList!=null&&res.data.eventList.length>0){
@@ -1572,8 +1575,13 @@
                 '</div>';
               that.markersList.push(markersMap)
             }
-            that.$refs.supermap.setMarkers(that.markersList)
+            that.eventList=res.data.eventList;
           }
+          setTimeout(() => {
+            that.$refs.supermap.clearM(true)
+            that.$refs.supermap.clearM(false)
+            that.$refs.supermap.setMarkers(that.markersList)
+          },500)
           // eventCode: "718b040cf1f747eb8ab4ffc6db643ca0"
           // eventContent: "集安-东明-可见光2022-06-27 02:42:04烟雾报警"
           // eventSource: "event_source_2"