From 3b1b5623e44135a8e693698cb7a30adf66d86964 Mon Sep 17 00:00:00 2001
From: 陈泽平 <chenzeping>
Date: 星期二, 18 五月 2021 15:42:33 +0800
Subject: [PATCH] 管线问题修改

---
 src/components/panel/topicSearch/EnterpriseEmergency/ResourcesQuery.vue |   23 ++++++++++++++++-------
 1 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/src/components/panel/topicSearch/EnterpriseEmergency/ResourcesQuery.vue b/src/components/panel/topicSearch/EnterpriseEmergency/ResourcesQuery.vue
index 6f9f0e8..0d18d91 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 { openPopup } from '../../../helpers/LocateHelper'
+// import { fitBounds, highlight } 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,21 @@
         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)
+      openPopup(positionArea, val.id)
+      // fitBounds(val, this.form.dataType.code)
+      // highlight(val, this.form.dataType)
     }
   }
 }

--
Gitblit v1.8.0