|
@@ -138,6 +138,7 @@ export default {
|
|
}
|
|
}
|
|
if (this.parentId) {
|
|
if (this.parentId) {
|
|
this.getSmallClass();
|
|
this.getSmallClass();
|
|
|
|
+ this.mapPolygon();
|
|
this.switch2AreaNode(
|
|
this.switch2AreaNode(
|
|
this.parentId,
|
|
this.parentId,
|
|
this.$store.state.addr.mapLevel,
|
|
this.$store.state.addr.mapLevel,
|
|
@@ -247,8 +248,8 @@ export default {
|
|
} else if (val.eventType == 3) {
|
|
} else if (val.eventType == 3) {
|
|
val.eventContLabel = '病虫害';
|
|
val.eventContLabel = '病虫害';
|
|
baseIcon = insectpestIcon;
|
|
baseIcon = insectpestIcon;
|
|
- }else if(val.eventType == 4) {
|
|
|
|
- val.eventContLabel = '偷盗林木'
|
|
|
|
|
|
+ } else if (val.eventType == 4) {
|
|
|
|
+ val.eventContLabel = '偷盗林木';
|
|
}
|
|
}
|
|
let treeSmallLabel =
|
|
let treeSmallLabel =
|
|
"<div class='info-small'>" +
|
|
"<div class='info-small'>" +
|
|
@@ -285,7 +286,7 @@ export default {
|
|
content: treeSmallLabel //设置文本标注内容
|
|
content: treeSmallLabel //设置文本标注内容
|
|
});
|
|
});
|
|
this.map.add(this.eventMarker);
|
|
this.map.add(this.eventMarker);
|
|
- }else if(val.name == false && this.eventMarker) {
|
|
|
|
|
|
+ } else if (val.name == false && this.eventMarker) {
|
|
this.map.remove(this.eventMarker);
|
|
this.map.remove(this.eventMarker);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -572,6 +573,7 @@ export default {
|
|
//更新地图视野
|
|
//更新地图视野
|
|
this.map.setBounds(areaNode.getBounds(), null, null, false);
|
|
this.map.setBounds(areaNode.getBounds(), null, null, false);
|
|
this.getSmallClass();
|
|
this.getSmallClass();
|
|
|
|
+ this.mapPolygon();
|
|
//清除已有的绘制内容
|
|
//清除已有的绘制内容
|
|
this.districtExplorer.clearFeaturePolygons();
|
|
this.districtExplorer.clearFeaturePolygons();
|
|
//绘制子区域
|
|
//绘制子区域
|
|
@@ -656,7 +658,20 @@ export default {
|
|
townId: this.$store.state.addr.selectStreet.areaId
|
|
townId: this.$store.state.addr.selectStreet.areaId
|
|
};
|
|
};
|
|
smallClassMap(params).then((res) => {
|
|
smallClassMap(params).then((res) => {
|
|
- this.smallClassMapArr = res.rows;
|
|
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
+ this.smallClassMapArr = res.rows;
|
|
|
|
+ if (this.leftPage === 'forest') {
|
|
|
|
+ this.addForestPolygon(this.smallClassMapArr);
|
|
|
|
+ } else if (this.leftPage === 'treeSpecies') {
|
|
|
|
+ this.addTreeSpeciesPolygon();
|
|
|
|
+ } else if (this.leftPage === 'economics') {
|
|
|
|
+ this.getEconomics(this.smallClassMapArr);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ mapPolygon() {
|
|
|
|
+ if (this.smallClassMapArr) {
|
|
if (this.leftPage === 'forest') {
|
|
if (this.leftPage === 'forest') {
|
|
this.addForestPolygon(this.smallClassMapArr);
|
|
this.addForestPolygon(this.smallClassMapArr);
|
|
this.getForestSample(this.leftPage);
|
|
this.getForestSample(this.leftPage);
|
|
@@ -668,7 +683,7 @@ export default {
|
|
} else if (this.leftPage === 'event') {
|
|
} else if (this.leftPage === 'event') {
|
|
this.getEven();
|
|
this.getEven();
|
|
}
|
|
}
|
|
- });
|
|
|
|
|
|
+ }
|
|
},
|
|
},
|
|
addForestPolygon(smallClassMapArr) {
|
|
addForestPolygon(smallClassMapArr) {
|
|
let that = this;
|
|
let that = this;
|