diff --git a/src/views/energySourcesProvince/component/pathMap.vue b/src/views/energySourcesProvince/component/pathMap.vue index db05a63..1cda886 100644 --- a/src/views/energySourcesProvince/component/pathMap.vue +++ b/src/views/energySourcesProvince/component/pathMap.vue @@ -83,15 +83,15 @@ export default { }, created() { this.$nextTick(() => { - // this.getData() - setTimeout(() => { - this.initMap(); - }, 0); - window.addEventListener('resize', () => { - if (this.baiduMap) { - this.backMap(); - } - }); + this.getData() + // setTimeout(() => { + // this.initMap(); + // }, 0); + // window.addEventListener('resize', () => { + // if (this.baiduMap) { + // this.backMap(); + // } + // }); }) }, mounted() { @@ -104,7 +104,6 @@ export default { console.log(data, '.....') this.markList.forEach(e => { data.forEach(r => { - if (e.name.includes(r.name)) { e.carbon = r.carbon || 0 e.electricity = r.electricity || 0 @@ -158,11 +157,11 @@ export default { // // fillOpacity: 0 // })) - try { - BMapGLLib.AreaRestriction.setBounds(this.baiduMap, bound); - } catch (e) { - console.log(e) - } + // try { + // BMapGLLib.AreaRestriction.setBounds(this.baiduMap, bound); + // } catch (e) { + // console.log(e) + // } // bdary.get('郴州市嘉禾县', (rs) => { // // 绘制行政区