diff --git a/src/assets/imgs/indexPage/bin-location.png b/src/assets/imgs/indexPage/bin-location.png new file mode 100644 index 00000000..5f3ea16b Binary files /dev/null and b/src/assets/imgs/indexPage/bin-location.png differ diff --git a/src/assets/imgs/indexPage/chache-4备份 5@2x.png b/src/assets/imgs/indexPage/car1.png similarity index 100% rename from src/assets/imgs/indexPage/chache-4备份 5@2x.png rename to src/assets/imgs/indexPage/car1.png diff --git a/src/assets/imgs/indexPage/chache-4备份 8@2x.png b/src/assets/imgs/indexPage/car10.png similarity index 100% rename from src/assets/imgs/indexPage/chache-4备份 8@2x.png rename to src/assets/imgs/indexPage/car10.png diff --git a/src/assets/imgs/indexPage/chache-4备份@2x.png b/src/assets/imgs/indexPage/car11.png similarity index 100% rename from src/assets/imgs/indexPage/chache-4备份@2x.png rename to src/assets/imgs/indexPage/car11.png diff --git a/src/assets/imgs/indexPage/chache-4备份 7@2x.png b/src/assets/imgs/indexPage/car2.png similarity index 100% rename from src/assets/imgs/indexPage/chache-4备份 7@2x.png rename to src/assets/imgs/indexPage/car2.png diff --git a/src/assets/imgs/indexPage/chache-4@2x.png b/src/assets/imgs/indexPage/car3.png similarity index 100% rename from src/assets/imgs/indexPage/chache-4@2x.png rename to src/assets/imgs/indexPage/car3.png diff --git a/src/assets/imgs/indexPage/chache-4备份 3@2x.png b/src/assets/imgs/indexPage/car4.png similarity index 100% rename from src/assets/imgs/indexPage/chache-4备份 3@2x.png rename to src/assets/imgs/indexPage/car4.png diff --git a/src/assets/imgs/indexPage/chache-4备份 9@2x.png b/src/assets/imgs/indexPage/car5.png similarity index 100% rename from src/assets/imgs/indexPage/chache-4备份 9@2x.png rename to src/assets/imgs/indexPage/car5.png diff --git a/src/assets/imgs/indexPage/chache-4@2x(1).png b/src/assets/imgs/indexPage/car6.png similarity index 100% rename from src/assets/imgs/indexPage/chache-4@2x(1).png rename to src/assets/imgs/indexPage/car6.png diff --git a/src/assets/imgs/indexPage/chache-4备份 2@2x.png b/src/assets/imgs/indexPage/car7.png similarity index 100% rename from src/assets/imgs/indexPage/chache-4备份 2@2x.png rename to src/assets/imgs/indexPage/car7.png diff --git a/src/assets/imgs/indexPage/chache-4备份 4@2x.png b/src/assets/imgs/indexPage/car8.png similarity index 100% rename from src/assets/imgs/indexPage/chache-4备份 4@2x.png rename to src/assets/imgs/indexPage/car8.png diff --git a/src/assets/imgs/indexPage/chache-4备份 6@2x.png b/src/assets/imgs/indexPage/car9.png similarity index 100% rename from src/assets/imgs/indexPage/chache-4备份 6@2x.png rename to src/assets/imgs/indexPage/car9.png diff --git a/src/assets/imgs/indexPage/change-point.png b/src/assets/imgs/indexPage/change-point.png new file mode 100644 index 00000000..807b6bd6 Binary files /dev/null and b/src/assets/imgs/indexPage/change-point.png differ diff --git a/src/assets/imgs/indexPage/chongdianzhuang_ceshi@2x.png b/src/assets/imgs/indexPage/chongdianzhuang.png similarity index 100% rename from src/assets/imgs/indexPage/chongdianzhuang_ceshi@2x.png rename to src/assets/imgs/indexPage/chongdianzhuang.png diff --git a/src/assets/imgs/indexPage/equipment.png b/src/assets/imgs/indexPage/equipment.png new file mode 100644 index 00000000..ea8e53d5 Binary files /dev/null and b/src/assets/imgs/indexPage/equipment.png differ diff --git a/src/assets/imgs/indexPage/编组 22.png b/src/assets/imgs/indexPage/full-screen.png similarity index 100% rename from src/assets/imgs/indexPage/编组 22.png rename to src/assets/imgs/indexPage/full-screen.png diff --git a/src/assets/imgs/indexPage/编组 12.png b/src/assets/imgs/indexPage/hand.png similarity index 100% rename from src/assets/imgs/indexPage/编组 12.png rename to src/assets/imgs/indexPage/hand.png diff --git a/src/assets/imgs/indexPage/编组 15.png b/src/assets/imgs/indexPage/search.png similarity index 100% rename from src/assets/imgs/indexPage/编组 15.png rename to src/assets/imgs/indexPage/search.png diff --git a/src/assets/imgs/indexPage/shusongxian-youhuo@2x.png b/src/assets/imgs/indexPage/shusongxian-youhuo@2x.png deleted file mode 100644 index 513b3bf3..00000000 Binary files a/src/assets/imgs/indexPage/shusongxian-youhuo@2x.png and /dev/null differ diff --git a/src/assets/imgs/indexPage/shusongxian@2x.png b/src/assets/imgs/indexPage/shusongxian@2x.png deleted file mode 100644 index c912ba65..00000000 Binary files a/src/assets/imgs/indexPage/shusongxian@2x.png and /dev/null differ diff --git a/src/assets/imgs/indexPage/stop-car.png b/src/assets/imgs/indexPage/stop-car.png new file mode 100644 index 00000000..5c23866f Binary files /dev/null and b/src/assets/imgs/indexPage/stop-car.png differ diff --git a/src/assets/imgs/indexPage/tuopan备份 18@2x.png b/src/assets/imgs/indexPage/tuopan备份 18@2x.png deleted file mode 100644 index 75993b9b..00000000 Binary files a/src/assets/imgs/indexPage/tuopan备份 18@2x.png and /dev/null differ diff --git a/src/assets/imgs/indexPage/tuopan备份 62@2x.png b/src/assets/imgs/indexPage/tuopan备份 62@2x.png deleted file mode 100644 index 4dd5b1a8..00000000 Binary files a/src/assets/imgs/indexPage/tuopan备份 62@2x.png and /dev/null differ diff --git a/src/assets/imgs/indexPage/wait-point.png b/src/assets/imgs/indexPage/wait-point.png new file mode 100644 index 00000000..2dd6c8da Binary files /dev/null and b/src/assets/imgs/indexPage/wait-point.png differ diff --git a/src/assets/imgs/indexPage/编组 14.png b/src/assets/imgs/indexPage/zoom.png similarity index 100% rename from src/assets/imgs/indexPage/编组 14.png rename to src/assets/imgs/indexPage/zoom.png diff --git a/src/assets/imgs/indexPage/编组 12@2x.png b/src/assets/imgs/indexPage/编组 12@2x.png deleted file mode 100644 index 8024ac0e..00000000 Binary files a/src/assets/imgs/indexPage/编组 12@2x.png and /dev/null differ diff --git a/src/assets/imgs/indexPage/编组 13@2x.png b/src/assets/imgs/indexPage/编组 13@2x.png deleted file mode 100644 index 20cc70ae..00000000 Binary files a/src/assets/imgs/indexPage/编组 13@2x.png and /dev/null differ diff --git a/src/assets/imgs/indexPage/编组 15@2x(1).png b/src/assets/imgs/indexPage/编组 15@2x(1).png deleted file mode 100644 index c10681bf..00000000 Binary files a/src/assets/imgs/indexPage/编组 15@2x(1).png and /dev/null differ diff --git a/src/assets/imgs/indexPage/编组 15@2x.png b/src/assets/imgs/indexPage/编组 15@2x.png deleted file mode 100644 index de9ef93b..00000000 Binary files a/src/assets/imgs/indexPage/编组 15@2x.png and /dev/null differ diff --git a/src/assets/imgs/indexPage/编组 15备份 2@2x.png b/src/assets/imgs/indexPage/编组 15备份 2@2x.png deleted file mode 100644 index 51138d8e..00000000 Binary files a/src/assets/imgs/indexPage/编组 15备份 2@2x.png and /dev/null differ diff --git a/src/assets/imgs/indexPage/编组 15备份 3@2x.png b/src/assets/imgs/indexPage/编组 15备份 3@2x.png deleted file mode 100644 index 0c04cf61..00000000 Binary files a/src/assets/imgs/indexPage/编组 15备份 3@2x.png and /dev/null differ diff --git a/src/assets/imgs/indexPage/编组 15备份 4@2x.png b/src/assets/imgs/indexPage/编组 15备份 4@2x.png deleted file mode 100644 index 4bbeaa98..00000000 Binary files a/src/assets/imgs/indexPage/编组 15备份 4@2x.png and /dev/null differ diff --git a/src/assets/imgs/indexPage/编组 15备份@2x.png b/src/assets/imgs/indexPage/编组 15备份@2x.png deleted file mode 100644 index cd63accc..00000000 Binary files a/src/assets/imgs/indexPage/编组 15备份@2x.png and /dev/null differ diff --git a/src/assets/imgs/indexPage/编组 18@2x.png b/src/assets/imgs/indexPage/编组 18@2x.png deleted file mode 100644 index a273dd03..00000000 Binary files a/src/assets/imgs/indexPage/编组 18@2x.png and /dev/null differ diff --git a/src/assets/imgs/indexPage/编组 24@2x.png b/src/assets/imgs/indexPage/编组 24@2x.png deleted file mode 100644 index 42017d13..00000000 Binary files a/src/assets/imgs/indexPage/编组 24@2x.png and /dev/null differ diff --git a/src/assets/imgs/indexPage/编组 2@2x.png b/src/assets/imgs/indexPage/编组 2@2x.png deleted file mode 100644 index 3e220acc..00000000 Binary files a/src/assets/imgs/indexPage/编组 2@2x.png and /dev/null differ diff --git a/src/assets/imgs/indexPage/编组 3@2x.png b/src/assets/imgs/indexPage/编组 3@2x.png deleted file mode 100644 index 1b6f1517..00000000 Binary files a/src/assets/imgs/indexPage/编组 3@2x.png and /dev/null differ diff --git a/src/assets/imgs/indexPage/编组 4@2x.png b/src/assets/imgs/indexPage/编组 4@2x.png deleted file mode 100644 index 300488ae..00000000 Binary files a/src/assets/imgs/indexPage/编组 4@2x.png and /dev/null differ diff --git a/src/assets/imgs/indexPage/编组 6@2x.png b/src/assets/imgs/indexPage/编组 6@2x.png deleted file mode 100644 index 2314304e..00000000 Binary files a/src/assets/imgs/indexPage/编组 6@2x.png and /dev/null differ diff --git a/src/assets/imgs/indexPage/编组 7@2x.png b/src/assets/imgs/indexPage/编组 7@2x.png deleted file mode 100644 index 0d2b7a5c..00000000 Binary files a/src/assets/imgs/indexPage/编组 7@2x.png and /dev/null differ diff --git a/src/assets/imgs/indexPage/编组 8@2x.png b/src/assets/imgs/indexPage/编组 8@2x.png deleted file mode 100644 index af45fc54..00000000 Binary files a/src/assets/imgs/indexPage/编组 8@2x.png and /dev/null differ diff --git a/src/assets/imgs/indexPage/编组 9@2x.png b/src/assets/imgs/indexPage/编组 9@2x.png deleted file mode 100644 index fdc78392..00000000 Binary files a/src/assets/imgs/indexPage/编组 9@2x.png and /dev/null differ diff --git a/src/assets/imgs/indexPage/编组@2x.png b/src/assets/imgs/indexPage/编组@2x.png deleted file mode 100644 index cd04fd37..00000000 Binary files a/src/assets/imgs/indexPage/编组@2x.png and /dev/null differ diff --git a/src/views/mapPage/realTimeMap/components/copyOld.vue b/src/views/mapPage/realTimeMap/components/copyOld.vue deleted file mode 100644 index 0ad5f8f8..00000000 --- a/src/views/mapPage/realTimeMap/components/copyOld.vue +++ /dev/null @@ -1,1121 +0,0 @@ - - - - - diff --git a/src/views/mapPage/realTimeMap/components/indexPage.vue b/src/views/mapPage/realTimeMap/components/indexPage.vue index 992eab68..d8533680 100644 --- a/src/views/mapPage/realTimeMap/components/indexPage.vue +++ b/src/views/mapPage/realTimeMap/components/indexPage.vue @@ -61,7 +61,7 @@ {{ item.robotNo || '' }} @@ -190,38 +190,35 @@ @@ -277,16 +274,16 @@
- +
- +
- +
- +
@@ -828,7 +825,6 @@ const getAllNodeList = async (positionMapId) => { item.locationDeepPx = pxObj.pHeight } }) - console.log(state.allMapPointInfo) } //鼠标滚轮 diff --git a/src/views/mapPage/realTimeMap/editMap.vue b/src/views/mapPage/realTimeMap/editMap.vue index 32ef5893..e1c24855 100644 --- a/src/views/mapPage/realTimeMap/editMap.vue +++ b/src/views/mapPage/realTimeMap/editMap.vue @@ -590,17 +590,14 @@ { //地图点击 const mapClick = (e) => { - const x = disposeEventPoints(e).x - const y = disposeEventPoints(e).y - const actualLocationX = disposeEventPoints(e).actualLocationX - const actualLocationY = disposeEventPoints(e).actualLocationY + try { + // 提取坐标处理 + const { x, y, actualLocationX, actualLocationY } = disposeEventPoints(e) + state.actualLocation.x = actualLocationX + state.actualLocation.y = actualLocationY - state.actualLocation.x = actualLocationX - state.actualLocation.y = actualLocationY + //新增节点 + if (toolbarSwitchType.value === 'drawNodes') { + // 优化节点检查逻辑,比较一位小数 + const isDuplicate = state.allMapPointInfo.some( + (item) => + Number(item.locationX).toFixed(1) === Number(x).toFixed(1) && + Number(item.locationY).toFixed(1) === Number(y).toFixed(1) + ) - //新增节点 - if (toolbarSwitchType.value === 'drawNodes') { - state.allMapPointInfo.push({ - positionMapId: imgBgObj.positionMapId, //地图的id - layerSelectionShow: true, - locationX: x, - locationY: y, - actualLocationX: actualLocationX, - actualLocationY: actualLocationY, - locationDeep: 40, - locationWide: 40, - locationDeepPx: 8, - locationWidePx: 8, - angle: 0, - draggable: true, - resizable: true, - rotatable: false, - lockAspectRatio: false, //横纵比 - mapImageUrl: '', - locationYaw: 0, //弧度 - type: 1, //默认类型1 路径节点 - dataList: [], //存库位的 - dataObj: {} //存 设备点 停车点 文字 - }) - addEditHistory() - } - //文字输入 - if (toolbarSwitchType.value === 'text') { - state.showInputBox = true - state.inputBoxStyle.locationX = x - state.inputBoxStyle.locationY = y - state.inputBoxStyle.actualLocationX = actualLocationX - state.inputBoxStyle.actualLocationY = actualLocationY + if (!isDuplicate) { + state.allMapPointInfo.push({ + positionMapId: imgBgObj.positionMapId, + layerSelectionShow: true, + locationX: x, + locationY: y, + actualLocationX, + actualLocationY, + locationDeep: 40, + locationWide: 40, + locationDeepPx: 8, + locationWidePx: 8, + angle: 0, + draggable: true, + resizable: true, + rotatable: false, + lockAspectRatio: false, + mapImageUrl: '', + locationYaw: 0, + type: 1, + dataList: [], + dataObj: {} + }) + addEditHistory() + } else { + message.warning('该点位已经存在节点') + } + } + //文字输入 + else if (toolbarSwitchType.value === 'text') { + state.showInputBox = true + state.inputBoxStyle = { + locationX: x, + locationY: y, + actualLocationX, + actualLocationY + } - // 聚焦输入框 - setTimeout(() => { - inputBoxRef.value.focus() - }, 0) - } - //测距 - if (toolbarSwitchType.value === 'ranging') { - measureDistancesClick(e) + // 聚焦输入框 + setTimeout(() => { + inputBoxRef.value?.focus() + }, 0) + } + //测距 + else if (toolbarSwitchType.value === 'ranging') { + measureDistancesClick(e) + } + } catch (error) { + console.error('地图点击处理错误:', error) } } + //输入文字样式改变 const textFormSuccess = (form) => { state.inputBoxStyle.fontSize = `${form.fontSize}` @@ -1746,7 +1758,6 @@ const toolbarClick = async (item) => { state.showInputBox = false state.inputBoxValue = '' } - if ( toolbarSwitchType.value === 'generateLine' || toolbarSwitchType.value === 'createLineLibrary' || @@ -1765,10 +1776,6 @@ const toolbarClick = async (item) => { state.cursorStyle = 'pointer' } else { state.cursorStyle = `auto` - //工具切换 不适用框选的 要把框选的信息都删掉 - state.drawSelectionAreaShow = false - state.allDrawSelectionAreaBox = [] - state.drawSelectionPointList = [] } //非测距 @@ -1795,6 +1802,11 @@ const toolbarClick = async (item) => { state.prohibitedOperation = false } + //工具切换 不适用框选的 要把框选的信息都删掉 + state.drawSelectionAreaShow = false + state.allDrawSelectionAreaBox = [] + state.drawSelectionPointList = [] + switch (type) { case 'open': // 打开 @@ -2733,6 +2745,18 @@ const submitBatchCopyingFormSuccess = async (form) => { actualPoint } = calculateNewCoordinates(node.locationX, node.locationY) + // 检查节点是否重复 + const isDuplicate = state.allMapPointInfo.some( + (item) => + Number(item.locationX).toFixed(1) === Number(locationX).toFixed(1) && + Number(item.locationY).toFixed(1) === Number(locationY).toFixed(1) + ) + + if (isDuplicate) { + message.warning(`节点(${locationX}, ${locationY})已存在,已跳过`) + return null + } + const { sortNum, createTime, ...restNode } = node let dataObj = {} @@ -2775,6 +2799,9 @@ const submitBatchCopyingFormSuccess = async (form) => { }) ) + // 过滤掉重复的节点 + const filteredPointList = newPointList.filter((point) => point !== null) + // 处理路线列表 const newRouteList = validRoutes.map((route) => { const newRoute = { ...route } @@ -2842,7 +2869,7 @@ const submitBatchCopyingFormSuccess = async (form) => { return restRoute }) - state.allMapPointInfo.push(...newPointList) + state.allMapPointInfo.push(...filteredPointList) state.mapRouteList.push(...newRouteList) message.success('复制成功') addEditHistory() @@ -4091,7 +4118,7 @@ const findClosestPoint = (x, y) => { background-color: #fff; box-shadow: rgba(0, 0, 0, 0.06) 0rem 0.125rem 0.1875rem; height: 60px; - padding: 0 0.75rem; + padding: 0 0 0 4px; .top-tool-list { max-width: calc(100vw - 260px); @@ -4107,7 +4134,7 @@ const findClosestPoint = (x, y) => { .tool-item { cursor: pointer; - width: 44px; + width: 42px; height: 60px; display: flex; flex-direction: column;