|
|
@ -108,11 +108,11 @@ |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
searchOptions:[], |
|
|
|
optionstype: [ |
|
|
|
{ value: 0, label: "实践站" }, |
|
|
|
{ value: 1, label: "实践点" }, |
|
|
|
{ value: 2, label: "其它" }, |
|
|
|
|
|
|
|
], |
|
|
|
formData: |
|
|
|
{ |
|
|
@ -125,7 +125,6 @@ |
|
|
|
attrs: [], |
|
|
|
type: "", |
|
|
|
name: "", |
|
|
|
|
|
|
|
address: "",//地址 |
|
|
|
longitude: this.$store.state.user.longitude, //经度 |
|
|
|
latitude: this.$store.state.user.latitude,//纬度 |
|
|
@ -244,10 +243,11 @@ |
|
|
|
format: item.response.data.fileName.split('.').pop(), |
|
|
|
url: item.response.data.url |
|
|
|
})) : []; // 当e为空时清空fileList |
|
|
|
console.log(this.fileList, 'sssssb'); |
|
|
|
if (e.length > 0) { |
|
|
|
console.log(this.fileList,"this.fileList"); |
|
|
|
console.log(this.fileList,"this.fileListdfgdfg"); |
|
|
|
this.formData.attrs=this.fileList; |
|
|
|
console.log(this.formData.attrs,"this.fileList"); |
|
|
|
console.log(this.formData.attrs,"this.fileListdggfd"); |
|
|
|
|
|
|
|
} else { |
|
|
|
this.formData.coverPic = ''; |
|
|
@ -372,7 +372,6 @@ |
|
|
|
this.formData.address = data.address; |
|
|
|
// this.searchValue=data.address |
|
|
|
console.log(this.formData.address," this.formData.address "); |
|
|
|
|
|
|
|
this.searchValue = data.address |
|
|
|
this.searchOptions = [] |
|
|
|
// console.log('data,this.searchValue ', this.searchValue) |
|
|
@ -383,12 +382,9 @@ |
|
|
|
async remoteMethod(query) { |
|
|
|
console.log(query, "sfsvsdv"); |
|
|
|
if (query !== '') { |
|
|
|
|
|
|
|
const { msg, data } = await map.searchNearby(query); |
|
|
|
this.resultList = [] |
|
|
|
|
|
|
|
if (msg == "success" && data.resultList && data.resultList.length > 0) { |
|
|
|
|
|
|
|
if (data.resultList && data.resultList.length > 0) { |
|
|
|
this.resultList = data.resultList |
|
|
|
console.log(this.resultList, "this.resultList"); |
|
|
@ -418,6 +414,7 @@ |
|
|
|
map.setMarker(lonlat[1], lonlat[0]); |
|
|
|
this.formData.latitude = lonlat[1]; |
|
|
|
this.formData.longitude = lonlat[0]; |
|
|
|
this.formData.address = selPosition.address + selPosition.name |
|
|
|
this.searchValue = selPosition.address + selPosition.name |
|
|
|
}, |
|
|
|
|
|
|
|