拖拽宽高问题
This commit is contained in:
parent
10d711d844
commit
6ea7dfb634
2
.env.dev
2
.env.dev
@ -6,7 +6,7 @@ VITE_DEV=true
|
||||
# 请求路径
|
||||
# VITE_BASE_URL='http://192.168.0.66:48080'
|
||||
# VITE_BASE_URL='http://192.168.0.189:48080'
|
||||
VITE_BASE_URL='http://127.0.0.1:48080'
|
||||
VITE_BASE_URL='http://192.168.0.45:48080'
|
||||
|
||||
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持S3服务
|
||||
VITE_UPLOAD_TYPE=server
|
||||
|
@ -760,10 +760,15 @@ const resizeEnd = (locationX, locationY, w, h, item, index) => {
|
||||
nextTick(() => {
|
||||
let x = Number(locationX) + Number(item.locationWidePx) / 2
|
||||
let y = Number(locationY) + Number(item.locationDeepPx) / 2
|
||||
let width = Number(w) * imgBgObj.resolution * 100 //实际的宽高cm
|
||||
let height = Number(h) * imgBgObj.resolution * 100
|
||||
|
||||
let actualPoint = disposeEventPoint(x, y)
|
||||
|
||||
state.allMapPointInfo[index].locationX = x
|
||||
state.allMapPointInfo[index].locationY = y
|
||||
state.allMapPointInfo[index].locationWide = width
|
||||
state.allMapPointInfo[index].locationDeep = height
|
||||
state.allMapPointInfo[index].locationWidePx = w
|
||||
state.allMapPointInfo[index].locationDeepPx = h
|
||||
state.allMapPointInfo[index].actualLocationX = actualPoint.actualLocationX
|
||||
@ -781,8 +786,8 @@ const resizeEnd = (locationX, locationY, w, h, item, index) => {
|
||||
if (item.id === route.endPointId) {
|
||||
route.endPointX = x
|
||||
route.endPointY = y
|
||||
route.endHigh = Number(item.locationDeep)
|
||||
route.endWidth = Number(item.locationDeep)
|
||||
route.endHigh = Number(item.locationDeepPx)
|
||||
route.endWidth = Number(item.locationWidePx)
|
||||
route.actualEndPointX = actualPoint.actualLocationX
|
||||
route.actualEndPointY = actualPoint.actualLocationY
|
||||
}
|
||||
@ -2515,7 +2520,20 @@ const saveMap = async () => {
|
||||
const saveNodeList = async () => {
|
||||
let list = state.allMapPointInfo
|
||||
list.forEach((item) => {
|
||||
if (item.type === 7) {
|
||||
if (item.type === 2) {
|
||||
// 库位点 类型为数组
|
||||
item.dataList.forEach((node) => {
|
||||
node.locationDeep = item.locationDeep
|
||||
node.locationWide = item.locationWide
|
||||
})
|
||||
item.dataJson = JSON.stringify(item.dataList)
|
||||
} else if (item.type === 3 || item.type === 4) {
|
||||
//设备类型
|
||||
item.dataObj.locationWide = item.locationWide
|
||||
item.dataObj.locationDeep = item.locationDeep
|
||||
item.dataJson = JSON.stringify(item.dataObj)
|
||||
} else if (item.type === 7) {
|
||||
//文字类型
|
||||
item.dataObj.positionMapId = imgBgObj.positionMapId
|
||||
item.dataObj.text = item.text
|
||||
item.dataObj.fontColor = item.fontColor
|
||||
|
Loading…
Reference in New Issue
Block a user