qinhouyu 2 năm trước cách đây
mục cha
commit
fce76d212d
1 tập tin đã thay đổi với 63 bổ sung1 xóa
  1. 63 1
      src/views/forest.vue

+ 63 - 1
src/views/forest.vue

@@ -763,6 +763,67 @@
           that.$refs.supermap.setMarkers(that.markersList);
         });
       },
+      fireControlViewPointNew(resourceTable, name, search) {
+        if(resourceTable == this.resourceTable && search != "search"){
+          resourceTable = "ziyuan"
+        }
+        // this.iconCurrentIndex = resourceTable;
+        // 搜索框
+        if (name == "" || name == null || name == undefined) {
+          name = "";
+        } else {
+          this.showSearch = true;
+        }
+        console.log("name=", name);
+        console.log("this.showSearch=", this.showSearch);
+
+        let that = this;
+        that.resourceTable = resourceTable;
+        that.markersList = [];
+        that.source = [];
+        fireControlViewPoint(resourceTable, name,"").then((res) => {
+          let pointList = res.data.pointList;
+          that.deptGroupList = res.data.deptList;
+          if (res.data.deptList != null && res.data.deptList.length > 0) {
+            for (let i = 0; i < res.data.deptList.length; i++) {
+              let aa = [
+                res.data.deptList[i].deptName,
+                res.data.deptList[i].count,
+              ];
+              that.source.push(aa);
+            }
+          }
+
+          if (res.data.pointList != null && res.data.pointList.length > 0) {
+            for (let i = 0; i < res.data.pointList.length; i++) {
+              if(res.data.pointList[i].indexName != 'centerdata_t_forest_fireteam'){
+                let markersMap = {
+                  lng: res.data.pointList[i].longitude,
+                  lat: res.data.pointList[i].latitude,
+                  icon: "marker",
+                  bindPopupHtml: "",
+                  click: "",
+                  name: i,
+                  keepBindPopup: false,
+                  isAggregation: false,
+                };
+                that.markersList.push(
+                  this.getMarkersMap(
+                    resourceTable == "ziyuan" ? res.data.pointList[i].indexName:resourceTable,
+                    markersMap,
+                    res.data.pointList[i]
+                  )
+                );
+              }
+            }
+          }
+          if (this.showSearch == true) {
+            this.dataChat();
+          }
+          that.$refs.supermap.clearM(false);
+          that.$refs.supermap.setMarkers(that.markersList);
+        });
+      },
       indentleftSetMarkers(resourceTable, name) {
         let that = this
         // 搜索框
@@ -1515,6 +1576,7 @@
           } else {
             setTimeout(() => {
               that.$refs.supermap.clearM();
+              that.iconCurrentIndex=''
               //数据自动落点开始
               let maxCount = 100; //落点数超过这个数的资源不落点
               let types = [];
@@ -1524,7 +1586,7 @@
                 }
               }
               for (let i = 0; i < types.length; i++) {
-                that.fireControlViewPoint(types[i], '','search');
+                that.fireControlViewPointNew(types[i], '','search');
               }
               //数据自动落点结束
             }, 2000)