From f3f40bb001079b2668d0e4548b7154671fcd8889 Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Sat, 18 Feb 2023 09:47:30 +0800
Subject: [PATCH] 安保活动地图选点优化,系统 相关console.log 去除

---
 src/components/map/searchMap.vue |   20 ++++++++++++++++++--
 1 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/src/components/map/searchMap.vue b/src/components/map/searchMap.vue
index 1f414a3..14e55d0 100644
--- a/src/components/map/searchMap.vue
+++ b/src/components/map/searchMap.vue
@@ -67,6 +67,7 @@
       this.longitude = data[0]
       this.latitude = data[1]
       this.$emit("getLonLat", data)
+      
     },
     remoteMethod(data) {
       this.queryString = data
@@ -93,8 +94,23 @@
       let location = this.longitude + " " + this.latitude
       searchByLonLat(ak, query, region, region_type, page_size, page_num, infos, radius, location).then(res => {
         let data = res.data.result[0]
-        this.queryString = data.address
-        this.$emit("getAddress", this.queryString)
+        if(data!=undefined){
+          this.queryString = data.address
+          this.$emit("getAddress", this.queryString)
+          let point = [data.location.lng,data.location.lat]
+          this.$emit("getLonLat", point)
+          //清空
+          this.searchList = []
+          //触发搜索
+          this.getAddressByQuery()
+        }else{
+          this.queryString = [];
+          //清空
+          this.searchList = []
+          this.$emit("getAddress", '')
+          this.$emit("getLonLat", ['',''])
+        }
+        
       })
     },
     selectChange(data) {

--
Gitblit v1.9.3