From c6c504aeac112db2ee60f9af7a994a04b9fa4ed5 Mon Sep 17 00:00:00 2001 From: 陈泽平 <chenzeping> Date: 星期三, 19 五月 2021 16:05:23 +0800 Subject: [PATCH] 事件上报修改 --- src/components/panel/topicSearch/EnterpriseEmergency/ResourcesQuery.vue | 28 ++++++++++++++++++++++++---- 1 files changed, 24 insertions(+), 4 deletions(-) diff --git a/src/components/panel/topicSearch/EnterpriseEmergency/ResourcesQuery.vue b/src/components/panel/topicSearch/EnterpriseEmergency/ResourcesQuery.vue index 3c9a2ee..05777b2 100644 --- a/src/components/panel/topicSearch/EnterpriseEmergency/ResourcesQuery.vue +++ b/src/components/panel/topicSearch/EnterpriseEmergency/ResourcesQuery.vue @@ -53,17 +53,22 @@ </template> <script> +// wfs ajax 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 { locate } from '../../../helpers/LocateHelper' +// import { fitBounds, highlight, locate, openPropsPopup } from '../../../helpers/LocateHelper' export default { name: 'ResourcesQuery', data () { return { + // form 琛ㄥ崟缁戝畾鏁版嵁 form: { eventName: '', pipelineType: LayerEmergencySource.name, @@ -74,11 +79,16 @@ { name: '鍗椾含鍖栧' } ] }, + // 鎼滅储鍒扮殑鏁版嵁缁戝畾鐨刟ctive鐨勬牱寮� activeNum: -1, + // 鎼滅储鍒扮殑鏁版嵁杩涜瀛樺偍鐨刲ist list: [], + // form琛ㄥ崟缁戝畾鐨勫浘灞傛暟鎹� items: [LayerEmergencySource, LayerSurroundings], subItems: LayerEmergencySource.layers || LayerSurroundings.layers, + // wfs WfsHelper: null, + // 搴旀�� || 鍛ㄨ竟 鐨勫尯鍒嗙粦瀹氭暟鎹� changeAmount: '璧勬簮' } }, @@ -86,11 +96,13 @@ this.wfsHelper = new WfsHelper() }, methods: { + // 鎼滅储灞曠ず鍥剧墖鏍规嵁杩斿洖鍊煎睍绀� getImgSrc (type) { // console.log(type) // const icon = this.form.dataType.icon return 'assets/images/map/sewers/' + type + '.png' }, + // form 琛ㄥ崟閫夋嫨鏁版嵁鏁版嵁閫夋嫨鍒嗛厤 handlePipelineType (val) { // console.log(val) this.list = [] @@ -109,10 +121,12 @@ this.changeAmount = '鐜' } }, + // 浜岀骇from琛ㄥ崟閫夋嫨鏁版嵁娓呯┖ 宸叉湁灞曠ず鏁版嵁 handleDataType (val) { // console.log(val) this.list = [] }, + // 鐐瑰嚮鎼滅储浜嬩欢 async handleSearch () { this.list = [] this.wfsHelper.clearFilter() @@ -128,16 +142,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 positionArea = [val.properties.y, val.properties.x] + window.map.setView(positionArea, 17) + pulseEffect(positionArea) + // const config = this.form.dataType + // locate(val, config) + // fitBounds(val, this.form.dataType.code) + // highlight(val, this.form.dataType) } } } -- Gitblit v1.8.0