Browse Source

地址栏,按下回车,即开始搜索

feature
tianq 2 years ago
parent
commit
77bcdfdfec
  1. 1
      src/views/modules/shequzhili/tuceng/anquan/anquanxuncha/addForm.vue
  2. 1
      src/views/modules/shequzhili/tuceng/anquan/shebei/addForm.vue
  3. 1
      src/views/modules/shequzhili/tuceng/anquan/yinhuan/addForm.vue
  4. 1
      src/views/modules/shequzhili/tuceng/chengshiguanli/addForm.vue
  5. 1
      src/views/modules/shequzhili/tuceng/gonggongfuwu/addForm.vue
  6. 1
      src/views/modules/shequzhili/tuceng/yingji/changsuo/addForm.vue
  7. 1
      src/views/modules/shequzhili/tuceng/yingji/wuzi/addForm.vue
  8. 1
      src/views/modules/shequzhili/tuceng/yingji/zizuzhi/addForm.vue
  9. 13
      src/views/modules/shequzhili/tuceng/zhonghe/shebei/addForm.vue

1
src/views/modules/shequzhili/tuceng/anquan/anquanxuncha/addForm.vue

@ -74,6 +74,7 @@
placeholder="请输入关键词" placeholder="请输入关键词"
:remote-method="remoteMethod" :remote-method="remoteMethod"
:loading="loading" :loading="loading"
@keyup.enter.native="remoteMethod(formData.address)"
> >
<el-option <el-option
v-for="(item, index) in searchOptions" v-for="(item, index) in searchOptions"

1
src/views/modules/shequzhili/tuceng/anquan/shebei/addForm.vue

@ -42,6 +42,7 @@
placeholder="请输入关键词" placeholder="请输入关键词"
:remote-method="remoteMethod" :remote-method="remoteMethod"
:loading="loading" :loading="loading"
@keyup.enter.native="remoteMethod(formData.location)"
> >
<el-option <el-option
v-for="(item, index) in searchOptions" v-for="(item, index) in searchOptions"

1
src/views/modules/shequzhili/tuceng/anquan/yinhuan/addForm.vue

@ -98,6 +98,7 @@
placeholder="请输入关键词" placeholder="请输入关键词"
:remote-method="remoteMethod" :remote-method="remoteMethod"
:loading="loading" :loading="loading"
@keyup.enter.native="remoteMethod(formData.location)"
> >
<el-option <el-option
v-for="(item, index) in searchOptions" v-for="(item, index) in searchOptions"

1
src/views/modules/shequzhili/tuceng/chengshiguanli/addForm.vue

@ -40,6 +40,7 @@
placeholder="请输入关键词" placeholder="请输入关键词"
:remote-method="remoteMethod" :remote-method="remoteMethod"
:loading="loading" :loading="loading"
@keyup.enter.native="remoteMethod(formData.address)"
> >
<el-option <el-option
v-for="(item, index) in searchOptions" v-for="(item, index) in searchOptions"

1
src/views/modules/shequzhili/tuceng/gonggongfuwu/addForm.vue

@ -48,6 +48,7 @@
placeholder="请输入关键词" placeholder="请输入关键词"
:remote-method="remoteMethod" :remote-method="remoteMethod"
:loading="loading" :loading="loading"
@keyup.enter.native="remoteMethod(formData.location)"
> >
<el-option <el-option
v-for="(item, index) in searchOptions" v-for="(item, index) in searchOptions"

1
src/views/modules/shequzhili/tuceng/yingji/changsuo/addForm.vue

@ -50,6 +50,7 @@
placeholder="请输入关键词" placeholder="请输入关键词"
:remote-method="remoteMethod" :remote-method="remoteMethod"
:loading="loading" :loading="loading"
@keyup.enter.native="remoteMethod(formData.address)"
> >
<el-option <el-option
v-for="(item, index) in searchOptions" v-for="(item, index) in searchOptions"

1
src/views/modules/shequzhili/tuceng/yingji/wuzi/addForm.vue

@ -47,6 +47,7 @@
placeholder="请输入关键词" placeholder="请输入关键词"
:remote-method="remoteMethod" :remote-method="remoteMethod"
:loading="loading" :loading="loading"
@keyup.enter.native="remoteMethod(formData.location)"
> >
<el-option <el-option
v-for="(item, index) in searchOptions" v-for="(item, index) in searchOptions"

1
src/views/modules/shequzhili/tuceng/yingji/zizuzhi/addForm.vue

@ -100,6 +100,7 @@
placeholder="请输入关键词" placeholder="请输入关键词"
:remote-method="remoteMethod" :remote-method="remoteMethod"
:loading="loading" :loading="loading"
@keyup.enter.native="remoteMethod(formData.address)"
> >
<el-option <el-option
v-for="(item, index) in searchOptions" v-for="(item, index) in searchOptions"

13
src/views/modules/shequzhili/tuceng/zhonghe/shebei/addForm.vue

@ -40,6 +40,7 @@
placeholder="请输入关键词" placeholder="请输入关键词"
:remote-method="remoteMethod" :remote-method="remoteMethod"
:loading="loading" :loading="loading"
@keyup.enter.native="remoteMethod(formData.location)"
> >
<el-option <el-option
v-for="(item, index) in searchOptions" v-for="(item, index) in searchOptions"
@ -241,7 +242,17 @@ export default {
if (code === 0) { if (code === 0) {
console.log('详情数据', data); console.log('详情数据', data);
this.formData = { ...data }; this.formData = { ...data };
// this.remoteMethod("");
// this.list = this.searchOptions.map(item => {
// return { value: item.value, label: item.label };
// });
// this.formData.location.push(this.list[0].value);
// this.remoteMethod(this.list[0].label);//
// this.remoteMethod("");
this.initMap(); this.initMap();
} else { } else {
this.$message.error(msg); this.$message.error(msg);
} }
@ -367,6 +378,7 @@ export default {
} }
}, },
async remoteMethod(query) { async remoteMethod(query) {
console.log("query",query)
if (query !== '') { if (query !== '') {
this.loading = true; this.loading = true;
const { msg, data } = await map.searchNearby(query); const { msg, data } = await map.searchNearby(query);
@ -379,6 +391,7 @@ export default {
this.searchOptions = this.resultList.map(item => { this.searchOptions = this.resultList.map(item => {
return { value: `${item.id}`, label: `${item.address + item.name}` }; return { value: `${item.id}`, label: `${item.address + item.name}` };
}); });
console.log("this.searchOptions",this.searchOptions )
} }
} else { } else {
this.searchOptions = [ this.searchOptions = [

Loading…
Cancel
Save