| | |
| | | this.clickListener = (e) => { |
| | | // 点击marker的pulse()光波 |
| | | this.animalService.pulseEffect(e.latlng) |
| | | /* 点击数据的接口请求 */ |
| | | this.requestSolidWasteData(e).then(e) |
| | | // 弹框标题 |
| | | const title = e.layer.options.totransferData.Name |
| | | window.$layer.open({ |
| | | content: { |
| | | content: WasteSolidIndex, // 组件 |
| | | parent: this, // 父组件 |
| | | data: { // 传递的参数 |
| | | storagePlaceId: e.layer.options.totransferData.StoragePlaceId |
| | | } |
| | | }, |
| | | title: title // 标题 |
| | | }) |
| | | /* flyTo()弹出框平移事件 */ |
| | | this.animalService.setPanTo(e.latlng, 300) |
| | | } |
| | | |
| | | // 不同类型图片封装 |
| | |
| | | effectOfChange = setting |
| | | } |
| | | return effectOfChange |
| | | } |
| | | |
| | | // 根据点击不同数据 进行接口的数据请求 |
| | | this.requestSolidWasteData = async (e) => { |
| | | // 弹框标题 |
| | | const title = e.layer.options.totransferData.Name |
| | | /* flyTo()弹出框平移事件 */ |
| | | this.setPanTo(e.latlng, 300) |
| | | |
| | | console.log(e.layer.options.totransferData.StoragePlaceId) |
| | | window.$layer.open({ |
| | | content: { |
| | | content: WasteSolidIndex, // 组件 |
| | | parent: this, // 父组件 |
| | | data: { // 传递的参数 |
| | | storagePlaceId: e.layer.options.totransferData.StoragePlaceId |
| | | } |
| | | }, |
| | | title: title // 标题 |
| | | }) |
| | | } |
| | | |
| | | // flayTo() 弹框的可滑动事件 |
| | | this.setPanTo = (pos, value) => { |
| | | var position = pos |
| | | position = window.map.latLngToLayerPoint(position) |
| | | position.y += value |
| | | position = window.map.layerPointToLatLng(position) |
| | | window.map.flyTo(position) |
| | | } |
| | | } |