| | |
| | | <template> |
| | | <div id="sousuo" class="sousuo"> |
| | | <!-- 搜索框 --> |
| | | <div class="ssk" v-show="ssk.show"> |
| | | <div class="ssk" v-if="ssk.show"> |
| | | <span |
| | | @click="ssjmxs" |
| | | style="float: left; height: 100%; width: 80%; overflow: hidden" |
| | | ><i class="el-icon-search" style="padding: 0px 15px 0px 20px"></i |
| | | ><i |
| | | class="el-icon-search" |
| | | style="padding: 0px 15px 0px 20px; font-size: 0.15rem" |
| | | ></i |
| | | >{{ syssval }}</span |
| | | > |
| | | <span |
| | |
| | | </span> --> |
| | | </div> |
| | | <!-- 搜索界面 --> |
| | | <div class="ssjm" v-show="ssjm"> |
| | | <div class="ssjm" v-if="ssjm"> |
| | | <!-- 搜索框 --> |
| | | <div class="search-container" style="margin: 0.1rem 0"> |
| | | <div class="search-container"> |
| | | <div class="back" @click="cancless"></div> |
| | | <el-input |
| | | placeholder="输入关键字搜索地图" |
| | |
| | | height: 0.4rem; |
| | | line-height: 0.4rem; |
| | | background: #fff; |
| | | border-radius: 0.15rem; |
| | | border-radius: 0.14rem; |
| | | color: black; |
| | | font-size: 0.14rem; |
| | | } |
| | |
| | | width: 100%; |
| | | height: 100%; |
| | | top: 0; |
| | | left: 0; |
| | | background-color: #f3f3f3; |
| | | z-index: 99; |
| | | } |
| | |
| | | .el-input /deep/ .el-input__inner { |
| | | border: none; |
| | | font-weight: 500; |
| | | font-size: 17px; |
| | | font-size: 0.14rem; |
| | | color: #3e3d3d; |
| | | } |
| | | .el-select { |
| | | width: 80px; |
| | | width: 0.8rem; |
| | | position: relative; |
| | | font-size: 0.14rem; |
| | | } |
| | | .el-select:after { |
| | | content: ""; |
| | |
| | | padding-right: 25px; |
| | | } |
| | | .el-input /deep/ .el-input-group__append .el-button { |
| | | font-size: 15px; |
| | | font-size: 0.14rem; |
| | | color: #ffffff; |
| | | line-height: 17px; |
| | | background: #2477ff; |
| | | border-radius: 13px; |
| | | padding: 10px; |
| | | width: 62px; |
| | | height: 33px; |
| | | } |
| | | |
| | | .el-scrollbar .hover { |
| | |
| | | line-height: 20px; |
| | | } |
| | | .ssjg .addressBox { |
| | | text-indent: 27px; |
| | | margin-left: 27px; |
| | | margin-top: 5px; |
| | | color: #000; |
| | | font-weight: 500; |
| | |
| | | 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: { |
| | |
| | | }, |
| | | }) |
| | | .then((res) => { |
| | | // 高德 |
| | | console.log("poiserve"); |
| | | if (res.data.status == "1") { |
| | | res.data.pois && |
| | | res.data.pois |
| | |
| | | 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); |
| | | }); |
| | |
| | | this.poiList = []; |
| | | switch (this.select) { |
| | | case "全部": |
| | | this.getPoi(); |
| | | this.getBdPoi(); |
| | | this.getData(); |
| | | // axios |
| | | // .all([ |
| | |
| | | // ); |
| | | break; |
| | | case "POI": |
| | | this.getPoi(); |
| | | this.getBdPoi(); |
| | | break; |
| | | case "地块": |
| | | this.getData(); |