|
|
|
@ -209,9 +209,8 @@ export default { |
|
|
|
// level: item.level, |
|
|
|
center: [item.longitude, item.latitude], |
|
|
|
...item, |
|
|
|
dotCount2: 222, |
|
|
|
dotCount: gridCountData.find((item2) => item2.id == item.orgId) |
|
|
|
? gridCountData.find((item2) => item2.id == item.orgId).total |
|
|
|
dotCount: gridCountData.find((item2) => item2.orgId == item.id) |
|
|
|
? gridCountData.find((item2) => item2.orgId == item.id).total |
|
|
|
: "", |
|
|
|
}, |
|
|
|
geometry: { |
|
|
|
@ -801,13 +800,15 @@ export default { |
|
|
|
|
|
|
|
searchPos(name) { |
|
|
|
return new Promise((reslove) => { |
|
|
|
window.AMap.plugin("AMap.PlaceSearch", function () { |
|
|
|
window.AMap.plugin("AMap.PlaceSearch", () => { |
|
|
|
const city = this.$store.state.user.areaCodePath[1] || "全国"; |
|
|
|
console.log("搜索区域", city); |
|
|
|
// 实例化Autocomplete |
|
|
|
var autoOptions = { |
|
|
|
let autoOptions = { |
|
|
|
//city 限定城市,默认全国 |
|
|
|
city: "全国", |
|
|
|
city, |
|
|
|
}; |
|
|
|
var autoComplete = new window.AMap.PlaceSearch(autoOptions); |
|
|
|
let autoComplete = new window.AMap.PlaceSearch(autoOptions); |
|
|
|
autoComplete.search(name, function (status, result) { |
|
|
|
reslove(result); |
|
|
|
}); |
|
|
|
|