20260325稳定版
This commit is contained in:
@@ -49,7 +49,24 @@
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="地图选点">
|
||||
<p>已选坐标: {{ form.lng }},{{ form.lat }}</p>
|
||||
<div style="margin-bottom: 1rem">
|
||||
<a-space>
|
||||
<a-input
|
||||
allow-clear
|
||||
placeholder="请输入经度(0~180)"
|
||||
v-model:value="form.lng"
|
||||
>
|
||||
<template #addonBefore>经度</template>
|
||||
</a-input>
|
||||
<a-input
|
||||
allow-clear
|
||||
placeholder="请输入纬度(0~90)"
|
||||
v-model:value="form.lat"
|
||||
>
|
||||
<template #addonBefore>纬度</template>
|
||||
</a-input>
|
||||
</a-space>
|
||||
</div>
|
||||
<!-- <a-button @click="showMap = true">点击选点</a-button>-->
|
||||
<!-- <ele-map-picker-->
|
||||
<!-- :need-city="true"-->
|
||||
@@ -61,7 +78,8 @@
|
||||
<!-- markerSrc="https://oss.wsdns.cn/20250420/48e2b37e6b3f4fad80718b244c2c12fe.png"-->
|
||||
<!-- />-->
|
||||
<!-- <span v-show="form.lng">{{ form.lng }},{{ form.lat }}</span>-->
|
||||
<tdt-map v-if="visible" :center="mapState.center" :zoom="mapState.zoom" style="width: 100%; height: 700px"
|
||||
<tdt-map v-if="visible" :center="mapState.center" :zoom="mapState.zoom"
|
||||
style="width: 100%; height: 700px"
|
||||
:controls="['Zoom']"
|
||||
@click.native="clickMap">
|
||||
<tdt-marker :position="[form.lng, form.lat]" :draggable="false" />
|
||||
@@ -149,12 +167,22 @@ const getAreaList = async () => {
|
||||
const changeArea = (value, options) => {
|
||||
if (options) {
|
||||
form.provinceId = options[0].id;
|
||||
if (options.length > 1) form.cityId = options[1].id;
|
||||
if (options.length > 2) form.areaId = options[2].id;
|
||||
form.province = options[0].name;
|
||||
if (options.length > 1) {
|
||||
form.cityId = options[1].id;
|
||||
form.city = options[1].name;
|
||||
}
|
||||
if (options.length > 2) {
|
||||
form.areaId = options[2].id;
|
||||
form.region = options[2].name;
|
||||
}
|
||||
} else {
|
||||
form.provinceId = undefined;
|
||||
form.province = undefined;
|
||||
form.cityId = undefined;
|
||||
form.city = undefined;
|
||||
form.areaId = undefined;
|
||||
form.region = undefined;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user