|
@@ -13,12 +13,15 @@
|
|
<el-select
|
|
<el-select
|
|
class="serchShop"
|
|
class="serchShop"
|
|
v-model="serchmsg"
|
|
v-model="serchmsg"
|
|
- multiple
|
|
|
|
filterable
|
|
filterable
|
|
remote
|
|
remote
|
|
reserve-keyword
|
|
reserve-keyword
|
|
placeholder="搜索商铺名称或商铺编号"
|
|
placeholder="搜索商铺名称或商铺编号"
|
|
:remote-method="serchShop"
|
|
:remote-method="serchShop"
|
|
|
|
+ @change="serchShopChange"
|
|
|
|
+ :clearable="true"
|
|
|
|
+ @clear="clearShop"
|
|
|
|
+ prefix-icon="el-icon-search"
|
|
>
|
|
>
|
|
<el-option
|
|
<el-option
|
|
v-for="item in options"
|
|
v-for="item in options"
|
|
@@ -309,20 +312,36 @@ export default {
|
|
...mapGetters(["plazaId", "fmapID", "haveFengMap", "bunkObj"]),
|
|
...mapGetters(["plazaId", "fmapID", "haveFengMap", "bunkObj"]),
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- // 检索
|
|
|
|
- // 搜索商铺
|
|
|
|
|
|
+ // 检索获取对应的商铺信息
|
|
serchShop(query) {
|
|
serchShop(query) {
|
|
if (query !== "") {
|
|
if (query !== "") {
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
this.options = this.serchlist.filter((item) => {
|
|
this.options = this.serchlist.filter((item) => {
|
|
return item.label.toLowerCase().indexOf(query.toLowerCase()) > -1;
|
|
return item.label.toLowerCase().indexOf(query.toLowerCase()) > -1;
|
|
});
|
|
});
|
|
- console.log("query", this.options);
|
|
|
|
- }, 200);
|
|
|
|
|
|
+ });
|
|
} else {
|
|
} else {
|
|
this.options = [];
|
|
this.options = [];
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ // 清空商铺
|
|
|
|
+ clearShop(msg){
|
|
|
|
+ this.options = [];
|
|
|
|
+ this.serchmsg = '';
|
|
|
|
+ this.visible = false;
|
|
|
|
+ this.clearHightLight();
|
|
|
|
+ },
|
|
|
|
+ // 选择商铺发生变化后的回调函数
|
|
|
|
+ serchShopChange(msg,data){
|
|
|
|
+ msg.split('—')[0]
|
|
|
|
+ this.options.forEach((shopItem)=>{
|
|
|
|
+ if(shopItem.value == msg){
|
|
|
|
+ shopItem.item;
|
|
|
|
+ // 高亮商铺
|
|
|
|
+ this.clickMapPlace(shopItem.item);
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
/**
|
|
/**
|
|
* 点击图标事件
|
|
* 点击图标事件
|
|
*
|
|
*
|
|
@@ -468,6 +487,9 @@ export default {
|
|
},
|
|
},
|
|
handleClickHightLight(pointData) {
|
|
handleClickHightLight(pointData) {
|
|
this.clearHightLight();
|
|
this.clearHightLight();
|
|
|
|
+ // 清空商铺
|
|
|
|
+ this.clearShop()
|
|
|
|
+
|
|
pointData.forEach((point) => {
|
|
pointData.forEach((point) => {
|
|
let location = point.id ? point.id : "";
|
|
let location = point.id ? point.id : "";
|
|
// if (this.wellMap.hasOwnProperty(location)) {
|
|
// if (this.wellMap.hasOwnProperty(location)) {
|
|
@@ -864,6 +886,8 @@ export default {
|
|
this.visible = false;
|
|
this.visible = false;
|
|
}
|
|
}
|
|
this.clearHightLight();
|
|
this.clearHightLight();
|
|
|
|
+ // 清空搜索框
|
|
|
|
+ this.clearShop()
|
|
},
|
|
},
|
|
// 选中电井关联的商铺高亮
|
|
// 选中电井关联的商铺高亮
|
|
setHightLight(arr) {
|
|
setHightLight(arr) {
|