From e3c2da34f27e3f65b5885846dab478f4af20ffe6 Mon Sep 17 00:00:00 2001 From: lixuliang <lixuliang_hd@126.com> Date: 星期五, 15 三月 2024 09:50:14 +0800 Subject: [PATCH] console --- src/components/leftMenu/sousuo2.vue | 64 ++++++++++++++++++++++++++++---- 1 files changed, 56 insertions(+), 8 deletions(-) diff --git a/src/components/leftMenu/sousuo2.vue b/src/components/leftMenu/sousuo2.vue index 9686f35..27dd400 100644 --- a/src/components/leftMenu/sousuo2.vue +++ b/src/components/leftMenu/sousuo2.vue @@ -5,7 +5,10 @@ <span @click="ssjmxs" style="float: left; height: 100%; width: 80%; overflow: hidden" - ><i class="el-icon-search" style="padding: 0px 15px 0px 20px;font-size: 0.15rem;"></i + ><i + class="el-icon-search" + style="padding: 0px 15px 0px 20px; font-size: 0.15rem" + ></i >{{ syssval }}</span > <span @@ -150,7 +153,6 @@ width: 0.8rem; position: relative; font-size: 0.14rem; - } .el-select:after { content: ""; @@ -209,7 +211,7 @@ line-height: 20px; } .ssjg .addressBox { - text-indent: 27px; + margin-left: 27px; margin-top: 5px; color: #000; font-weight: 500; @@ -349,7 +351,7 @@ rectangle.maxy > 31.182515322 && (rectangle.maxy = 31.182515322); return `RECT(${rectangle.minx} ${rectangle.miny},${rectangle.maxx} ${rectangle.maxy})`; }, - getPoi() { + getGdPoi() { axios .get(common.poiserve, { params: { @@ -362,8 +364,6 @@ }, }) .then((res) => { - // 楂樺痉 - console.log("poiserve"); if (res.data.status == "1") { res.data.pois && res.data.pois @@ -395,6 +395,54 @@ pname: val.province, type: val.type, typecode: val.typecode, + }; + Allresults.push(obj); + }); + } + this.total = Allresults.length; + this.poiList = Allresults; + this.showList = true; + }); + }, + getBdPoi() { + axios + .get(common.poiserve, { + params: { + request: "bdPoi", + query: this.poi_text, + output: "json", + coord: "cgcs2000", + page_num: 1, + page_size: 30, + }, + }) + .then((res) => { + console.log(res); + if (res.data.status == 0) { + res.data.results && + res.data.results + .filter((item) => { + var reg = new RegExp("[\\u4E00-\\u9FFF]+", "g"); + return ( + item.city.includes("鍖椾含") && + item.name.includes(this.poi_text) + ); + }) + .forEach((val) => { + let poiarr = val.location.split(","); + let poi = { + lon: parseFloat(poiarr[0]), + lat: parseFloat(poiarr[1]), + }; + let obj = { + address: val.address, + adname: val.area, + cityname: val.city, + id: val.uid, + lat: val.location.lat, + lng: val.location.lng, + name: val.name, + pname: val.province, }; Allresults.push(obj); }); @@ -454,7 +502,7 @@ this.poiList = []; switch (this.select) { case "鍏ㄩ儴": - this.getPoi(); + this.getBdPoi(); this.getData(); // axios // .all([ @@ -580,7 +628,7 @@ // ); break; case "POI": - this.getPoi(); + this.getBdPoi(); break; case "鍦板潡": this.getData(); -- Gitblit v1.9.3