From 58fe00c41f4c499b604d2c504542dbb1272382f2 Mon Sep 17 00:00:00 2001 From: 陈泽平 <chenzeping> Date: 星期二, 18 五月 2021 20:35:47 +0800 Subject: [PATCH] 管线问题修改 --- src/components/panel/topicSearch/EnterpriseEmergency/ResourcesQuery.vue | 26 ++++++++++++++++++-------- 1 files changed, 18 insertions(+), 8 deletions(-) diff --git a/src/components/panel/topicSearch/EnterpriseEmergency/ResourcesQuery.vue b/src/components/panel/topicSearch/EnterpriseEmergency/ResourcesQuery.vue index 6f9f0e8..a0f5f65 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.type}}</h3> - <h5>璧勬簮鍚嶇О:{{item.properties.companyname}}</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> @@ -55,10 +55,11 @@ <script> import WfsHelper from '@components/helpers/WfsHelper' import AjaxUtils from '@utils/AjaxUtils' -// import { LayerEmergency } from '../../../../../conf/LayerEmergency' import { LayerEmergencySource } from '../../../../conf/layers/LayerEmergencySource' import { LayerSurroundings } from '../../../../conf/layers/LayerSurroundings' -import { pulseEffect } from '../../../../utils/utils' +// import { pulseEffect } from '../../../../utils/utils' +import { locate } from '../../../helpers/LocateHelper' +// import { fitBounds, highlight, locate, openPropsPopup } from '../../../helpers/LocateHelper' export default { name: 'ResourcesQuery', @@ -78,7 +79,8 @@ list: [], items: [LayerEmergencySource, LayerSurroundings], subItems: LayerEmergencySource.layers || LayerSurroundings.layers, - WfsHelper: null + WfsHelper: null, + changeAmount: '璧勬簮' } }, mounted () { @@ -102,8 +104,10 @@ } if (this.form.pipelineType === '搴旀�ヨ祫婧�') { this.subItems = LayerEmergencySource.layers + this.changeAmount = '璧勬簮' } else if (this.form.pipelineType === '鍛ㄨ竟鐜') { this.subItems = LayerSurroundings.layers + this.changeAmount = '鐜' } }, handleDataType (val) { @@ -125,16 +129,22 @@ this.wfsHelper.addLike('name', this.form.keyword) } const res = await AjaxUtils.GetDataAsynByUrl(this.wfsHelper.getUrl(), {}) - console.log(res) + // console.log(res) if (res instanceof Object && Object.prototype.hasOwnProperty.call(res, 'features')) { this.list = res.features } }, // 鏌ヨ瀹氫綅鍔熻兘 handleLocation (val, index) { + console.log(val) this.activeNum = index - window.map.setView([val.properties.y, val.properties.x], 16) - pulseEffect([val.properties.y, val.properties.x]) + const config = this.form.dataType + locate(val, config) + // const positionArea = [val.properties.y, val.properties.x] + // window.map.setView(positionArea, 17) + // pulseEffect(positionArea) + // fitBounds(val, this.form.dataType.code) + // highlight(val, this.form.dataType) } } } -- Gitblit v1.8.0