From b41e88c24a34d005022ade22dcd3bf83935061ca Mon Sep 17 00:00:00 2001 From: jn517618 Date: Thu, 11 Jan 2024 11:59:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=B3=A8=E9=87=8A=E6=89=93?= =?UTF-8?q?=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/pathMap.vue | 29 +++++++++---------- 1 file changed, 14 insertions(+), 15 deletions(-) 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) => { // // 绘制行政区