| | |
| | | |
| | | // 分割线------------------------------------------------------------------------------- |
| | | this.bindTooltip = (layer) => { |
| | | return layer.options.totransferData.Name |
| | | return '<div class="company-bindTooltip-hover"><h3>天津石化</h3></div>' + layer.options.totransferData.Name |
| | | } |
| | | |
| | | this.clickListener = (e) => { |
| | | // 点击marker的pulse()光波 |
| | | this.animalService.pulseEffect(e.latlng) |
| | | /* 点击数据的接口请求 */ |
| | | this.requestWasteWaterData(e).then(e) |
| | | console.log() |
| | | // 弹框标题 |
| | | const title = e.layer.options.totransferData.Name |
| | | const res = e.layer.options.totransferData |
| | | window.$layer.open({ |
| | | content: { |
| | | content: WasteWaterIndex, // 组件 |
| | | parent: this, // 父组件 |
| | | data: { // 传递的参数 |
| | | // info: this.info |
| | | storagePlaceId: res |
| | | } |
| | | }, |
| | | title: title // 标题 |
| | | }) |
| | | this.animalService.setPanTo(e.latlng, 150) |
| | | } |
| | | this.requestWasteWaterData = async (e) => { |
| | | // 基本信息 和 详细信息 展示数据所需参数 |
| | |
| | | // StoragePlaceId: e.layer.options.test.StoragePlaceId |
| | | // } |
| | | // 弹框标题 |
| | | const title = e.layer.options.totransferData.Name |
| | | console.log(e.layer.options) |
| | | // const title = e.layer.options.totransferData.Name |
| | | // console.log(e.layer.options) |
| | | // 基本信息 tabs |
| | | // const resultBasic = await mapApi.getWasteWater(dataValue) |
| | | // 图表信息展示 echarts |
| | |
| | | // // 通过方法 向绑定弹框传递数据 |
| | | // instance.setData(title, resultBasic.Result.DataInfo, resultDetailed.Result.DataInfo, 'gufei') |
| | | /* flyTo()弹出框平移事件 */ |
| | | this.setPanTo(e.latlng, 150) |
| | | window.$layer.open({ |
| | | content: { |
| | | content: WasteWaterIndex, // 组件 |
| | | parent: this, // 父组件 |
| | | data: { // 传递的参数 |
| | | info: this.info |
| | | // storagePlaceId: e.layer.options.totransferData.StoragePlaceId |
| | | } |
| | | }, |
| | | title: title // 标题 |
| | | }) |
| | | } |
| | | |
| | | // 根据返回值的不同标记不同图片 |
| | |
| | | break |
| | | } |
| | | return testChange |
| | | } |
| | | // 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) |
| | | } |
| | | } |