添加输入提示后查询

master
doublekou 1 year ago
parent 11df93224e
commit aef742e6b3

@ -123,7 +123,16 @@ const columns: ProColumns[] = [
},
{
title: '联系方式',
dataIndex: 'customNid'
// dataIndex: 'customNid',
customRender: function ({ record }: any) {
if (record.enrollStatus === 2) {
const phoneNumber = record.customNid.toString()
const hiddenPhoneNumber = phoneNumber.replace(/^(\d{3})\d{4}(\d{4})$/, '$1****$2')
return h('div', hiddenPhoneNumber)
} else {
return h('div', record.customNid)
}
}
},
{
title: '报名状态',

@ -75,7 +75,13 @@
: { 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"
placeholder="请输入备注"
:style="{ width: title === '详情' || title === '分发' ? '83%' : '100%' }"
@ -113,6 +119,7 @@
name="detailAddress"
>
<a-input
id="tipinput"
v-model:value="formModel.detailAddress"
placeholder="请输入小区名称"
:disabled="title === '编辑预约'"
@ -633,7 +640,7 @@ const match = () => {
map.value.clearMap()
AMap.plugin('AMap.Geocoder', function () {
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
const autoComplete = ref()
//POIAMap.PlaceSearch
const placeSearch = ref()
//POIAMap.PlaceSearch
// const placeSearch = ref()
//AMap.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 = () => {
@ -1080,9 +1104,23 @@ const initMap = () => {
// 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 () {
geocoder.value = new AMap.Geocoder({
city: '杭州' // city adcode citycode
city: '全国' // city adcode citycode
})
})
//

@ -18,11 +18,11 @@
/>
</a-form-item>
</a-col>
<a-col :xl="8" :md="12" :sm="24">
<!-- <a-col :xl="8" :md="12" :sm="24">
<a-form-item label="联系方式">
<a-input v-model:value="formModel.customNid" placeholder="请输入" />
</a-form-item>
</a-col>
</a-col> -->
<a-col :xl="8" :md="12" :sm="24">
<a-form-item label="填写时间">
<a-range-picker

@ -22,7 +22,7 @@ import { antdvStyleDeps } from './src/utils/resolvers'
//项目
// const serverAddress = 'http://admin.ballcat.cn'
//xy
// const serverAddress = 'http://172.18.0.225:8000'
const serverAddress = 'http://172.18.0.225:8000'
//jt
// const serverAddress = 'http://172.18.1.8:8000'
//ts
@ -31,7 +31,7 @@ import { antdvStyleDeps } from './src/utils/resolvers'
// const serverAddress = 'http://39.100.77.21:8000'
//线上ip
const serverAddress = 'http://175.27.212.74:80'
// const serverAddress = 'http://175.27.212.74:80'
//线上域名
// const serverAddress = 'https://baiyea.net'
// const serverAddress = 'http://8.130.96.163:8100'

Loading…
Cancel
Save