From be771111fb2a9770a9fbf13c5d7e976bf8688b6d Mon Sep 17 00:00:00 2001
From: 陈泽平 <chenzeping>
Date: 星期二, 18 五月 2021 11:08:38 +0800
Subject: [PATCH] 问题修改
---
src/components/panel/topicSearch/EnterpriseEmergency/ResourcesQuery.vue | 20 ++++++++++++++------
1 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/src/components/panel/topicSearch/EnterpriseEmergency/ResourcesQuery.vue b/src/components/panel/topicSearch/EnterpriseEmergency/ResourcesQuery.vue
index 6f9f0e8..5c2f333 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>
@@ -59,6 +59,8 @@
import { LayerEmergencySource } from '../../../../conf/layers/LayerEmergencySource'
import { LayerSurroundings } from '../../../../conf/layers/LayerSurroundings'
import { pulseEffect } from '../../../../utils/utils'
+import { openPopup } from '../../../helpers/LocateHelper'
+// import { fitBounds, highlight, openPopup } from '../../helpers/LocateHelper'
export default {
name: 'ResourcesQuery',
@@ -78,7 +80,8 @@
list: [],
items: [LayerEmergencySource, LayerSurroundings],
subItems: LayerEmergencySource.layers || LayerSurroundings.layers,
- WfsHelper: null
+ WfsHelper: null,
+ changeAmount: '璧勬簮'
}
},
mounted () {
@@ -102,8 +105,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 +130,19 @@
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 positionArea = [val.properties.y, val.properties.x]
+ window.map.setView(positionArea, 16)
+ pulseEffect(positionArea)
+ openPopup(positionArea, val.id)
}
}
}
--
Gitblit v1.8.0