修改显示

main
suixy 2 months ago
parent d8c9305af9
commit 8cd839eda5

@ -38,6 +38,7 @@ const scaleRatio = ref(window.innerWidth / 1080)
const onSubmit = (e) => {
console.log(e)
}
const boxPos = ref({x: 100, y: 100, rotate: 30})
const TOP = defineComponent({
name: 'TOP',
@ -81,7 +82,6 @@ const TOP = defineComponent({
const LEFT = defineComponent({
name: 'LEFT',
setup() {
const boxPos = ref({x: 100, y: 100, rotate: 30})
return () => (
<div class="left">
<Ruler
@ -785,7 +785,7 @@ const processData = (data) => {
// rotate: 0
}
console.log('location', location)
locationData.value = location
boxPos.value = location
}
}
@ -1095,7 +1095,7 @@ function getBoundingBoxAndSize(points) {
const width = Math.round(haversineDistance(minLat, minLon, minLat, maxLon))
const height = Math.round(haversineDistance(minLat, minLon, maxLat, minLon))
return {width, height};
return {width, height, minLat, minLon, maxLat, minLon};
}
const areaData = ref({
@ -1109,7 +1109,14 @@ const saveAreaPoint = () => {
})
Promise.all(arr).then(() => {
ElMessage.success('保存成功')
areaData.value = getBoundingBoxAndSize(areaPoints.value)
let data = getBoundingBoxAndSize(areaPoints.value)
areaData.value = data
area.value = {
"LatMin": data.minLat,
"LatMax": data.maxLat,
"LonMin": data.minLon,
"LonMax": data.minLon
}
}).catch((err) => {
ElMessage.error(err)
})

Loading…
Cancel
Save