| | |
| | | /** |
| | | * 废水 |
| | | */ |
| | | // import WasteWater from "../../table/components/WasteWater"; |
| | | |
| | | const AnimalService = require('../service/AnimalService').default |
| | | const mapApi = require('../../../api/mapApi').default |
| | | // 弹窗数据引进 |
| | | const publicBounced = require('../../BaseNav/PublicBounced/PublicBounced').default |
| | | const WasteWaterIndex = require('@components/BaseNav/WasteWater/WasteWaterIndex').default |
| | | // const publicBounced = require('../../BaseNav/PublicBounced/PublicBounced').default |
| | | |
| | | const NormalImg = '/assets/images/map/wastewater/fs_green.png' // 正常 |
| | | const NormalImg = '/assets/images/map/wastewater/fs_bright_green.png' // 正常 |
| | | const OffImg = '/assets/images/map/wastewater/fs_gray.png' // 停运 |
| | | const AbnormalImg = '/assets/images/map/wastewater/fs_blue.png' // 异常 |
| | | const MissImg = '/assets/images/map/wastewater/fs_yellow.png' // 缺失 |
| | | const MissImg = '/assets/images/map/wastewater/fs_bright_green.png' // 缺失 |
| | | const AlarmImg = '/assets/images/map/wastewater/fs_red.png' // 报警闪烁 |
| | | const WarnImg = '/assets/images/map/wastewater/fs_orange.png' // 预警闪烁 |
| | | |
| | |
| | | const testValue = data[i].ContrLevel |
| | | const iconUrl = this.differentTypes(testValue) |
| | | const marker = L.marker([positionX, positionY], { |
| | | test: data[i], |
| | | totransferData: data[i], |
| | | icon: L.icon({ |
| | | iconUrl: iconUrl, |
| | | iconSize: [20, 20], |
| | | iconAnchor: [10, 10] |
| | | iconSize: [35, 35], |
| | | iconAnchor: [15, 15] |
| | | }) |
| | | }) |
| | | layer.addLayer(marker) |
| | | } |
| | | } |
| | | |
| | | // 分割线------------------------------------------------------------------------------- |
| | | this.bindTooltip = (layer) => { |
| | | return layer.options.test.Name |
| | | return layer.options.totransferData.Name |
| | | } |
| | | |
| | | this.clickListener = async (e) => { |
| | | // console.log(e) |
| | | this.clickListener = (e) => { |
| | | // 点击marker的pulse()光波 |
| | | this.animalService.pulseEffect(e.latlng) |
| | | const dataValue = { |
| | | StoragePlaceId: e.layer.options.test.StoragePlaceId |
| | | } |
| | | const hourValue = { |
| | | onLineMonEmissPointId: '23', |
| | | monItemId: '28,31', |
| | | beginTime: '2020-04-06 15:13:20', |
| | | endTime: '2020-04-07 15:13:20', |
| | | dataType: '2' |
| | | } |
| | | const hourData = await mapApi.getQueryOnlineMonData(hourValue) |
| | | console.log(hourData) |
| | | // const drawback = await mapApi.getWasteWaterMonitoring() |
| | | // console.log(drawback) |
| | | const result = await mapApi.getWasteWaterMonitoringDetails(dataValue) |
| | | const PublicBounced = window.Vue.extend(publicBounced) |
| | | const instance = new PublicBounced() |
| | | instance.setWaterData(e.layer.options.test, result.Result.DataInfo, hourData.Result.DataInfo, 'feishui') |
| | | // console.log(e.layer.options.test) |
| | | instance.$mount() |
| | | document.body.appendChild(instance.$el) |
| | | this.setPanTo(e.latlng, 80) |
| | | // 弹框标题 |
| | | 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.setPanTo(e.latlng, 150) |
| | | } |
| | | this.requestWasteWaterData = async (e) => { |
| | | // 基本信息 和 详细信息 展示数据所需参数 |
| | | // const dataValue = { |
| | | // StoragePlaceId: e.layer.options.test.StoragePlaceId |
| | | // } |
| | | // 弹框标题 |
| | | // const title = e.layer.options.totransferData.Name |
| | | // console.log(e.layer.options) |
| | | // 基本信息 tabs |
| | | // const resultBasic = await mapApi.getWasteWater(dataValue) |
| | | // 图表信息展示 echarts |
| | | // 实时数据 |
| | | // const resultReal = await mapApi.getDataItems(Value) |
| | | // 小时数据 及 明细表数据 |
| | | // const result = await mapApi.getQueryOnlineMonData(dataValue) |
| | | // 日数据 及 明细表数据 |
| | | // const result = await mapApi.getQueryOnlineMonData(dataValue) |
| | | // 人工数据 |
| | | // const resultEchart = await mapApi.getQueryLabMonData(dataValue) |
| | | |
| | | // // 绑定弹框实例 |
| | | // const PublicBounced = window.Vue.extend(publicBounced) |
| | | // const instance = new PublicBounced().$mount() |
| | | // document.body.appendChild(instance.$el) |
| | | // // document.body.removeChild(instance.$el) |
| | | // // 通过方法 向绑定弹框传递数据 |
| | | // instance.setData(title, resultBasic.Result.DataInfo, resultDetailed.Result.DataInfo, 'gufei') |
| | | /* flyTo()弹出框平移事件 */ |
| | | } |
| | | |
| | | // 根据返回值的不同标记不同图片 |
| | |
| | | } |
| | | return testChange |
| | | } |
| | | // flayTo() 弹框的可滑动事件 |
| | | this.setPanTo = (pos, value) => { |
| | | var position = pos |
| | | position = window.map.latLngToLayerPoint(position) |