Merge branch 'develop' of http://xearth.cn:6600/r/wuyushui/SewerAndRainNetwork into develop
| | |
| | | /** |
| | | * 固废 |
| | | * 企业 |
| | | */ |
| | | |
| | | // 区分不同类型 使用不同img |
| | | const companyImg = '/assets/images/map/company_refining.png' |
| | | const companyOil = '/assets/images/map/company_oil.png' |
| | |
| | | * @param L leaflet对象 |
| | | */ |
| | | this.init = async (layer, L) => { |
| | | // const SolidWasteIcon = this.SolidWasteIcon() |
| | | this.animalService = new AnimalService({ |
| | | L: L, |
| | | layer: layer |
| | |
| | | className: 'company-bindTooltip', |
| | | iconSize: 16 |
| | | }) |
| | | |
| | | const marker = L.marker([positionX, positionY], { |
| | | /* icon: L.icon({ |
| | | iconUrl: iconUrl, |
| | | iconSize: [30, 30], |
| | | iconAnchor: [15, 15] |
| | | }), */ |
| | | icon: myIcon, |
| | | test: data[i] |
| | | }) |
| | | /* const htmls = '<ul><li>' + data[i].name + '</li></ul>' |
| | | marker.bindTooltip(htmls, { |
| | | permanent: true, |
| | | offset: [0, 5], |
| | | direction: 'bottom', |
| | | className: 'company-bindTooltip' |
| | | }) */ |
| | | layer.addLayer(marker) |
| | | } |
| | | } |
| | |
| | | * |
| | | * */ |
| | | this.clickListener = (e) => { |
| | | // this.animalService.pulseEffect(e.latlng) |
| | | const dataValue = { |
| | | StoragePlaceId: e.layer.options.test.name |
| | | } |
| | | debugger |
| | | console.log(dataValue) |
| | | // return this.PublicBounced.$el |
| | | // console.log(e) |
| | | window.map.setView(e.latlng, 15) |
| | | // if (window.map.getZoom() >= 10) { |
| | | // window.map.removeLayer(e.layer) |
| | | // e.layer.remove() |
| | | // } else if (window.map.getZoom() < 10) { |
| | | // window.map.addLayer(e.layer) |
| | | // } |
| | | // const dataValue = { |
| | | // StoragePlaceId: e.layer.options.test.name |
| | | // } |
| | | } |
| | | } |
| | |
| | | layer: layer |
| | | }) |
| | | const result = await mapApi.getSourcesPoll() |
| | | console.log(result) |
| | | // console.log(result) |
| | | const resultData = result.Result.DataInfo || [] |
| | | const polygon = L.polygon(resultData, { color: 'yellow' }) |
| | | polygon.addTo(layer) |
| | | } |
| | | this.bindTooltip = (layer) => { |
| | | return 'layer' |
| | | } |
| | | this.click = () => { |
| | | window.$layer.open({ |
| | | content: { |
| | | content: 'Popup', // 组件 |
| | | data: { // 传递的参数 |
| | | datas: 'popupDatas' |
| | | } |
| | | }, |
| | | title: '' |
| | | }) |
| | | } |
| | | } |
| | |
| | | methods: { |
| | | flyto () { |
| | | const pos = [39.90751504898071, 116.38927817344666] |
| | | window.map.flyTo(pos, 15) |
| | | window.map.setView(pos, 15) |
| | | }, |
| | | // 区域筛选 |
| | | areaType (val) { |
| | |
| | | <div class="environmental-risk-list" v-for="(item,index) in list" :key="index" |
| | | :class="activeNum===index?'hover':''" @click="handleLocation(item,index)"> |
| | | <img class="state" :src="getImgSrc(item.properties.type)" style="background: none"/> |
| | | <h3>资源类型:{{item.properties.adminzonename}}</h3> |
| | | <h5>资源名称:{{item.properties.type}}</h5> |
| | | <h3>资源类型:{{item.properties.type}}</h3> |
| | | <h5>资源名称:{{item.properties.companyname}}</h5> |
| | | <p>负责人:<span>{{item.properties.resperson}}</span></p> |
| | | <p>电话:<span>{{item.properties.telephone}}</span></p> |
| | | </div> |
| | |
| | | this.wfsHelper.addLike('name', this.form.keyword) |
| | | } |
| | | const res = await AjaxUtils.GetDataAsynByUrl(this.wfsHelper.getUrl(), {}) |
| | | console.log(res) |
| | | if (res instanceof Object && Object.prototype.hasOwnProperty.call(res, 'features')) { |
| | | this.list = res.features |
| | | } |
| | |
| | | |
| | | this.bgPoint = res.data[0].startControlPoint |
| | | |
| | | const point = JSON.parse(this.bgPoint.geomText) |
| | | |
| | | const p = [point.coordinates[1], point.coordinates[0]] |
| | | |
| | | // const point = JSON.parse(this.bgPoint.geomText) |
| | | // const p = [point.coordinates[1], point.coordinates[0]] |
| | | // this.bgMarker = this.createFlowMarker(p) |
| | | this.bgMarker = pulseEffect(p) |
| | | // this.bgMarker = pulseEffect(p) |
| | | // this.bgMarker.bindTooltip(this.bgPoint.pointnumbe) |
| | | // this.bgMarker.addTo(window.map) |
| | | // window.map.flyTo(p) |
| | |
| | | }, |
| | | bgFmClick (e) { |
| | | // console.log('点击影响的阀门') |
| | | console.log(e) |
| | | // console.log(e) |
| | | // const point = [e.data[0][0], e.data[0][1]] |
| | | const point = [e.startControlPoint.y, e.startControlPoint.x] |
| | | // const marker = this.createFlowMarker(point) |
| | | pulseEffect(point) |
| | | // const marker = this.createFlowMarker(point) |
| | | // marker.addTo(window.map) |
| | | // window.map.flyTo(point, 17) |
| | | }, |
| | |
| | | crs: L.CRS.EPSG4326, |
| | | minZoom: 3, |
| | | maxZoom: 21, |
| | | // center: [26, 104], |
| | | center: [34.828558921813965, 117.41676807403564], |
| | | zoom: 5, |
| | | // center: [39.907214641571045, 116.39019012451172], |