Browse Source

资源云图加载资源信息优化

wang_xy 1 năm trước cách đây
mục cha
commit
fb1d826dae
1 tập tin đã thay đổi với 13 bổ sung25 xóa
  1. 13 25
      src/views/forest.vue

+ 13 - 25
src/views/forest.vue

@@ -550,8 +550,8 @@
         this.getEventByReportorOrder(this.getCurrentDataStr())
         this.getExposureStage(this.getCurrentDataStr())
         this.getSupermap(this.getCurrentDataStr())
-        this.getResource()
         this.getMenuEventType()
+        this.getResource()
       }, 2000)
 
       /** ----------------------------------weosocket开始------------------------------------- */
@@ -686,30 +686,7 @@
             let icon = 'sj' + '-' + 'icon' + '-' + data.type.replaceAll("_", "-").replaceAll("@", "-");
             console.log("icon_" + (index + 1) + "=", icon);
             that.$set(that.resourcesList[index], 'icon', icon);
-
           })
-          if(that.resourcesList!=null&&that.resourcesList.length>0){
-            //数据自动落点开始
-            let maxCount = 100; //落点数超过这个数的资源不落点
-            let list = res.data;
-            let counts = [];
-            let points = [];
-            let types = [];
-            for (let i = 0; i < list.length; i++) { //获取符合要求的类型及数量
-              if (list[i].num <= maxCount) {
-                counts.push(list[i].num);
-                points.push({
-                  "type": list[i].type,
-                  "count": list[i].num
-                });
-                types.push(list[i].type);
-              }
-            }
-            for (let i = 0; i < types.length; i++) {
-              that.indentleftSetMarkers(types[i], '所有');
-            }
-            //数据自动落点结束
-          }
         })
       },
       indentleftSetMarkers(resourceTable, name) {
@@ -1464,7 +1441,18 @@
           } else {
             setTimeout(() => {
               that.$refs.supermap.clearM();
-              that.getResource()
+              //数据自动落点开始
+              let maxCount = 100; //落点数超过这个数的资源不落点
+              let types = [];
+              for (let i = 0; i < that.resourcesList.length; i++) { //获取符合要求的类型及数量
+                if (that.resourcesList[i].num <= maxCount) {
+                  types.push(that.resourcesList[i].type);
+                }
+              }
+              for (let i = 0; i < types.length; i++) {
+                that.indentleftSetMarkers(types[i], '所有');
+              }
+              //数据自动落点结束
             }, 2000)
           }
         })