From d0391dba3708d3f32bcd94e1881d1b598a0d9ef0 Mon Sep 17 00:00:00 2001 From: zhangshuaibao <15731629597@163.com> Date: 星期四, 15 四月 2021 17:21:10 +0800 Subject: [PATCH] 修改图表问题 --- src/components/BaseNav/WasteWater/WasteWater.js | 31 ++++++++++++++++--------------- 1 files changed, 16 insertions(+), 15 deletions(-) diff --git a/src/components/BaseNav/WasteWater/WasteWater.js b/src/components/BaseNav/WasteWater/WasteWater.js index c2f3d6b..336d2eb 100644 --- a/src/components/BaseNav/WasteWater/WasteWater.js +++ b/src/components/BaseNav/WasteWater/WasteWater.js @@ -1,7 +1,8 @@ +// 璇锋眰鏁版嵁 import { requestWasteWater } from '@/api/request' // 灞曠ず鍥剧墖 -import defaultImg from '@assets/images/map-pages/basenav/Waste-water/fs_green.png' -import Setting from '@assets/images/map-pages/basenav/Waste-water/fs_yellow.png' +// import defaultImg from '@assets/images/map-pages/basenav/Waste-water/fs_green.png' +// import Setting from '@assets/images/map-pages/basenav/Waste-water/fs_yellow.png' // 搴曞浘涓氬姟灞曠ず鐐� class AddWasteWaterHelper { @@ -30,7 +31,6 @@ DrawWasteWaterContent (data) { // 鍥炬爣鏍峰紡鎵╁睍 const WasteWaterIcon = this.WasteWaterIcon() - // //鍔犺浇鏁版嵁鍓嶅鏋滃瓨鍦ㄥ浘灞傜粍 閭d箞娓呴櫎鎺� if (this.WasteWaterLayerGroup) { this.WasteWaterLayerGroup.clearLayers() @@ -52,16 +52,17 @@ const Icon = new WasteWaterIcon({ iconUrl: iconUrl }) // let url = Icon.options.iconUrl - const marker = this.L.marker.magic([positionX, positionY], { icon: Icon, magic: 'vanishIn' }) + // const marker = this.L.marker.magic([positionX, positionY], { icon: Icon, magic: 'vanishIn' }) // 甯︽樉绀哄姩鐢� + const marker = this.L.marker([positionX, positionY], { icon: Icon }) - marker.bindPopup(() => { - return this.WasteWaterPopup.$el - }, { - className: 's-map-popup', - minWidth: 1000, - closeButton: true, - autoClose: false - }) + // marker.bindPopup(() => { + // return this.WasteWaterPopup.$el + // }, { + // className: 's-map-popup', + // minWidth: 1000, + // closeButton: true, + // autoClose: false + // }) // 鍒掕繃鍑虹幇 灞曠ず鏁版嵁 marker.bindTooltip(data[i].Name, { permanent: true, @@ -74,7 +75,7 @@ try { // console.log(e) this.EffectOfPulse(e.target.getLatLng()) - this.WasteWaterPopup.setDate(data[i]) + this.WasteWaterPopup.setData(data[i]) return this.WasteWaterPopup.$el } catch (error) { console.log(error) @@ -105,10 +106,10 @@ WasteWaterIconUrl (determineValueOne, determineValueTwo, position) { let EffectOfChange if (determineValueOne === 1 || determineValueTwo === 1) { - EffectOfChange = defaultImg + // EffectOfChange = defaultImg this.EffectOfPulse(position, this.WasteWaterMarkersLabels, this.WasteWaterLayerGroup) } else { - EffectOfChange = Setting + // EffectOfChange = Setting } return EffectOfChange } -- Gitblit v1.8.0