Merge remote-tracking branch 'origin/develop' into develop
1个文件已删除
19个文件已添加
26个文件已修改
| | |
| | | /** |
| | | * åºåº |
| | | * ä¼ä¸ |
| | | */ |
| | | |
| | | // åºåä¸åç±»å 使ç¨ä¸å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.bindTooltip = (layer) => { |
| | | // console.log(layer) |
| | | // console.log(layer) |
| | | return '<div class="company-bindTooltip-hover"><h3>污æç©äº§çç»è®¡</h3><ul>' + |
| | | '<li>ç产设æ½ï¼30ï¼ä¸ªï¼</li>' + |
| | | '<li>æ²»ç设æ½ï¼30ï¼ä¸ªï¼</li>' + |
| | | '</ul></div>'// layer.options.test.name |
| | | '<li>ç产设æ½ï¼30ï¼ä¸ªï¼</li>' + |
| | | '<li>æ²»ç设æ½ï¼30ï¼ä¸ªï¼</li>' + |
| | | '</ul></div>'// layer.options.test.name |
| | | } |
| | | /* |
| | | * ç¹ä½ç¹å»äºä»¶ |
| | | * |
| | | * */ |
| | | 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: '' |
| | | }) |
| | | } |
| | | } |
| | |
| | | */ |
| | | const AnimalService = require('../service/AnimalService').default |
| | | // const AjaxUtils = require('../../../utils/AjaxUtils').default |
| | | |
| | | // å
Œ
±æ¹æ³ panTo() å¼ç¨ |
| | | const { setPanTo } = require('../../../utils/utils') |
| | | // åºåä¸åç±»å 使ç¨ä¸åimg |
| | | // const ImgBlue = '/assets/images/map/exhaust/fq_blue.png' |
| | | // const ImgGray = '/assets/images/map/exhaust/fq_gray.png' |
| | |
| | | } |
| | | |
| | | this.clickListener = async (e) => { |
| | | console.log(e) |
| | | // console.log(e) |
| | | this.animalService.pulseEffect(e.latlng) |
| | | setPanTo(e.latlng, 200) |
| | | const title = e.layer.options.test.Name |
| | | const res = e.layer.options.test |
| | | window.$layer.open({ |
| | |
| | | }, |
| | | title: '天津ç³å' + title // æ é¢ |
| | | }) |
| | | this.animalService.setPanTo(e.latlng, 150) |
| | | } |
| | | // ä¸åç±»åå¾çå è½½ |
| | | this.differentTypes = (ContrLevel) => { |
| | |
| | | // åºåä¸åç±»å 使ç¨ä¸åimg |
| | | const defaultImg = '/assets/images/map/solidwaste/voc.png' |
| | | const setting = '/assets/images/map/solidwaste/gf_green2.png' |
| | | |
| | | // å
Œ
±æ¹æ³ panTo() å¼ç¨ |
| | | const { setPanTo } = require('../../../utils/utils') |
| | | // è¯·æ±æ¥å£æ°æ® |
| | | const mapApi = require('../../../api/mapApi').default |
| | | // 使ç¨å°è£
æ¹æ³ |
| | |
| | | this.clickListener = (e) => { |
| | | // ç¹å»markerçpulse()å
æ³¢ |
| | | this.animalService.pulseEffect(e.latlng) |
| | | /* flyTo()å¼¹åºæ¡å¹³ç§»äºä»¶ */ |
| | | setPanTo(e.latlng, 200) |
| | | // å¼¹æ¡æ é¢ |
| | | const title = e.layer.options.totransferData.Name |
| | | window.$layer.open({ |
| | |
| | | }, |
| | | title: title // æ é¢ |
| | | }) |
| | | /* flyTo()å¼¹åºæ¡å¹³ç§»äºä»¶ */ |
| | | this.animalService.setPanTo(e.latlng, 300) |
| | | } |
| | | |
| | | // ä¸åç±»åå¾çå°è£
|
| | |
| | | /** |
| | | * åºæ°´ |
| | | */ |
| | | // import WasteWater from "../../table/components/WasteWater"; |
| | | |
| | | // å
Œ
±æ¹æ³ panTo() å¼ç¨ |
| | | const { setPanTo } = require('../../../utils/utils') |
| | | |
| | | const AnimalService = require('../service/AnimalService').default |
| | | const mapApi = require('../../../api/mapApi').default |
| | | // å¼¹çªæ°æ®å¼è¿ |
| | | const WasteWaterIndex = require('@components/BaseNav/WasteWater/WasteWaterIndex').default |
| | | // const publicBounced = require('../../BaseNav/PublicBounced/PublicBounced').default |
| | | |
| | | const NormalImg = '/assets/images/map/wastewater/fs_bright_green.png' // æ£å¸¸ |
| | | const OffImg = '/assets/images/map/wastewater/fs_gray.png' // åè¿ |
| | |
| | | } |
| | | } |
| | | |
| | | // åå²çº¿------------------------------------------------------------------------------- |
| | | this.bindTooltip = (layer) => { |
| | | return '<div class="company-bindTooltip-hover"><h3>天津ç³å</h3></div>' + layer.options.totransferData.Name |
| | | } |
| | | |
| | | this.clickListener = (e) => { |
| | | // ç¹å»markerçpulse()å
æ³¢ |
| | | this.animalService.pulseEffect(e.latlng) |
| | | setPanTo(e.latlng, 200) |
| | | // å¼¹æ¡æ é¢ |
| | | const title = e.layer.options.totransferData.Name |
| | | const res = e.layer.options.totransferData |
| | |
| | | }, |
| | | title: '天津ç³å' + title // æ é¢ |
| | | }) |
| | | this.animalService.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()å¼¹åºæ¡å¹³ç§»äºä»¶ */ |
| | | } |
| | | |
| | | // æ ¹æ®è¿åå¼çä¸åæ è®°ä¸åå¾ç |
| | |
| | | } |
| | | }, 1000) |
| | | } |
| | | |
| | | /** |
| | | * 设置弹çªå¹³ç§»ä½ç½® |
| | | * @param pos |
| | | * @param value |
| | | */ |
| | | setPanTo = (pos, value) => { |
| | | var position = pos |
| | | position = this.layer.latLngToLayerPoint(position) |
| | | position.y += value |
| | | position = this.layer.layerPointToLatLng(position) |
| | | this.layer.flyTo(position) |
| | | } |
| | | } |
| | | |
| | | export default AnimalService |
| | |
| | | import WfsLayerService from './WfsLayerService' |
| | | import { clone, pulseEffect } from '../../../utils/utils' |
| | | import { logicMapper, SERVICE_TYPE } from '../../../conf/Constants' |
| | | import WmsLayerService from './WmsLayerService' |
| | | |
| | |
| | | this.layersLogic = {} |
| | | this.minZoomLayers = {} |
| | | this.wmsLayers = [] |
| | | // todo å¾
ä¼åï¼wmslayerserviceè°ç¨ï¼æ¾è¿éä¸åé |
| | | this.clickSwitch = true // å¾å±ç¹å»å¼¹çªå¼å
³ |
| | | this.hightlightLayer = options.L.featureGroup({}).addTo(window.map) |
| | | this.wmsLayerService = null |
| | | } |
| | | |
| | | init (layerConfig) { |
| | | this.initConfig(layerConfig) |
| | | // wmsæå¡åªéè¦åå§å䏿¬¡ |
| | | this.wmsLayerService = new WmsLayerService(this.wmsLayers) |
| | | this.wmsLayerService = new WmsLayerService() |
| | | this.wmsLayerService.init() |
| | | this.initConfig(layerConfig) |
| | | } |
| | | |
| | | initConfig (layerConfig) { |
| | |
| | | wmsGroupLayerService.init() |
| | | continue |
| | | } */ |
| | | layers && this.init(config.layers) |
| | | childLayer && this.init(config.childLayer) |
| | | layers && this.initConfig(config.layers) |
| | | childLayer && this.initConfig(config.childLayer) |
| | | |
| | | this.initMinZoom(config) |
| | | this.loadLogic(config) |
| | |
| | | logic = new BusiLayer() |
| | | } else if (type === SERVICE_TYPE.WFS) { |
| | | logic = new WfsLayerService(config) |
| | | } else if (type === SERVICE_TYPE.WMS) { |
| | | var layer = {} |
| | | layer[config.code] = config |
| | | this.wmsLayers.push(layer) |
| | | } |
| | | } |
| | | this.layersLogic[code] = logic |
| | |
| | | this.hide(config) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * æ ¹æ®ä¼ ç feature对象å®ä½ï¼ |
| | | * @param code |
| | | * @param feature |
| | | */ |
| | | flyByFeature (feature, code) { |
| | | this.clearHighlight() |
| | | const type = feature.geometry.type |
| | | var point = [] |
| | | switch (type) { |
| | | case 'Point': |
| | | point = feature.geometry.coordinates |
| | | break |
| | | case 'MultiLineString': |
| | | var coordinates = feature.geometry.coordinates |
| | | var coordinate = coordinates[parseInt(coordinates.length / 2)][0] |
| | | if (coordinate.length > 2) { |
| | | point = [coordinate[0], coordinate[1]] |
| | | } |
| | | break |
| | | case 'LineString': |
| | | var lineString = feature.geometry.coordinates |
| | | point = lineString[parseInt(lineString.length / 2)][0] |
| | | break |
| | | } |
| | | if (point.length > 2) { |
| | | point.splice(2, 1) |
| | | } |
| | | this.highlight(feature) |
| | | window.map.setView(clone(point).reverse(), 17) |
| | | code && this.openPopup(code, feature.id) |
| | | } |
| | | |
| | | clearHighlight () { |
| | | this.hightlightLayer.clearLayers() |
| | | } |
| | | |
| | | highlight (feature) { |
| | | const type = feature.geometry.type |
| | | if (type === 'MultiLineString') { |
| | | this.L.geoJSON(feature, { |
| | | style: function () { |
| | | return { |
| | | fillColor: 'red', |
| | | color: 'red' |
| | | } |
| | | } |
| | | }).addTo(this.hightlightLayer) |
| | | } else if (type === 'Point') { |
| | | let point = clone(feature.geometry.coordinates) |
| | | if (point.length > 2) { |
| | | point = [point[0], point[1]] |
| | | } |
| | | pulseEffect(point.reverse()) |
| | | /* var myIcon = this.L.divIcon({ className: 'my-div-icon' }) |
| | | this.L.marker(feature.geometry.coordinates.reverse(), { |
| | | icon: myIcon |
| | | }).addTo(this.hightlightLayer) */ |
| | | } else if (type === 'LineString') { |
| | | this.L.polyline(this.reversePolyLine(feature), { color: 'red' }).addTo(this.hightlightLayer) |
| | | } |
| | | } |
| | | |
| | | reverseMultiLine (feature) { |
| | | const coordinates = feature.geometry.coordinates |
| | | var latlng = [] |
| | | for (var j = 0; j < coordinates.length; j++) { |
| | | const coordinate = coordinates[j] |
| | | var xy = [] |
| | | for (var k = 0; k < coordinate.length; k++) { |
| | | const coor = coordinate[k] |
| | | xy.push(coor.reverse()) |
| | | } |
| | | latlng.push(xy) |
| | | } |
| | | return latlng |
| | | } |
| | | |
| | | reversePolyLine (feature) { |
| | | const coordinates = feature.geometry.coordinates |
| | | var latlng = [] |
| | | for (var j = 0; j < coordinates.length; j++) { |
| | | const coordinate = coordinates[j] |
| | | latlng.push(coordinate.reverse()) |
| | | } |
| | | return latlng |
| | | } |
| | | |
| | | openPopup (layerId, id) { |
| | | const layer = this.layers[layerId] |
| | | |
| | | if (layer) { |
| | | layer.eachLayer(function (layer) { |
| | | const layers = layer.getLayers() |
| | | for (var i = 0; i < layers.length; i++) { |
| | | const lay = layers[i] |
| | | const feature = lay.feature |
| | | lay.closePopup() |
| | | if (feature.id === id) { |
| | | lay.openPopup() |
| | | break |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | /* for (var k in this.layers) { |
| | | var layerGroup = this.layers[k] |
| | | layerGroup.eachLayer(function (layer) { |
| | | console.log(layer) |
| | | console.log(layer.getAttribution()) |
| | | }) |
| | | var layers = layerGroup.getLayers() |
| | | if (layers) { |
| | | for (var m = 0; m < layers.length; m++) { |
| | | var layer = layers[m] |
| | | console.log(layer) |
| | | console.log(layer.getLayerId(val.id)) |
| | | /!* var feature = layer.feature |
| | | if (feature.id === layerId) { |
| | | this.map.flyToBounds(bound) |
| | | return layer |
| | | } *!/ |
| | | } |
| | | } |
| | | } */ |
| | | return null |
| | | } |
| | | |
| | | findLayerById (layer, id) { |
| | | const layers = layer.getLayers |
| | | if (layers) { |
| | | this.findLayerById(layer.getLayers(), id) |
| | | } else { |
| | | layer.eachLayer(function (layer) { |
| | | // console.log(layer) |
| | | }) |
| | | } |
| | | } |
| | | } |
| | |
| | | this.L.tileLayer.wms(PIPELINE_WMS, { |
| | | format: 'image/png', // è¿åçæ°æ®æ ¼å¼ |
| | | transparent: true, |
| | | maxZoom: 21, |
| | | layers: k // todo |
| | | }).addTo(this.layer).bringToFront() |
| | | } |
| | |
| | | import AjaxUtils from '../../../utils/AjaxUtils' |
| | | import { WMS_URL } from '../../../conf/Constants' |
| | | import Popup from '@views/popup/Popup' |
| | | import WmsLayerList from '../dataset/WmsLayerList' |
| | | |
| | | /** |
| | |
| | | INFO_FORMAT: 'application/json', |
| | | TRANSPARENT: true, |
| | | FEATURE_COUNT: 50, |
| | | maxZoom: 21, |
| | | SRS: 'EPSG:4326', |
| | | EXCEPTIONS: 'application/vnd.ogc.se_inimage' |
| | | } |
| | |
| | | this.featureGroup = this.L.featureGroup({}).addTo(this.map) |
| | | |
| | | this.wmsLayerList = new WmsLayerList() |
| | | for (var i = 0; i < layersConfig.length; i++) { |
| | | const config = layersConfig[i] |
| | | this.wmsLayerList.addConfig(config) |
| | | if (layersConfig) { |
| | | for (var i = 0; i < layersConfig.length; i++) { |
| | | const config = layersConfig[i] |
| | | this.wmsLayerList.addConfig(config) |
| | | } |
| | | } |
| | | this.load() |
| | | } |
| | | |
| | | init () { |
| | | this.clickListener() |
| | | } |
| | | |
| | | add (config) { |
| | | this.wmsLayerList.addConfig(config) |
| | | const layers = this.wmsLayerList.getLayers() |
| | | const filter = this.wmsLayerList.getFilters() |
| | | const layers = this.wmsLayerList.getLayers() || '' |
| | | const filter = this.wmsLayerList.getFilters() || '' |
| | | const params = {} |
| | | if (filter) { |
| | | params.cql_filter = filter |
| | | } |
| | | if (layers) { |
| | | params.layers = layers |
| | | } |
| | | params.cql_filter = filter |
| | | params.layers = layers |
| | | this.wmsLayer.setParams(params) |
| | | } |
| | | |
| | | remove (config) { |
| | | console.log(config) |
| | | this.wmsLayerList.remove(config.typeName, config.filter) |
| | | const layers = this.wmsLayerList.getLayers() |
| | | const filter = this.wmsLayerList.getFilters() |
| | | const layers = this.wmsLayerList.getLayers() || '' |
| | | const filter = this.wmsLayerList.getFilters() || '' |
| | | const params = { layers: layers } |
| | | if (filter) { |
| | | params.cql_filter = filter |
| | | } |
| | | params.cql_filter = filter |
| | | this.wmsLayer.setParams(params) |
| | | } |
| | | |
| | |
| | | params.cql_filter = filter |
| | | } |
| | | this.wmsLayer = this.L.tileLayer.wms(WMS_URL, params).addTo(this.map) |
| | | } |
| | | |
| | | clickListener () { |
| | | window.map.on('click', (e) => { |
| | | // console.log(e) |
| | | window.layerFactory.clearHighlight() |
| | | this.featureGroup.clearLayers() |
| | | var point = this.map.latLngToContainerPoint(e.latlng, this.map.getZoom()) |
| | | var size = this.map.getSize() |
| | | // const bbox = this.L.latLngBounds(this.L.latLng(e.latlng.lng, e.latlng.lat)).toBBoxString() |
| | | const layers = this.wmsLayerList.getLayers() |
| | | const filter = this.wmsLayerList.getFilters() |
| | | if (layers.length > 0) { |
| | | const params = Object.assign({ |
| | | LAYERS: layers, |
| | | QUERY_LAYERS: layers, |
| | | WIDTH: size.x, |
| | | HEIGHT: size.y, |
| | | X: Math.round(point.x), |
| | | Y: Math.round(point.y), |
| | | BBOX: this.map.getBounds().toBBoxString() |
| | | }, this.params) |
| | | if (filter.length > 0) { |
| | | params.cql_filter = filter |
| | | } |
| | | AjaxUtils.get4JsonDataByUrl(WMS_URL, params, (res) => { |
| | | const features = res.data.features |
| | | /** |
| | | * { |
| | | * title: 'New Tab', |
| | | * name: newTabName, |
| | | * content: 'New Tab content' |
| | | * } |
| | | * @type {*[]} |
| | | */ |
| | | const popupDatas = [] |
| | | if (features) { |
| | | for (var i = 0; i < features.length; i++) { |
| | | const feature = features[i] |
| | | const properties = feature.properties |
| | | this.highlight(feature) |
| | | // const coordinates = feature.geometry.coordinates |
| | | popupDatas.push({ |
| | | title: properties.wellname || properties.devicename || properties.name || properties.pipename, |
| | | name: feature.id, |
| | | content: properties |
| | | }) |
| | | } |
| | | } |
| | | if (popupDatas.length > 0) { |
| | | var myIcon = this.L.divIcon({ className: 'my-div-icon' }) |
| | | this.L.marker(e.latlng, { |
| | | icon: myIcon |
| | | }).addTo(this.featureGroup)/* |
| | | .bindPopup((layer) => { |
| | | this.popupComp.setDatas(popupDatas) |
| | | this.popupComp.setShow() |
| | | return this.popupComp.$el |
| | | }, { |
| | | className: 's-map-popup', |
| | | minWidth: 300, |
| | | closeButton: false, |
| | | autoClose: false |
| | | }) |
| | | .openPopup() */ |
| | | |
| | | if (window.layerFactory.clickSwitch) { |
| | | window.$layer.open({ |
| | | content: { |
| | | content: Popup, // ç»ä»¶ |
| | | data: { // ä¼ éçåæ° |
| | | datas: popupDatas |
| | | } |
| | | }, |
| | | title: '', // æ é¢ |
| | | left: e.originalEvent.clientX, |
| | | top: e.originalEvent.clientY |
| | | }) |
| | | } |
| | | // this.popupComp.setDatas(popupDatas) |
| | | // this.popupComp.setShow() |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | reverseMultiLine (feature) { |
| | | const coordinates = feature.geometry.coordinates |
| | | var latlng = [] |
| | | for (var j = 0; j < coordinates.length; j++) { |
| | | const coordinate = coordinates[j] |
| | | var xy = [] |
| | | for (var k = 0; k < coordinate.length; k++) { |
| | | const coor = coordinate[k] |
| | | xy.push(coor.reverse()) |
| | | } |
| | | latlng.push(xy) |
| | | } |
| | | return latlng |
| | | } |
| | | |
| | | reversePolyLine (feature) { |
| | | const coordinates = feature.geometry.coordinates |
| | | var latlng = [] |
| | | for (var j = 0; j < coordinates.length; j++) { |
| | | const coordinate = coordinates[j] |
| | | latlng.push(coordinate.reverse()) |
| | | } |
| | | return latlng |
| | | } |
| | | |
| | | highlight (feature) { |
| | | const type = feature.geometry.type |
| | | if (type === 'MultiLineString') { |
| | | this.L.polyline(this.reverseMultiLine(feature), { color: 'red' }).addTo(this.featureGroup) |
| | | } else if (type === 'Point') { |
| | | var myIcon = this.L.divIcon({ className: 'my-div-icon' }) |
| | | this.L.marker(feature.geometry.coordinates.reverse(), { |
| | | icon: myIcon |
| | | }).addTo(this.featureGroup) |
| | | } else if (type === 'LineString') { |
| | | this.L.polyline(this.reversePolyLine(feature), { color: 'red' }).addTo(this.featureGroup) |
| | | } |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | import { pulseEffect, reversePolyLine } from '../../utils/utils' |
| | | import Popup from '@views/popup/Popup' |
| | | import { LAYERPROPS, LAYERS } from '../../conf/Constants' |
| | | /** |
| | | * æ ¹æ®ä¼ ç feature对象å®ä½ï¼ |
| | | * @param code |
| | | * @param feature |
| | | */ |
| | | export const fitBounds = function (feature) { |
| | | const type = feature.geometry.type |
| | | switch (type) { |
| | | case 'Point': |
| | | var point = feature.geometry.coordinates |
| | | point = [point[1], point[0]] |
| | | window.map.setView(point, 17) |
| | | break |
| | | case 'MultiLineString': |
| | | window.map.fitBounds(window.L.geoJSON(feature).getBounds()) |
| | | break |
| | | case 'LineString': |
| | | window.map.fitBounds(window.L.polyline(reversePolyLine(feature)).getBounds()) |
| | | break |
| | | } |
| | | } |
| | | |
| | | export const highlight = function (feature, config) { |
| | | const L = window.L |
| | | const type = feature.geometry.type |
| | | window.mapManager.clearHighlight() |
| | | const highlightLayer = window.mapManager.hightlightLayer |
| | | if (type === 'MultiLineString') { |
| | | L.geoJSON(feature, { |
| | | style: function () { |
| | | return { |
| | | fillColor: 'red', |
| | | color: 'red' |
| | | } |
| | | } |
| | | }).addTo(highlightLayer) |
| | | } else if (type === 'Point') { |
| | | // å å ä¸ä¸ªå¤§å°ºå¯¸ç徿 |
| | | let point = feature.geometry.coordinates |
| | | point = [point[1], point[0]] |
| | | |
| | | if (config) { |
| | | L.marker(point, { |
| | | icon: L.icon({ |
| | | iconUrl: '/assets/images/map/' + config.icon, |
| | | iconSize: [30, 30], |
| | | iconAnchor: [15, 15] |
| | | }) |
| | | }).addTo(highlightLayer) |
| | | } |
| | | pulseEffect(point) |
| | | const features = window.mapManager.loadWfsDatas(point) |
| | | openPopup(point, features) |
| | | } else if (type === 'LineString') { |
| | | L.polyline(reversePolyLine(feature), { color: 'red' }).addTo(highlightLayer) |
| | | } |
| | | } |
| | | |
| | | export const openPopup = function (xy, features) { |
| | | const lt = window.map.latLngToContainerPoint(xy) |
| | | const datas = popupDatas(features) |
| | | if (datas.length > 0) { |
| | | window.$layer.open({ |
| | | content: { |
| | | comp: Popup, // ç»ä»¶ |
| | | data: { // ä¼ éçåæ° |
| | | datas: datas |
| | | } |
| | | }, |
| | | title: '', // æ é¢ |
| | | left: lt.x, |
| | | top: lt.y |
| | | }) |
| | | } |
| | | } |
| | | |
| | | const popupDatas = function (features) { |
| | | const datas = [] |
| | | if (features) { |
| | | for (var i = 0; i < features.length; i++) { |
| | | const feature = features[i] |
| | | const id = feature.id |
| | | const properties = feature.properties |
| | | const ids = id.split('.') |
| | | |
| | | const propValues = LAYERPROPS[ids[0]] |
| | | const contents = {} |
| | | for (const k in properties) { |
| | | if (propValues[k]) { |
| | | contents[propValues[k]] = properties[k] |
| | | } |
| | | } |
| | | datas.push({ |
| | | title: LAYERS[ids[0]], |
| | | name: feature.id, |
| | | content: contents |
| | | }) |
| | | console.log(properties) |
| | | } |
| | | } |
| | | return datas |
| | | } |
| | | |
| | | export const getLayer = function (layerId, id) { |
| | | const layer = this.layers[layerId] |
| | | |
| | | if (layer) { |
| | | layer.eachLayer(function (layer) { |
| | | const layers = layer.getLayers() |
| | | for (var i = 0; i < layers.length; i++) { |
| | | const lay = layers[i] |
| | | const feature = lay.feature |
| | | if (feature.id === id) { |
| | | return lay |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | return null |
| | | } |
New file |
| | |
| | | import AjaxUtils from '../../utils/AjaxUtils' |
| | | import { WMS_URL } from '../../conf/Constants' |
| | | import { openPopup } from './LocateHelper' |
| | | |
| | | class MapManager { |
| | | constructor () { |
| | | this.hightlightLayer = window.L.featureGroup({}).addTo(window.map) |
| | | this.clickDialogSwitch = true // å¾å±ç¹å»å¼¹çªå¼å
³ |
| | | this.L = window.L |
| | | this.map = window.map |
| | | // wms getfeatureinfo é»è®¤åæ° |
| | | this.defaultWmsParams = { |
| | | VERSION: '1.1.1', |
| | | SERVICE: 'WMS', |
| | | REQUEST: 'GetFeatureInfo', |
| | | // bbox: bbox, |
| | | FORMAT: 'image/png', |
| | | INFO_FORMAT: 'application/json', |
| | | TRANSPARENT: true, |
| | | FEATURE_COUNT: 50, |
| | | SRS: 'EPSG:4326', |
| | | EXCEPTIONS: 'application/vnd.ogc.se_inimage' |
| | | } |
| | | } |
| | | |
| | | mapClickListener () { |
| | | this.map.on('click', (e) => { |
| | | // console.log(e) |
| | | this.clearHighlight() |
| | | this.loadWfsDatas(e.latlng) |
| | | }) |
| | | } |
| | | |
| | | loadWfsDatas (latlng) { |
| | | const size = this.map.getSize() |
| | | var point = this.map.latLngToContainerPoint(latlng, this.map.getZoom()) |
| | | const wmsLayerService = window.layerFactory.wmsLayerService |
| | | const layers = wmsLayerService.wmsLayerList.getLayers() |
| | | // const filters = wmsLayerService.wmsLayerList.getFilters() |
| | | const params = Object.assign({ |
| | | LAYERS: layers, |
| | | QUERY_LAYERS: layers, |
| | | WIDTH: size.x, |
| | | HEIGHT: size.y, |
| | | X: Math.round(point.x), |
| | | Y: Math.round(point.y), |
| | | BBOX: this.map.getBounds().toBBoxString() |
| | | }, this.defaultWmsParams) |
| | | AjaxUtils.get4JsonDataByUrl(WMS_URL, params, (res) => { |
| | | openPopup(latlng, res.data.features) |
| | | }) |
| | | } |
| | | |
| | | clearHighlight () { |
| | | this.hightlightLayer.clearLayers() |
| | | } |
| | | } |
| | | |
| | | export default MapManager |
| | |
| | | console.log(opt) |
| | | self.closeAll() |
| | | var options = mergeJson(opt, defOptions) |
| | | console.log('11111' + options) |
| | | const id = `notification_${new Date().getTime()}_${seed++}` |
| | | options.id = id |
| | | options.layer = self |
| | | options.content.content = Vue.extend(options.content.content) |
| | | options.content.comp = Vue.extend(options.content.comp) |
| | | console.log(options) |
| | | const instance = new LayerVueExtend({ |
| | | data: options |
| | | }) |
| | |
| | | }, |
| | | init () { |
| | | const propsData = helper.deepClone(this.content.data) || {} |
| | | propsData.layerid = this.id |
| | | propsData.lydata = this.content.data |
| | | propsData.lyoption = this.options |
| | | const instance = new this.content.content({ |
| | | console.log(propsData) |
| | | const instance = new this.content.comp({ |
| | | // parent: this.content.parent, |
| | | propsData: propsData |
| | | }) |
| | |
| | | methods: { |
| | | flyto () { |
| | | const pos = [39.90751504898071, 116.38927817344666] |
| | | window.map.flyTo(pos, 15) |
| | | window.map.setView(pos, 15) |
| | | }, |
| | | // åºåçé |
| | | areaType (val) { |
| | |
| | | </el-form-item> |
| | | <el-form-item label="äºä»¶ç±»åï¼"> |
| | | <el-radio-group v-model="form.transferData" class="levelOfRisk"> |
| | | <el-radio v-for="(item,index) in form.levelOfRisk" :label="item.value" :key="index"> |
| | | <el-radio v-for="(item,index) in form.levelOfRisk" :label="item.value" :key="index" |
| | | @change="redioChange(item.name)"> |
| | | <span class="levelOfRisk-type">{{ item.name }}</span> |
| | | </el-radio> |
| | | </el-radio-group> |
| | |
| | | </el-form> |
| | | </el-form> |
| | | <el-scrollbar style="height:286.22px"> |
| | | <div class="environmental-risk-list" v-for="(item,index) in list" :key="index" |
| | | :class="activeNum===index?'hover':''"> |
| | | <!-- <div class="environmental-risk-list" v-for="(item,index) in list" :key="index" :class="activeNum===index?'hover':''" @click="accordPopup(item)">--> |
| | | <!-- <!– <i class="state"></i>–>--> |
| | | <!-- <img class="state" :src="getImgSrc(item.properties.type)" style="background: none"/>--> |
| | | <!-- <div>--> |
| | | <!-- <h3 @click="handleLocation(item,index)">äºä»¶åç§°:XXXäºä»¶</h3>--> |
| | | <!-- <h5>--> |
| | | <!-- äºä»¶äºä»¶:2021å¹´3æ21æ¥--> |
| | | <!-- <el-button class="rt btn00fff6" size="mini" style="margin-right: 0.04rem;">å é¤</el-button>--> |
| | | <!-- </h5>--> |
| | | <!-- <p>--> |
| | | <!-- äºä»¶ç¶æï¼<span>审æ¹é¶æ®µ</span>--> |
| | | <!-- </p>--> |
| | | <!-- <p>äºä»¶ç±»åï¼<span>{{ item.properties.pipecode }}</span>--> |
| | | <!-- <el-button class="rt btn00fff6" size="mini" style="margin-right: 0.04rem;">äºä»¶ç®¡ç--> |
| | | <!-- </el-button>--> |
| | | <!-- </p>--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <div class="environmental-risk-list"> |
| | | <!-- <i class="state"></i>--> |
| | | <img class="state" :src="getImgSrc()" style="background: none"/> |
| | | <div> |
| | | <h3 @click="handleLocation(item,index)">äºä»¶åç§°:XXXäºä»¶</h3> |
| | | <h3>äºä»¶åç§°:XXXäºä»¶</h3> |
| | | <h5> |
| | | äºä»¶äºä»¶:2021å¹´3æ21æ¥ |
| | | <el-button class="rt btn00fff6" size="mini" style="margin-right: 0.04rem;">å é¤</el-button> |
| | |
| | | <p> |
| | | äºä»¶ç¶æï¼<span>审æ¹é¶æ®µ</span> |
| | | </p> |
| | | <p>äºä»¶ç±»åï¼<span>{{ item.properties.pipecode }}</span> |
| | | <el-button class="rt btn00fff6" size="mini" style="margin-right: 0.04rem;">äºä»¶ç®¡ç |
| | | <p>äºä»¶ç±»åï¼<span>模æç®¡çº¿äºä»¶</span> |
| | | <el-button class="rt btn00fff6" size="mini" style="margin-right: 0.04rem;" |
| | | @click="accordPopup()"> |
| | | <span>äºä»¶ç®¡ç</span> |
| | | </el-button> |
| | | </p> |
| | | </div> |
| | |
| | | this.wfsHelper = new WfsHelper() |
| | | }, |
| | | methods: { |
| | | // ç¹å»äºä»¶ç®¡ç |
| | | accordPopup () { |
| | | console.log('item') |
| | | window.$layer.open({ |
| | | content: { |
| | | content: ReportPopup, // ç»ä»¶ |
| | | parent: this, // ç¶ç»ä»¶ |
| | | data: { // ä¼ éçåæ° |
| | | // storagePlaceId: e.layer.options.totransferData.StoragePlaceId |
| | | } |
| | | } |
| | | // title: 'title' // æ é¢ |
| | | }) |
| | | }, |
| | | // radioæ°æ®éæ© |
| | | redioChange (item) { |
| | | console.log(item) |
| | | }, |
| | | // æ ¹æ®æ°æ®è¿åå±ç¤ºä¸åçå¾ç |
| | | getImgSrc () { |
| | | const icon = this.form.dataType.icon |
| | | return icon ? 'assets/images/map/' + icon : '' |
| | | }, |
| | | // form 2 è¡¨åæ°æ®éæ©äºä»¶ |
| | | handleDataType () { |
| | | this.list = [] |
| | | }, |
| | | // form è¡¨åæ°æ®éæ© |
| | | handlePipelineType (val) { |
| | | this.list = [] |
| | | for (let i = 0; i < this.items.length; i++) { |
| | |
| | | } |
| | | } |
| | | }, |
| | | // æ°æ®æç´¢äºä»¶ |
| | | async handleSearch () { |
| | | this.list = [] |
| | | this.wfsHelper.clearFilter() |
| | |
| | | this.list = res.features |
| | | } |
| | | }, |
| | | // æç´¢çæ°æ®ç¹å»äºä»¶ |
| | | handleLocation (val, index) { |
| | | console.log(val) |
| | | this.activeNum = index |
| | | // layer && layer.openPopup() |
| | | // window.layerFactory.flyByFeature(val, this.form.dataType.code) |
| | | window.map.flyTo([val.properties.y, val.properties.x], 15) |
| | | }, |
| | | btnAffiliatedFacilities () { |
| | | console.log('item') |
| | | window.$layer.open({ |
| | | content: { |
| | | content: ReportPopup, // ç»ä»¶ |
| | | parent: this, // ç¶ç»ä»¶ |
| | | data: { // ä¼ éçåæ° |
| | | // storagePlaceId: e.layer.options.totransferData.StoragePlaceId |
| | | } |
| | | } |
| | | // title: 'title' // æ é¢ |
| | | }) |
| | | } |
| | | } |
| | | } |
| | |
| | | <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>{{changeAmount}}ç±»å:{{item.properties.type}}</h3> |
| | | <h5>{{changeAmount}}åç§°:{{item.properties.name}}</h5> |
| | | <p>è´è´£äºº:<span>{{item.properties.resperson}}</span></p> |
| | | <p>çµè¯:<span>{{item.properties.telephone}}</span></p> |
| | | </div> |
| | |
| | | list: [], |
| | | items: [LayerEmergencySource, LayerSurroundings], |
| | | subItems: LayerEmergencySource.layers || LayerSurroundings.layers, |
| | | WfsHelper: null |
| | | WfsHelper: null, |
| | | changeAmount: 'èµæº' |
| | | } |
| | | }, |
| | | mounted () { |
| | |
| | | } |
| | | if (this.form.pipelineType === 'åºæ¥èµæº') { |
| | | this.subItems = LayerEmergencySource.layers |
| | | this.changeAmount = 'èµæº' |
| | | } else if (this.form.pipelineType === 'å¨è¾¹ç¯å¢') { |
| | | this.subItems = LayerSurroundings.layers |
| | | this.changeAmount = 'ç¯å¢' |
| | | } |
| | | }, |
| | | handleDataType (val) { |
| | |
| | | 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 |
| | | } |
| | |
| | | // å¼å
¥ç»ä»¶å
容 |
| | | import SewersAnalysis from '@components/panel/topicSearch/SewersSelect/SewersAnalysis' |
| | | import SewersHistory from '@components/panel/topicSearch/SewersSelect/SewersHistory' |
| | | import { fitBounds, highlight } from '../../helpers/LocateHelper' |
| | | |
| | | export default { |
| | | name: 'SewersSearch', |
| | |
| | | } |
| | | }, |
| | | handleLocation (val, index) { |
| | | console.log(val) |
| | | console.log(this.form.dataType) |
| | | // console.log(val) |
| | | this.activeNum = index |
| | | // layer && layer.openPopup() |
| | | window.layerFactory.flyByFeature(val, this.form.dataType.code) |
| | | fitBounds(val, this.form.dataType.code) |
| | | highlight(val, this.form.dataType) |
| | | }, |
| | | btnAffiliatedFacilities (val, index) { |
| | | this.activeNum = index |
| | |
| | | } else { |
| | | this.fuShuSheShiShow = false |
| | | } |
| | | window.layerFactory.flyByFeature(val, this.form.dataType.code) |
| | | fitBounds(val, this.form.dataType.code) |
| | | highlight(val) |
| | | } |
| | | }, |
| | | mounted () { |
| | |
| | | this.linkPipeline.push(line) |
| | | }) |
| | | }, |
| | | // è¿éæ§ åæç»ætableåè¡¨æ°æ®éæ©ç¹å»äºä»¶ |
| | | // å®ä½æ¹æ³äºä»¶ |
| | | linkResultSelect (e) { |
| | | // console.log('è¿éæ§åæç»æå表ç¹å»') |
| | | // console.log(e) |
| | | console.log(e) |
| | | const geom = JSON.parse(e.geomText) |
| | | if (this.currentSelectResultLine != null) { |
| | | this.currentSelectResultLine.remove() |
| | |
| | | this.selectPipeLine() |
| | | }, |
| | | async bgSelect (e) { |
| | | console.log('éæ©ç管管段') |
| | | console.log(e) |
| | | // console.log('éæ©ç管管段') |
| | | // console.log(e) |
| | | this.bgFm = [] |
| | | if (this.bgMarker != null) { |
| | | this.bgMarker.remove() |
| | |
| | | |
| | | 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) |
| | | }, |
| | |
| | | <el-scrollbar style="height:286.22px"> |
| | | <div class="environmental-risk-list" v-for="(item,index) in searchDataDisplay" :key="index" |
| | | @click="setBounced(item)"> |
| | | <!-- <i class="state"></i>--> |
| | | <img src="../../../../public/assets/images/map/solidwaste/gf_green2.png" alt="" class="state"> |
| | | <div> |
| | | <h3>###ç¼åé¨</h3> |
| | |
| | | }, |
| | | // æ°æ®å±ç¤º,ç¹å»è¿è¡å¼¹æ¡åç¹çå±ç¤º |
| | | setBounced (val) { |
| | | // console.log(val) |
| | | console.log(val) |
| | | const pos = [val.Latitude, val.Longitude] |
| | | window.map.setView(pos, 15) |
| | | window.$layer.open({ |
| | |
| | | title: val.Name |
| | | }) |
| | | pulseEffect([val.Latitude, val.Longitude]) |
| | | setPanTo(pos, 250) |
| | | setPanTo(pos, 200) |
| | | } |
| | | } |
| | | } |
| | |
| | | ICON_SIZE: [10, 10] |
| | | } |
| | | |
| | | export const props = { |
| | | code: 'ç¼å·', |
| | | name: 'åç§°', |
| | | teamname: 'åç§°', |
| | | pfktype: 'ææ¾å£ç±»å', |
| | | level: '级å«', |
| | | length: 'é¿åº¦(m)', |
| | | unitname: 'åä½åç§°', |
| | | pipename: '管线åç§°', |
| | | subchaname: 'æ¯çº¿åç§°', |
| | | subchacode: 'æ¯çº¿ç¼ç ', |
| | | mediumtype: 'è¾éä»è´¨', |
| | | startposname: 'èµ·ç¹ä½ç½®åç§°', |
| | | endposname: 'ç»ç¹ä½ç½®åç§°', |
| | | pressureating: '设计ååï¼MPaï¼', |
| | | designtranyear: '设计è¾éï¼ä¸ç«/å¹´ï¼', |
| | | earningcapacity: 'å®é
è¾éï¼ä¸ç«/å¹´ï¼', |
| | | buriedtime: 'å设æ¶é´', |
| | | coatingmaterial: 'é²è
ç¶åµ', |
| | | inservicetime: 'æäº§æ¶é´', |
| | | reportname: 'å¡«æ¥äººå§å', |
| | | reportphone: 'å¡«æ¥äººèç³»æ¹å¼', |
| | | diameter: '管å¾(mm)', |
| | | meterial: 'æè´¨', |
| | | pressuerating: '管éåå(Mpa)', |
| | | embeddingmode: 'å设æ¹å¼', |
| | | pipetrenchtype: '管æ²ç±»å', |
| | | datecollected: 'æ¢æµæ¶é´', |
| | | operationalstatus: 'è¿è¡ç¶æ', |
| | | fourtype: 'åéç±»å', |
| | | fourm: 'åéææ' |
| | | export const LAYERS = { |
| | | pipenetwork: '管ç½', |
| | | pipeline: '管线', |
| | | manhole: '窨äº', |
| | | valve: 'éé¨', |
| | | pipegallery: '管å»ï¼å¸¦ï¼', |
| | | piperack: '管æ¶ï¼å¢©ï¼', |
| | | tee: 'ä¸é', |
| | | fourlink: 'åé', |
| | | elbow: '弯头', |
| | | raingate: 'é¨ç¯¦å', |
| | | firedike: 'é²ç«å ¤', |
| | | collectingbasin: 'éæ°´æ± ï¼ç½ï¼', |
| | | dischargeport: 'ææ¾å£', |
| | | overflowweir: '溢æµå °', |
| | | oilseparator: 'éæ²¹æ± ', |
| | | pointhydrology: 'æ°´ä½', |
| | | pointpreservationzone: 'èªç¶ä¿æ¤åº', |
| | | hospital: 'å»é¢', |
| | | emergencyres: '社ä¼ä¸ä¸åºæ¥ææ´éä¼', |
| | | emergencyesources: 'åºæ¥ç©èµ', |
| | | firefightingunit: 'æ¶é²åä½' |
| | | } |
| | | |
| | | export const LAYERPROPS = { |
| | | // ç®¡ç½ |
| | | pipenetwork: { |
| | | // ç®¡ç½ |
| | | name: 'åç§°', |
| | | LINENUMTYPE: '管线类å', |
| | | PIPENAME: '管线åç§°', |
| | | MEDIUMTYPE: 'è¾éä»è´¨', |
| | | LENGTH: 'é¿åº¦(m)', |
| | | STARTPOSNAME: 'èµ·ç¹ä½ç½®åç§°', |
| | | ENDPOSNAME: 'ç»ç¹ä½ç½®åç§°', |
| | | BURIEDTIME: 'å设æ¶é´', |
| | | COATINGMATERIAL: 'é²è
ç¶åµ', |
| | | INSERVICETIME: 'æäº§æ¶é´', |
| | | UNITNAME: 'æå±åä½åç§°', |
| | | ORGNAME: 'æå±ä¼ä¸åç§°', |
| | | OPERATIONALSTATUS: 'è¿è¡ç¶æ' |
| | | }, |
| | | // 管线 |
| | | pipeline: { |
| | | // ç®¡ç½ |
| | | name: 'åç§°', |
| | | linenumtype: '管线类å', |
| | | pipename: '管线åç§°', |
| | | mediumtype: 'è¾éä»è´¨', |
| | | length: 'é¿åº¦(m)', |
| | | startposname: 'èµ·ç¹ä½ç½®åç§°', |
| | | endposname: 'ç»ç¹ä½ç½®åç§°', |
| | | buriedtime: 'å设æ¶é´', |
| | | coatingmaterial: 'é²è
ç¶åµ', |
| | | inservicetime: 'æäº§æ¶é´', |
| | | unitname: 'æå±åä½åç§°', |
| | | orgname: 'æå±ä¼ä¸åç§°', |
| | | operationalstatus: 'è¿è¡ç¶æ' |
| | | }, |
| | | // çª¨äº |
| | | manhole: { |
| | | type: 'ç±»å', |
| | | wellmaterial: 'äºçæè´¨', |
| | | havesafetynet: 'æ¯å¦æå®å
¨ç½', |
| | | datasource: 'æ°æ®æ¥æº', |
| | | operationalstatus: 'è¿è¡ç¶æ' |
| | | }, |
| | | // éé¨ |
| | | valve: { |
| | | valvetype: 'éé¨ç±»å', |
| | | executagencyf: 'æ§è¡æºæå½¢å¼', |
| | | datasource: 'æ°æ®æ¥æº', |
| | | operationalstatus: 'è¿è¡ç¶æ' |
| | | }, |
| | | // 管å»ï¼å¸¦ï¼ |
| | | pipegallery: { |
| | | datasource: 'æ°æ®æ¥æº', |
| | | operationalstatus: 'è¿è¡ç¶æ' |
| | | }, |
| | | // 管æ¶ï¼å¢©ï¼ |
| | | piperack: { |
| | | piperacktype: 'ç±»å', |
| | | piperackst: '管æ¶(墩ï¼ç»æç±»å', |
| | | longitudinalpiperack: 'æ¯å¦æçºµåæ¶', |
| | | datasource: 'æ°æ®æ¥æº', |
| | | operationalstatus: 'è¿è¡ç¶æ' |
| | | }, |
| | | // ä¸é |
| | | tee: { |
| | | teetype: 'ä¸éç±»å', |
| | | exportconnectm: 'åºå£è¿æ¥æ¹å¼', |
| | | entrycontype: 'å
¥å£è¿æ¥æ¹å¼', |
| | | teem: 'ä¸éææ', |
| | | branchconntype: 'æ¯ç®¡è¿æ¥ç±»å', |
| | | operationalstatus: 'è¿è¡ç¶æ' |
| | | }, |
| | | // åé |
| | | fourlink: { |
| | | fourtype: 'åéç±»å', |
| | | exportcontype: 'åºå£è¿æ¥æ¹å¼', |
| | | entrycontype: 'å
¥å£è¿æ¥æ¹å¼', |
| | | fourm: 'åéææ', |
| | | branchconntype1: 'æ¯çº¿1è¿æ¥æ¹å¼', |
| | | branchconntype2: 'æ¯çº¿2è¿æ¥æ¹å¼', |
| | | operationalstatus: 'è¿è¡ç¶æ' |
| | | }, |
| | | // 弯头 |
| | | elbow: { |
| | | elbowtype: '弯头类å', |
| | | elbowmaterial: '弯头ææ', |
| | | anticorros: 'é²è
ææ', |
| | | entryconntype: 'å
¥å£è¿æ¥æ¹å¼', |
| | | outletconntype: 'åºå£è¿æ¥æ¹å¼', |
| | | operationalstatus: 'è¿è¡ç¶æ' |
| | | }, |
| | | // é¨ç¯¦å |
| | | raingate: { |
| | | operationalstatus: 'è¿è¡ç¶æ' |
| | | }, |
| | | // é²ç«å ¤ |
| | | firedike: { |
| | | operationalstatus: 'è¿è¡ç¶æ' |
| | | }, |
| | | // éæ°´æ± ï¼ç½ï¼ |
| | | collectingbasin: { |
| | | operationalstatus: 'è¿è¡ç¶æ' |
| | | }, |
| | | // ææ¾å£ |
| | | dischargeport: { |
| | | mediumtype: 'ä»è´¨', |
| | | pfktype: 'ææ¾å£ç±»å', |
| | | level: '级å«', |
| | | operationalstatus: 'è¿è¡ç¶æ' |
| | | }, |
| | | // æªæµé¸ |
| | | |
| | | // 溢æµå ° |
| | | overflowweir: { |
| | | mediumtype: '鲿º¢ä»è´¨', |
| | | operationalstatus: 'è¿è¡ç¶æ' |
| | | }, |
| | | // éæ²¹æ± |
| | | oilseparator: { |
| | | operationalstatus: 'è¿è¡ç¶æ' |
| | | }, |
| | | // æ°´ä½ |
| | | pointhydrology: { |
| | | hydrotype: '水系类å', |
| | | drinkingresourceind: 'æ¯å¦æ¯é¥®ç¨æ°´æº', |
| | | seasonalriverind: 'æ¯å¦æ¯å£èæ§æ²³æµ', |
| | | reservoirlocation: 'æ°´åºä½ç½®', |
| | | operationalstatus: 'è¿è¡ç¶æ' |
| | | }, |
| | | // èªç¶ä¿æ¤åº |
| | | pointpreservationzone: { |
| | | datasource: 'æ°æ®æ¥æº' |
| | | }, |
| | | // å»é¢ |
| | | hospital: { |
| | | hospitalleaval: 'å»é¢èµè´¨ç级', |
| | | subtypecd: 'å»é¢ç±»å', |
| | | datasource: 'æ°æ®æ¥æº' |
| | | }, |
| | | // 社ä¼ä¸ä¸åºæ¥ææ´éä¼ |
| | | emergencyres: { |
| | | datasource: 'æ°æ®æ¥æº' |
| | | }, |
| | | // åºæ¥ç©èµ |
| | | emergencyesources: { |
| | | datasource: 'æ°æ®æ¥æº' |
| | | }, |
| | | // æ¶é²åä½ |
| | | firefightingunit: { |
| | | datasource: 'æ°æ®æ¥æº' |
| | | } |
| | | } |
| | |
| | | crs: L.CRS.EPSG4326, |
| | | minZoom: 3, |
| | | maxZoom: 21, |
| | | // center: [26, 104], |
| | | center: [34.828558921813965, 117.41676807403564], |
| | | zoom: 5, |
| | | // center: [39.907214641571045, 116.39019012451172], |
| | |
| | | sname: 'å
¬å¸', // 表å |
| | | checked: true, // é»è®¤éä¸ç¶æ |
| | | type: 0, |
| | | icon: 'sewers/å
¬å¸.png', |
| | | legendImage: '../.././assets/images/map/company_refining.png' |
| | | }, |
| | | { |
| | |
| | | sname: 'ç 头', |
| | | checked: false, // é»è®¤éä¸ç¶æ |
| | | type: 0, |
| | | icon: 'sewers/ç 头.png', |
| | | legendImage: '../.././assets/images/map/sewers/ç 头.png' |
| | | }, |
| | | { |
| | |
| | | name: 'è£
ç½®åº', |
| | | sname: 'è£
ç½®åº', |
| | | checked: false, // é»è®¤éä¸ç¶æ |
| | | icon: 'sewers/è£
ç½®åº.png', |
| | | typeName: 'sewer:unitareaboundary' |
| | | } |
| | | ] |
| | |
| | | minZoom: 16, |
| | | type: SERVICE_TYPE.WMS, |
| | | typeName: 'sewer:piperack', |
| | | icon: 'sewers/管æ¶.png', |
| | | checked: false |
| | | }, |
| | | { |
| | |
| | | minZoom: 16, |
| | | type: SERVICE_TYPE.WMS, |
| | | typeName: 'sewer:pipegallery', |
| | | icon: 'sewers/管å».png', |
| | | checked: false |
| | | }, |
| | | { |
| | |
| | | name: 'æµå', |
| | | sname: 'ywslx', |
| | | type: SERVICE_TYPE.WMS, |
| | | icon: 'sewers/æµå.png', |
| | | checked: false |
| | | }, |
| | | { |
| | |
| | | minZoom: 16, |
| | | type: SERVICE_TYPE.WMS, |
| | | typeName: 'sewer:firedike', |
| | | icon: 'sewers/é²ç«å ¤.png', |
| | | checked: false |
| | | }, |
| | | { |
| | |
| | | sname: 'æªæµé¸', |
| | | type: SERVICE_TYPE.WMS, |
| | | typeName: 'sewer:collectingbasin', |
| | | icon: 'sewers/æªæµé¸.png', |
| | | checked: false |
| | | }, |
| | | { |
| | |
| | | minZoom: 16, |
| | | type: SERVICE_TYPE.WMS, |
| | | typeName: 'ewer:overflowweir', |
| | | icon: 'sewers/溢æµå °.png', |
| | | checked: false |
| | | }, |
| | | { |
| | |
| | | code: 'rainline', |
| | | name: '鍿°´çº¿', |
| | | sname: '管ç½', |
| | | checked: false, |
| | | checked: true, |
| | | type: SERVICE_TYPE.WMS, |
| | | layerGroup: 'sewer:pipeline_group', |
| | | typeName: 'sewer:pipeline', |
| | |
| | | type: SERVICE_TYPE.WMS, |
| | | layerGroup: 'sewer:pipeline_group', |
| | | typeName: 'sewer:pipeline', |
| | | icon: 'sewers/äºæ
æ°´.png', |
| | | minZoom: 13, |
| | | filter: 'mediumtype = \'äºæ
æ°´\'', |
| | | index: 1 |
| | |
| | | type: SERVICE_TYPE.WMS, |
| | | layerGroup: 'sewer:pipeline_group', |
| | | typeName: 'sewer:pipeline', |
| | | icon: 'sewers/嫿²¹æ±¡æ°´.png', |
| | | minZoom: 13, |
| | | color: '#ffaa00', |
| | | filter: 'mediumtype = \'嫿²¹æ±¡æ°´\'', |
| | |
| | | type: SERVICE_TYPE.WMS, |
| | | layerGroup: 'sewer:pipeline_group', |
| | | typeName: 'sewer:pipeline', |
| | | icon: 'sewers/å«ç污水.png', |
| | | minZoom: 13, |
| | | filter: 'mediumtype = \'å«ç污水\'', |
| | | index: 1 |
| | |
| | | type: SERVICE_TYPE.WMS, |
| | | layerGroup: 'sewer:pipeline_group', |
| | | typeName: 'sewer:pipeline', |
| | | icon: 'sewers/å«ç¢±æ±¡æ°´.png', |
| | | filter: 'mediumtype = \'å«ç¢±æ±¡æ°´\'', |
| | | minZoom: 10, |
| | | index: 1 |
| | |
| | | type: SERVICE_TYPE.WMS, |
| | | layerGroup: 'sewer:pipeline_group', |
| | | typeName: 'sewer:pipeline', |
| | | icon: 'sewers/å«ç¡«æ±¡æ°´.png', |
| | | filter: 'mediumtype = \'å«ç¡«æ±¡æ°´\'', |
| | | minZoom: 10, |
| | | index: 1 |
| | |
| | | type: SERVICE_TYPE.WMS, |
| | | layerGroup: 'sewer:pipeline_group', |
| | | typeName: 'sewer:pipeline', |
| | | icon: 'sewers/çæ´»æ±¡æ°´.png', |
| | | filter: 'mediumtype = \'çæ´»æ±¡æ°´\'', |
| | | minZoom: 13, |
| | | index: 1 |
| | |
| | | type: SERVICE_TYPE.WMS, |
| | | layerGroup: 'sewer:pipeline_group', |
| | | typeName: 'sewer:pipeline', |
| | | icon: 'sewers/ååæ°´.png', |
| | | filter: 'mediumtype = \'ååæ°´\'', |
| | | minZoom: 13, |
| | | index: 1 |
| | |
| | | type: SERVICE_TYPE.WMS, |
| | | layerGroup: 'sewer:pipeline_group', |
| | | typeName: 'sewer:pipeline', |
| | | icon: 'sewers/å¾ªç¯æ°´.png', |
| | | filter: 'mediumtype = \'å¾ªç¯æ°´\'', |
| | | checked: false, |
| | | minZoom: 13, |
| | |
| | | type: SERVICE_TYPE.WMS, |
| | | layerGroup: 'sewer:pipeline_group', |
| | | typeName: 'sewer:pipeline', |
| | | icon: 'sewers/ç产污水.png', |
| | | filter: 'mediumtype = \'ç产污水\'', |
| | | minZoom: 13, |
| | | color: '#a8a800', |
| | |
| | | * è岿æ |
| | | */ |
| | | export function pulseEffect (xy) { |
| | | let times = 5 |
| | | const colors = ['#98FB98', '#ff0000'] |
| | | let times = 50 |
| | | const colors = ['#00f100', '#ff0000'] |
| | | // æä»¶ ææå®ç° |
| | | var pulsingIcon = window.L.icon.pulse({ |
| | | iconSize: [20, 20], |
| | | iconSize: [30, 30], |
| | | color: colors[0], |
| | | fillColor: '' |
| | | }) |
| | | var picGroupMarker = window.L.marker(xy, { icon: pulsingIcon }).addTo(window.map) |
| | | var picGroupMarker = window.L.marker(xy, { icon: pulsingIcon }).addTo(window.mapManager.hightlightLayer) |
| | | // 宿¶ |
| | | var timeInterval = setInterval(() => { |
| | | if (times > 0) { |
| | |
| | | }, 1000) |
| | | } |
| | | |
| | | export function reversePolyLine (feature) { |
| | | const coordinates = feature.geometry.coordinates |
| | | var latlng = [] |
| | | for (var j = 0; j < coordinates.length; j++) { |
| | | const coordinate = coordinates[j] |
| | | latlng.push(coordinate.reverse()) |
| | | } |
| | | return latlng |
| | | } |
| | | |
| | | export function reverseMultiLine (feature) { |
| | | const coordinates = feature.geometry.coordinates |
| | | var latlng = [] |
| | | for (var j = 0; j < coordinates.length; j++) { |
| | | const coordinate = coordinates[j] |
| | | var xy = [] |
| | | for (var k = 0; k < coordinate.length; k++) { |
| | | const coor = coordinate[k] |
| | | xy.push(coor.reverse()) |
| | | } |
| | | latlng.push(xy) |
| | | } |
| | | return latlng |
| | | } |
| | | |
| | | /** |
| | | * 设置弹çªå¹³ç§»ä½ç½® |
| | | * @param pos |
| | |
| | | // // å
Œ
±å±ç¤ºæ°æ® |
| | | // import PublicBounced from '@components/BaseNav/PublicBounced/PublicBounced' |
| | | import LayerFactory from '@components/LayerController/service/LayerFactory' |
| | | import EventHandler from '../components/LayerController/event/EventHandler' |
| | | // import ReportPopup from '../components/panel/topicSearch/SewersSelect/EnterpriseEmergency/ReportPopup' |
| | | import Emergency from '@components/emergency/index' |
| | | import MapManager from '../components/helpers/MapManager' |
| | | |
| | | export default { |
| | | name: 'MapTemplate', |
| | |
| | | |
| | | // this.AddGasHelper() |
| | | // this.ChangeWaterState() |
| | | |
| | | var eventHandler = new EventHandler() |
| | | window.eventHandler = eventHandler |
| | | |
| | | var layerFactory = new LayerFactory({ |
| | | L: window.L, |
| | | map: this.map |
| | |
| | | layerFactory.init(this.$store.state.map.serviceLayers.LayerSewersLine) |
| | | layerFactory.initEvent(this.$store.state.map.serviceLayers.LayerSewersLine) |
| | | window.layerFactory = layerFactory |
| | | window.mapManager = new MapManager() |
| | | window.mapManager.mapClickListener() |
| | | this.saveMapStatus() |
| | | // this.setMapObj(this.mapObj) |
| | | // this.setBasemapHelper(this.basemapHelper) |
| | |
| | | <template> |
| | | <div id="popup" class="s-map-popup-panel" style="min-width: 280px;max-width: 280px;padding: 0 10px"> |
| | | <el-tabs value="0" type="card"> |
| | | <el-tabs type="card" :value="0"> |
| | | <el-tab-pane |
| | | :key="item.name" |
| | | :key="index" |
| | | v-for="(item,index) in datas" |
| | | :label="item.title" |
| | | :name="index" |
| | | :name="index.toString()" |
| | | > |
| | | <el-row v-for="(v,k) in filter(item.content)" :key="k"> |
| | | <el-col :span="12"><B>{{k}}ï¼</B></el-col> |
| | | <el-col :span="12">{{v}}</el-col> |
| | | <el-row v-for="(item,key) in item.content" :key="key"> |
| | | <el-col :span="12"><B>{{key}}ï¼</B></el-col> |
| | | <el-col :span="12">{{item}}</el-col> |
| | | </el-row> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | |
| | | |
| | | <script> |
| | | // import '@/assets/css/map/map-popup.scss' |
| | | import { props } from '../../conf/Constants' |
| | | |
| | | export default { |
| | | name: 'Popup', |
| | |
| | | tabsValue: '', |
| | | tabIndex: 2, |
| | | isShow: false, |
| | | properties: {}, |
| | | props: props |
| | | properties: {} |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | // console.log(obj) |
| | | return obj |
| | | }, |
| | | setDatas (layer) { |
| | | console.log(layer) |
| | | this.datas = layer |
| | | this.tabsValue = layer[0].name |
| | | }, |
| | | setShow () { |
| | | // this.style.display='auto' |
| | | this.isShow = true |
| | |
| | | }, |
| | | watch: { |
| | | datas (newVal) { |
| | | console.log(newVal) |
| | | if (newVal != null) { |
| | | this.tabsValue = newVal[0].name |
| | | } |