生成检测点

This commit is contained in:
yyy 2025-06-27 18:23:02 +08:00
parent 132a9f0f70
commit ae961eaf69
3 changed files with 14 additions and 5 deletions

View File

@ -4,9 +4,9 @@ NODE_ENV=development
VITE_DEV=true VITE_DEV=true
# 请求路径 # 请求路径
# VITE_BASE_URL='http://10.10.7.132:48080' VITE_BASE_URL='http://10.10.7.132:48080'
# VITE_BASE_URL='http://10.10.100.15:48080' # VITE_BASE_URL='http://10.10.100.15:48080'
VITE_BASE_URL='http://10.10.5.5:48080' # VITE_BASE_URL='http://10.10.5.5:48080'
# 文件上传类型server - 后端上传, client - 前端直连上传,仅支持 S3 服务 # 文件上传类型server - 后端上传, client - 前端直连上传,仅支持 S3 服务
VITE_UPLOAD_TYPE=server VITE_UPLOAD_TYPE=server

View File

@ -255,3 +255,11 @@ export const getHouseLocationTypeList = async (params) => {
params params
}) })
} }
//获取检测点距离
export const getCheckDistance = async (params) => {
return await request.get({
url: `/system/position-map-item/getCheckDistance`,
params
})
}

View File

@ -2171,15 +2171,16 @@ const generateDetectionPoint = async () => {
state.contextMenu.currentItem state.contextMenu.currentItem
const newId = await MapApi.getNodeId() const newId = await MapApi.getNodeId()
const distance = 2 / Number(imgBgObj.resolution) // const distance = await MapApi.getCheckDistance()
const distanceValue = Number(distance) / Number(imgBgObj.resolution) //
// 使 // 使
const angle = locationYaw * (180 / Math.PI) const angle = locationYaw * (180 / Math.PI)
// //
// 090西180-90 // 090西180-90
const newX = Number((Number(locationX) + distance * Math.cos(locationYaw)).toFixed(2)) const newX = Number((Number(locationX) + distanceValue * Math.cos(locationYaw)).toFixed(2))
const newY = Number((Number(locationY) - distance * Math.sin(locationYaw)).toFixed(2)) const newY = Number((Number(locationY) - distanceValue * Math.sin(locationYaw)).toFixed(2))
//, //,
const isDuplicate = state.allMapPointInfo.some( const isDuplicate = state.allMapPointInfo.some(