From 5b9ce5682127d1b7305cd3f2fe2e182de178bb98 Mon Sep 17 00:00:00 2001 From: 徐旺旺 <11530253@qq.com> Date: 星期一, 15 三月 2021 17:03:17 +0800 Subject: [PATCH] 搜索面板查询结果bug修复 --- src/components/panel/topicSearch/SewersSearch.vue | 16 ++++++---------- 1 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/components/panel/topicSearch/SewersSearch.vue b/src/components/panel/topicSearch/SewersSearch.vue index 1b709f2..9012ad0 100644 --- a/src/components/panel/topicSearch/SewersSearch.vue +++ b/src/components/panel/topicSearch/SewersSearch.vue @@ -37,7 +37,6 @@ </el-form> </div> <el-scrollbar style="height:100%"> - <el-card class="search-result" > <div class="B-TMD-table-list" v-for="(item,index) in list" :key="index"> <div class="B-TMD-table-list-title"> <div class="B-TMD-table-list-head"> @@ -79,7 +78,6 @@ <!-- 璐х墿鍚嶇О锛�<span :title="item.materialName">{{ item.materialName }}</span></div>--> <!-- </div>--> </div> - </el-card> </el-scrollbar> <el-card class="footer-page" v-if="total > 10"> <el-pagination @@ -152,7 +150,7 @@ } }) }, - handleSearch () { + async handleSearch () { const param = { pipelineType: this.form.pipelineType, dataType: this.form.dataType @@ -162,17 +160,15 @@ wfsHelper.addTypeName(this.form.query.layerName) wfsHelper.addLike(this.form.query.key, this.form.keyword) // const _this = this - AjaxUtils.GetDataAsynByUrl(wfsHelper.getUrl(), {}, (res) => { - console.log(res) - this.list = res.features - }) + const res = await AjaxUtils.GetDataAsynByUrl(wfsHelper.getUrl(), {}) + if (res.data instanceof Object && Object.prototype.hasOwnProperty.call(res.data, 'features')) { + this.list = res.data.features + } }, handleLocation (val) { console.log(val) const bound = this.L.geoJSON([val], {}).getBounds() - console.log(bound) var layer = window.serviceLayerHelper.getByLayerId(val.id) - console.log(layer) layer && layer.openPopup() this.$store.state.map.map.flyToBounds(bound) } @@ -181,6 +177,7 @@ </script> <style lang="less" scoped> + .sewers-search{ position: relative; overflow: hidden; @@ -209,7 +206,6 @@ //location-btn{ // //} - .location-btn:hover,.el-input__icon:hover{ color: @color; cursor: pointer; -- Gitblit v1.8.0