合并
This commit is contained in:
parent
7ff85039ba
commit
5fdd0f6cd1
@ -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
Loading…
Reference in New Issue
Block a user