This commit is contained in:
yyy 2025-07-15 14:06:18 +08:00
parent 7ff85039ba
commit 5fdd0f6cd1
2 changed files with 548 additions and 152 deletions

View File

@ -271,8 +271,9 @@ const getAllNodeList = async () => {
positionMapId: imgBgObj.positionMapId
})
allMapPointInfo.value = []
list.forEach((item) => {
item.locationX = convertActualToBrowser(item.actualLocationX, item.actualLocationY).x
item.locationY = convertActualToBrowser(item.actualLocationX, item.actualLocationY).y
//
if (locationTypeNumber.value == 1 && item.type === 2) {
item.locationX = Number(item.locationX) * (imgBgObj.showWidth / imgBgObj.width)
@ -420,6 +421,23 @@ const handleWheel = (event) => {
const emit = defineEmits(['locationSelectionDialogSuccess'])
defineExpose({ open }) // open
//
const convertActualToBrowser = (pointX, pointY) => {
const y1 = Number(imgBgObj.origin[1]) + Number(imgBgObj.height) * Number(imgBgObj.resolution)
let x =
Math.round(
(Math.max(Number(pointX) - Number(imgBgObj.origin[0]), 0) / Number(imgBgObj.resolution)) *
10000
) / 10000
let y =
Math.round((Math.max(y1 - Number(pointY), 0) / Number(imgBgObj.resolution)) * 10000) / 10000
return {
x,
y
}
}
</script>
<style lang="scss">

File diff suppressed because it is too large Load Diff