From 10d711d844107ff2b2f2822292eafd703879afd7 Mon Sep 17 00:00:00 2001
From: yyy <2605810609@qq.com>
Date: Tue, 18 Mar 2025 10:01:33 +0800
Subject: [PATCH 1/5] 1
---
.../example/转换成实际坐标demo.vue | 151 ------------------
1 file changed, 151 deletions(-)
delete mode 100644 src/views/mapPage/example/转换成实际坐标demo.vue
diff --git a/src/views/mapPage/example/转换成实际坐标demo.vue b/src/views/mapPage/example/转换成实际坐标demo.vue
deleted file mode 100644
index cc418af3..00000000
--- a/src/views/mapPage/example/转换成实际坐标demo.vue
+++ /dev/null
@@ -1,151 +0,0 @@
-
-
-
-
-
-
-

-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
From 6ea7dfb6342285086b932b50a8190ca24c7710a0 Mon Sep 17 00:00:00 2001
From: yyy <2605810609@qq.com>
Date: Tue, 18 Mar 2025 14:56:12 +0800
Subject: [PATCH 2/5] =?UTF-8?q?=E6=8B=96=E6=8B=BD=E5=AE=BD=E9=AB=98?=
=?UTF-8?q?=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env.dev | 2 +-
src/views/mapPage/realTimeMap/editMap.vue | 24 ++++++++++++++++++++---
2 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/.env.dev b/.env.dev
index cd36402f..fb9b85ed 100644
--- a/.env.dev
+++ b/.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
diff --git a/src/views/mapPage/realTimeMap/editMap.vue b/src/views/mapPage/realTimeMap/editMap.vue
index 547acba9..238f2ff0 100644
--- a/src/views/mapPage/realTimeMap/editMap.vue
+++ b/src/views/mapPage/realTimeMap/editMap.vue
@@ -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
From 12739441d6adb12ea0fedd245f72431f3a3b7f7d Mon Sep 17 00:00:00 2001
From: yyy <2605810609@qq.com>
Date: Tue, 18 Mar 2025 16:42:50 +0800
Subject: [PATCH 3/5] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E6=B7=BB=E5=8A=A0bug?=
=?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env.local | 3 +-
.../components-tool/equipmentToolDialog.vue | 24 ++++++++----
src/views/mapPage/realTimeMap/editMap.vue | 38 +++++++++----------
3 files changed, 36 insertions(+), 29 deletions(-)
diff --git a/.env.local b/.env.local
index a3752946..731be2fa 100644
--- a/.env.local
+++ b/.env.local
@@ -4,8 +4,9 @@ NODE_ENV=development
VITE_DEV=true
# 请求路径
-VITE_BASE_URL='http://192.168.0.74:48080'
+# VITE_BASE_URL='http://192.168.0.74:48080'
# VITE_BASE_URL='http://192.168.0.189:48080'
+VITE_BASE_URL='http://192.168.0.45:48080'
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持 S3 服务
VITE_UPLOAD_TYPE=server
diff --git a/src/views/mapPage/realTimeMap/components-tool/equipmentToolDialog.vue b/src/views/mapPage/realTimeMap/components-tool/equipmentToolDialog.vue
index 10e4c45b..165090f2 100644
--- a/src/views/mapPage/realTimeMap/components-tool/equipmentToolDialog.vue
+++ b/src/views/mapPage/realTimeMap/components-tool/equipmentToolDialog.vue
@@ -23,8 +23,8 @@