From ba812327b996634e5ba0c33ccb422d9d02ebf547 Mon Sep 17 00:00:00 2001 From: 徐旺旺 <11530253@qq.com> Date: 星期一, 17 五月 2021 14:34:34 +0800 Subject: [PATCH] Merge branch 'develop' of http://xearth.cn:6600/r/wuyushui/SewerAndRainNetwork into develop --- src/components/LayerController/logic/SourcesPollution.js | 16 +++++++ src/components/panel/topicSearch/EnterpriseEmergency/ResourcesQuery.vue | 5 +- src/conf/MapConfig.js | 1 src/components/LayerController/logic/Company.js | 43 ++++++++------------- src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue | 12 ++--- src/components/panel/topicSearch/DischargeSearch.vue | 2 6 files changed, 41 insertions(+), 38 deletions(-) diff --git a/src/components/LayerController/logic/Company.js b/src/components/LayerController/logic/Company.js index 8c4bd07..d6b7ea2 100644 --- a/src/components/LayerController/logic/Company.js +++ b/src/components/LayerController/logic/Company.js @@ -1,6 +1,7 @@ /** - * 鍥哄簾 + * 浼佷笟 */ + // 鍖哄垎涓嶅悓绫诲瀷 浣跨敤涓嶅悓img const companyImg = '/assets/images/map/company_refining.png' const companyOil = '/assets/images/map/company_oil.png' @@ -14,7 +15,6 @@ * @param L leaflet瀵硅薄 */ this.init = async (layer, L) => { - // const SolidWasteIcon = this.SolidWasteIcon() this.animalService = new AnimalService({ L: L, layer: layer @@ -39,23 +39,10 @@ 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) } } @@ -63,23 +50,27 @@ * 鐐逛綅榧犳爣绉诲叆寮规 * */ 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 + // } } } diff --git a/src/components/LayerController/logic/SourcesPollution.js b/src/components/LayerController/logic/SourcesPollution.js index a701f1c..27899ce 100644 --- a/src/components/LayerController/logic/SourcesPollution.js +++ b/src/components/LayerController/logic/SourcesPollution.js @@ -14,9 +14,23 @@ 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: '' + }) + } } diff --git a/src/components/panel/topicSearch/DischargeSearch.vue b/src/components/panel/topicSearch/DischargeSearch.vue index f0fd797..f29036a 100644 --- a/src/components/panel/topicSearch/DischargeSearch.vue +++ b/src/components/panel/topicSearch/DischargeSearch.vue @@ -170,7 +170,7 @@ methods: { flyto () { const pos = [39.90751504898071, 116.38927817344666] - window.map.flyTo(pos, 15) + window.map.setView(pos, 15) }, // 鍖哄煙绛涢�� areaType (val) { diff --git a/src/components/panel/topicSearch/EnterpriseEmergency/ResourcesQuery.vue b/src/components/panel/topicSearch/EnterpriseEmergency/ResourcesQuery.vue index 40bc1b5..6f9f0e8 100644 --- a/src/components/panel/topicSearch/EnterpriseEmergency/ResourcesQuery.vue +++ b/src/components/panel/topicSearch/EnterpriseEmergency/ResourcesQuery.vue @@ -43,8 +43,8 @@ <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> @@ -125,6 +125,7 @@ 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 } diff --git a/src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue b/src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue index 9b9785b..78533f5 100644 --- a/src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue +++ b/src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue @@ -526,12 +526,10 @@ 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) @@ -561,11 +559,11 @@ }, 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) }, diff --git a/src/conf/MapConfig.js b/src/conf/MapConfig.js index ec1f64e..4cae2f1 100644 --- a/src/conf/MapConfig.js +++ b/src/conf/MapConfig.js @@ -23,7 +23,6 @@ crs: L.CRS.EPSG4326, minZoom: 3, maxZoom: 21, - // center: [26, 104], center: [34.828558921813965, 117.41676807403564], zoom: 5, // center: [39.907214641571045, 116.39019012451172], -- Gitblit v1.8.0