|
|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<div class="flex">
|
|
|
|
|
<a-input v-model:value="address" @change="inpChange" placeholder="" />
|
|
|
|
|
<a-input v-model:value="address" @change="inpChange" :disabled="disabled" placeholder="" />
|
|
|
|
|
<a-button type="primary" style="margin-left: 10px;" @click="showMaps">地图</a-button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
@ -16,7 +16,16 @@
|
|
|
|
|
</a-col>
|
|
|
|
|
</a-row>
|
|
|
|
|
</div>
|
|
|
|
|
<a-modal v-model:visible="mapsVisible" title="位置选择" @cancel="handleCancel" @ok="handleOk" width="1200px" height="850px" >
|
|
|
|
|
<a-modal
|
|
|
|
|
v-model:visible="mapsVisible"
|
|
|
|
|
title="位置选择"
|
|
|
|
|
centered
|
|
|
|
|
:footer="disabled ? null : undefined"
|
|
|
|
|
@cancel="handleCancel"
|
|
|
|
|
@ok="handleOk"
|
|
|
|
|
width="1200px"
|
|
|
|
|
height="850px"
|
|
|
|
|
>
|
|
|
|
|
<div class="modalbox">
|
|
|
|
|
<MapboxMap @handlerDrawComplete="handlerDrawComplete" :location="location" :geoms="geomData" :isPoint="geoType"></MapboxMap>
|
|
|
|
|
</div>
|
|
|
|
|
@ -33,14 +42,13 @@ import { propTypes } from '@/utils/propTypes';
|
|
|
|
|
|
|
|
|
|
defineOptions({ name: 'AddressDetails' });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
|
|
|
disabled: propTypes.bool,
|
|
|
|
|
value: { type: String },
|
|
|
|
|
geoType: propTypes.bool,
|
|
|
|
|
});
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
console.log('rrr112r', props)
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
const emitData = ref<any[]>([]);
|
|
|
|
|
const [FormItemData] = useRuleFormItem(props);
|
|
|
|
|
@ -52,7 +60,7 @@ const geomData = ref()
|
|
|
|
|
const location = ref()
|
|
|
|
|
const showMaps = ()=>{
|
|
|
|
|
mapsVisible.value = true
|
|
|
|
|
if(paramsData.value.length>0){
|
|
|
|
|
if(paramsData.value && paramsData.value.length>0){
|
|
|
|
|
location.value = paramsData.value[0].center
|
|
|
|
|
geomData.value = paramsData.value
|
|
|
|
|
}
|
|
|
|
|
|