| | |
| | | }, |
| | | getSolidWaste (data) { |
| | | return axios.get(mapUrl.getSolidWaste, data) |
| | | }, |
| | | GetWasteGas (data) { |
| | | return axios.get(mapUrl.GetWasteGas, data) |
| | | } |
| | | // getWasteGas (data) { |
| | | // return axios.get(mapUrl.GetWasteGas, data) |
| | | // } |
| | | } |
| | |
| | | |
| | | export const GetUser = $HOST + '/user/getUser' |
| | | |
| | | // export const GetWasteGas = $HOST + '/wasteGas/getWasteGas' |
| | | export const GetWasteGas = $HOST + '/wasteGas/getWasteGas' |
| | | |
| | | export const getSolidWaste = $HOST + '/wasteSolid/getSolidWaste' |
| | |
| | | * @param L leaflet对象 |
| | | */ |
| | | this.init = async (layer, L) => { |
| | | // const SolidWasteIcon = this.SolidWasteIcon() |
| | | this.animalService = new AnimalService({ |
| | | L: L, |
| | | layer: layer |
| | |
| | | iconAnchor: [25, 25] |
| | | }) |
| | | }) |
| | | |
| | | layer.addLayer(marker) |
| | | } |
| | | } |
| | |
| | | * 废气 |
| | | */ |
| | | const AnimalService = require('../service/AnimalService').default |
| | | const AjaxUtils = require('../../../utils/AjaxUtils').default |
| | | // const AjaxUtils = require('../../../utils/AjaxUtils').default |
| | | |
| | | // 区分不同类型 使用不同img |
| | | const defaultImg = '/assets/images/map/exhaust/fq_blue.png' |
| | | const setting = '/assets/images/map/exhaust/fq_gray.png' |
| | | |
| | | const mapApi = require('../../../api/mapApi').default |
| | | module.exports = function () { |
| | | /** |
| | | * 返回marker对象数组 |
| | | * @param L leaflet对象 |
| | | */ |
| | | this.init = (layer, L) => { |
| | | this.init = async (layer, L) => { |
| | | this.animalService = new AnimalService({ L: L, layer: layer }) |
| | | AjaxUtils.get4JsonDataByUrl('http://10.246.162.140:8080/EPInterface/DataService/EPMapService.asmx/ObtainningConInfo', { |
| | | companyId: 3900100145, |
| | | id: '', |
| | | monType: 1, |
| | | userCode: 'wenchun.deng', |
| | | monDuration: '', |
| | | epName: '', |
| | | secdDeptId: '', |
| | | contrLevel: '', |
| | | dataStatus: '', |
| | | dataFlag: '', |
| | | runStatus: '', |
| | | emissTypeId: '' |
| | | }, function (res) { |
| | | const data = res.data.Result.DataInfo |
| | | // console.log(data) |
| | | for (let i = 0; i < data.length; i++) { |
| | | // 经纬度 位置 |
| | | const positionX = data[i].Latitude |
| | | const positionY = data[i].Longitude |
| | | layer.addLayer(L.marker([positionX, positionY], {})) |
| | | } |
| | | }) |
| | | const res = await mapApi.GetWasteGas() |
| | | const data = res.Result.DataInfo || {} |
| | | console.log(data) |
| | | for (let i = 0; i < data.length; i++) { |
| | | // 经纬度 位置 |
| | | const positionX = data[i].Latitude |
| | | const positionY = data[i].Longitude |
| | | // 定义类型 用来区分数据 |
| | | const judgeValue = data[i].StorageQty |
| | | var iconUrl = this.differentTypes(judgeValue) |
| | | |
| | | const marker = L.marker.magic([positionX, positionY], { |
| | | icon: L.icon({ |
| | | iconUrl: iconUrl, |
| | | iconSize: [50, 50], |
| | | iconAnchor: [25, 25] |
| | | }) |
| | | }) |
| | | layer.addLayer(marker) |
| | | // layer.addLayer(L.marker([positionX, positionY], {})) |
| | | } |
| | | } |
| | | |
| | | this.bindTooltip = (layer) => { |
| | |
| | | console.log(e) |
| | | this.animalService.pulseEffect(e.latlng) |
| | | } |
| | | // 不同类型图片封装 |
| | | this.differentTypes = (judgeValue) => { |
| | | var effectOfChange |
| | | if (judgeValue === 1) { |
| | | effectOfChange = defaultImg |
| | | } else { |
| | | effectOfChange = setting |
| | | } |
| | | return effectOfChange |
| | | } |
| | | } |
| | |
| | | |
| | | // 创建axios实例 |
| | | const Service = axios.create({ |
| | | timeout: 1000 |
| | | timeout: 5000 |
| | | }) |
| | | |
| | | const CancelToken = axios.CancelToken |
| | |
| | | <enterprise></enterprise> |
| | | <!-- <el-button id="map-btn" el-icon-c-scale-to-original icon="el-icon-c-scale-to-original" circle @click="isShowHidden"></el-button>--> |
| | | <!-- <el-button type="primary" @click="ChangeState" class="solid-waste">固废</el-button>--> |
| | | <el-button type="primary" @click="ChangeWaterState" class="Waste-water">废水</el-button> |
| | | <el-button type="primary" @click="AddGasHelper" class="flue-gas">废气</el-button> |
| | | <!-- <el-button type="primary" @click="ChangeWaterState" class="Waste-water">废水</el-button>--> |
| | | <!-- <el-button type="primary" @click="AddGasHelper" class="flue-gas">废气</el-button>--> |
| | | <PublicBounced ref="PublicBounced"></PublicBounced> |
| | | </div> |
| | | </template> |
| | |
| | | import LegendPanel from '@components/panel/LegendPanel' |
| | | import Enterprise from '../components/table/enterprise' |
| | | // 底图业务js逻辑 |
| | | import AddWasteWaterHelper from '@components/BaseNav/WasteWater/WasteWater' |
| | | import AddGasHelper from '@components/BaseNav/flueGas/flueGas' |
| | | // import AddWasteWaterHelper from '@components/BaseNav/WasteWater/WasteWater' |
| | | // import AddGasHelper from '@components/BaseNav/flueGas/flueGas' |
| | | // // 公共展示数据 |
| | | import PublicBounced from '@components/BaseNav/PublicBounced/PublicBounced' |
| | | import LayerFactory from '@components/LayerController/service/LayerFactory' |
| | |
| | | }) |
| | | }, |
| | | methods: { |
| | | AddGasHelper () { |
| | | const data = { |
| | | companyId: 3900100145, |
| | | id: '', |
| | | monType: 2, |
| | | userCode: 'wenchun.deng', |
| | | monDuration: '', |
| | | epName: '', |
| | | secdDeptId: '', |
| | | contrLevel: '', |
| | | dataStatus: '', |
| | | dataFlag: '', |
| | | runStatus: '', |
| | | emissTypeId: '' |
| | | } |
| | | const AddGas = new AddGasHelper({ map: this.map }) |
| | | AddGas.requestData(data) |
| | | AddGas.SetPlueGasContent(this.config, this.$refs.PublicBounced) |
| | | }, |
| | | ChangeWaterState () { |
| | | const data = { |
| | | companyId: 3900100145, |
| | | id: '', |
| | | monType: 1, |
| | | userCode: 'wenchun.deng', |
| | | monDuration: '', |
| | | epName: '', |
| | | secdDeptId: '', |
| | | contrLevel: '', |
| | | dataStatus: '', |
| | | dataFlag: '', |
| | | runStatus: '', |
| | | emissTypeId: '' |
| | | } |
| | | const AddWasteWater = new AddWasteWaterHelper({ map: this.map }) |
| | | AddWasteWater.requestData(data) |
| | | AddWasteWater.SetWasteWaterContent(this.config, this.$refs.PublicBounced) |
| | | }, |
| | | saveMapStatus () { |
| | | window.serviceLayerHelper = this.serviceLayerHelper |
| | | this.$store.commit('setMapObj', this.map) |