|
|
@ -64,7 +64,7 @@ |
|
|
|
:reserve-keyword="true" placeholder="请输入关键词" :remote-method="remoteMethod" |
|
|
|
:loading="loading"> |
|
|
|
<el-option v-for="(item, index) in searchOptions" @click.native="handleClickKey(index)" |
|
|
|
:key="item.value" :label="item.label" :value="item.value"> |
|
|
|
:key="item.value||index" :label="item.label" :value="item.value"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
<div id="app_activity" class="div_map"></div> |
|
|
@ -415,18 +415,16 @@ export default { |
|
|
|
async initForm(type, activityId) { |
|
|
|
this.startLoading() |
|
|
|
console.log("啊实打实的", type, activityId) |
|
|
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
if (!map) { |
|
|
|
this.initMap(this.formData.latitude, this.formData.longitude); |
|
|
|
// console.log("map", map) |
|
|
|
console.log("map", map) |
|
|
|
} else { |
|
|
|
map.setCenter(this.formData.latitude, this.formData.longitude); |
|
|
|
map.setMarker(this.formData.latitude, this.formData.longitude); |
|
|
|
// console.log("mapmapmap", map) |
|
|
|
console.log("mapmapmap", map) |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
this.formType = type |
|
|
|
if (type === 'edit' ) { |
|
|
|
if(activityId.activityImgs || activityId.sumUp){ |
|
|
@ -655,10 +653,9 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
async remoteMethod(query) { |
|
|
|
|
|
|
|
console.log(query,"sfsvsdv"); |
|
|
|
if (query !== '') { |
|
|
|
this.loading = true; |
|
|
|
|
|
|
|
const { msg, data } = await map.searchNearby(query); |
|
|
|
this.loading = false; |
|
|
|
this.resultList = [] |
|
|
@ -667,10 +664,12 @@ export default { |
|
|
|
|
|
|
|
if (data.resultList && data.resultList.length > 0) { |
|
|
|
this.resultList = data.resultList |
|
|
|
console.log(this.resultList,"this.resultList"); |
|
|
|
this.searchOptions = this.resultList.map(item => { |
|
|
|
return { value: `${item.hotPointID}`, label: `${item.address + item.name}` }; |
|
|
|
return { value: `${item.id}`, label: `${item.address + item.name}` }; |
|
|
|
|
|
|
|
}); |
|
|
|
console.log(this.searchOptions,"this.searchOptions"); |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.searchOptions = [ |
|
|
|