wangcc hace 2 años
padre
commit
7a14ab10e0
Se han modificado 1 ficheros con 10 adiciones y 0 borrados
  1. 10 0
      src/components/amapnow.vue

+ 10 - 0
src/components/amapnow.vue

@@ -162,6 +162,7 @@ export default {
     },
     '$store.state.addr.page': {
       handler(val) {
+        console.log(val);
         this.leftPage = val;
         if (!this.parentId) {
           this.parentId = '520000';
@@ -171,14 +172,23 @@ export default {
           this.getSmallClass(val);
           this.mapPolygon();
         }
+        if (val == 'forest' || val == 'treeSpecies') {
+          this.getSmallClassCount();
+        }
         if (val != 'forest') {
           this.map.remove(this.forestMarkerArr);
           this.map.remove(this.smallClassNArr);
           this.map.remove(this.smallClassPolygonArr);
+          if (this.projectMarkerArr) {
+            this.map.remove(this.projectMarkerArr);
+          }
         }
         if (val != 'treeSpecies') {
           this.map.remove(this.forestMarkerArr);
           this.map.remove(this.treesPolygonArr);
+          if (this.projectMarkerArr) {
+            this.map.remove(this.projectMarkerArr);
+          }
         }
         if (val != 'economics') {
           this.map.remove(this.economicsArr);