|
|
@ -75,7 +75,13 @@
|
|
|
|
: { sm: { span: 24 }, md: { span: 19 } }
|
|
|
|
: { sm: { span: 24 }, md: { span: 19 } }
|
|
|
|
"
|
|
|
|
"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<a-input
|
|
|
|
<!-- <a-input
|
|
|
|
|
|
|
|
v-model:value="formModel.remark"
|
|
|
|
|
|
|
|
placeholder="请输入备注"
|
|
|
|
|
|
|
|
:style="{ width: title === '详情' || title === '分发' ? '83%' : '100%' }"
|
|
|
|
|
|
|
|
:readonly="title === '详情' || title === '分发'"
|
|
|
|
|
|
|
|
/> -->
|
|
|
|
|
|
|
|
<a-textarea
|
|
|
|
v-model:value="formModel.remark"
|
|
|
|
v-model:value="formModel.remark"
|
|
|
|
placeholder="请输入备注"
|
|
|
|
placeholder="请输入备注"
|
|
|
|
:style="{ width: title === '详情' || title === '分发' ? '83%' : '100%' }"
|
|
|
|
:style="{ width: title === '详情' || title === '分发' ? '83%' : '100%' }"
|
|
|
@ -113,6 +119,7 @@
|
|
|
|
name="detailAddress"
|
|
|
|
name="detailAddress"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<a-input
|
|
|
|
<a-input
|
|
|
|
|
|
|
|
id="tipinput"
|
|
|
|
v-model:value="formModel.detailAddress"
|
|
|
|
v-model:value="formModel.detailAddress"
|
|
|
|
placeholder="请输入小区名称"
|
|
|
|
placeholder="请输入小区名称"
|
|
|
|
:disabled="title === '编辑预约'"
|
|
|
|
:disabled="title === '编辑预约'"
|
|
|
@ -633,7 +640,7 @@ const match = () => {
|
|
|
|
map.value.clearMap()
|
|
|
|
map.value.clearMap()
|
|
|
|
AMap.plugin('AMap.Geocoder', function () {
|
|
|
|
AMap.plugin('AMap.Geocoder', function () {
|
|
|
|
geocoder.value = new AMap.Geocoder({
|
|
|
|
geocoder.value = new AMap.Geocoder({
|
|
|
|
city: '杭州' // city 指定进行编码查询的城市,支持传入城市名、adcode 和 citycode
|
|
|
|
city: '全国' // city 指定进行编码查询的城市,支持传入城市名、adcode 和 citycode
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
//标记中心点
|
|
|
|
//标记中心点
|
|
|
@ -993,6 +1000,8 @@ const filter: ShowSearchType['filter'] = (inputValue, path) => {
|
|
|
|
//输入提示插件AMap.Autocomplete
|
|
|
|
//输入提示插件AMap.Autocomplete
|
|
|
|
const autoComplete = ref()
|
|
|
|
const autoComplete = ref()
|
|
|
|
//POI搜索插件AMap.PlaceSearch
|
|
|
|
//POI搜索插件AMap.PlaceSearch
|
|
|
|
|
|
|
|
const placeSearch = ref()
|
|
|
|
|
|
|
|
//POI搜索插件AMap.PlaceSearch
|
|
|
|
// const placeSearch = ref()
|
|
|
|
// const placeSearch = ref()
|
|
|
|
//点标记AMap.Marker
|
|
|
|
//点标记AMap.Marker
|
|
|
|
//创建的一个 Marker 实例
|
|
|
|
//创建的一个 Marker 实例
|
|
|
@ -1041,6 +1050,21 @@ const getCenterMarker = (type: string) => {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// 当用户选择输入提示结果后进行查询操作
|
|
|
|
|
|
|
|
const performQuery = (selectedTip: any) => {
|
|
|
|
|
|
|
|
const geocoder = new AMap.Geocoder()
|
|
|
|
|
|
|
|
const location = selectedTip.location
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 使用地理编码查询
|
|
|
|
|
|
|
|
geocoder.getAddress(location, function (status: any, result: any) {
|
|
|
|
|
|
|
|
if (status === 'complete' && result.info === 'OK') {
|
|
|
|
|
|
|
|
// 处理查询结果
|
|
|
|
|
|
|
|
const address = result.regeocode.formattedAddress
|
|
|
|
|
|
|
|
console.log('查询结果:', address)
|
|
|
|
|
|
|
|
// 进行其他操作...
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//创建地图
|
|
|
|
//创建地图
|
|
|
|
const initMap = () => {
|
|
|
|
const initMap = () => {
|
|
|
@ -1080,9 +1104,23 @@ const initMap = () => {
|
|
|
|
// city: '010' //城市设为北京,默认:“全国”
|
|
|
|
// city: '010' //城市设为北京,默认:“全国”
|
|
|
|
// })
|
|
|
|
// })
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
// AMap.plugin('AMap.PlaceSearch', function () {
|
|
|
|
|
|
|
|
// // PlaceSearch
|
|
|
|
|
|
|
|
// const placeOptions = {
|
|
|
|
|
|
|
|
// map: map.value
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// placeSearch.value = new AMap.PlaceSearch(placeOptions)
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
|
|
autoComplete.value?.on('select', (e: any) => {
|
|
|
|
|
|
|
|
const selectedTip = e.poi // 获取用户选择的提示结果对象
|
|
|
|
|
|
|
|
formModel.detailAddress = selectedTip.name // 将选中的提示项名称赋值给输入框的值(使用 v-model 来绑定)
|
|
|
|
|
|
|
|
performQuery(selectedTip) // 执行查询操作
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}, 300)
|
|
|
|
AMap.plugin('AMap.Geocoder', function () {
|
|
|
|
AMap.plugin('AMap.Geocoder', function () {
|
|
|
|
geocoder.value = new AMap.Geocoder({
|
|
|
|
geocoder.value = new AMap.Geocoder({
|
|
|
|
city: '杭州' // city 指定进行编码查询的城市,支持传入城市名、adcode 和 citycode
|
|
|
|
city: '全国' // city 指定进行编码查询的城市,支持传入城市名、adcode 和 citycode
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
//标记中心点
|
|
|
|
//标记中心点
|
|
|
|