图片替换
BIN
src/assets/imgs/indexPage/bin-location.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
BIN
src/assets/imgs/indexPage/change-point.png
Normal file
After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
BIN
src/assets/imgs/indexPage/equipment.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 666 B After Width: | Height: | Size: 666 B |
Before Width: | Height: | Size: 855 B After Width: | Height: | Size: 855 B |
Before Width: | Height: | Size: 794 B After Width: | Height: | Size: 794 B |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 727 B |
BIN
src/assets/imgs/indexPage/stop-car.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 767 B |
Before Width: | Height: | Size: 428 B |
BIN
src/assets/imgs/indexPage/wait-point.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 856 B After Width: | Height: | Size: 856 B |
Before Width: | Height: | Size: 860 B |
Before Width: | Height: | Size: 551 B |
Before Width: | Height: | Size: 8.6 KiB |
Before Width: | Height: | Size: 8.0 KiB |
Before Width: | Height: | Size: 8.8 KiB |
Before Width: | Height: | Size: 8.8 KiB |
Before Width: | Height: | Size: 8.7 KiB |
Before Width: | Height: | Size: 8.8 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 443 B |
Before Width: | Height: | Size: 7.9 KiB |
Before Width: | Height: | Size: 7.7 KiB |
Before Width: | Height: | Size: 7.8 KiB |
Before Width: | Height: | Size: 7.8 KiB |
Before Width: | Height: | Size: 7.8 KiB |
Before Width: | Height: | Size: 481 B |
Before Width: | Height: | Size: 859 B |
Before Width: | Height: | Size: 7.7 KiB |
@ -61,7 +61,7 @@
|
||||
{{ item.robotNo || '' }}
|
||||
</div>
|
||||
<img
|
||||
src="@/assets/imgs/indexPage/chache-4备份 7@2x.png"
|
||||
src="@/assets/imgs/indexPage/car2.png"
|
||||
style="position: absolute; top: 0; left: 0; width: 100%; height: 100%"
|
||||
/>
|
||||
</div>
|
||||
@ -190,38 +190,35 @@
|
||||
<!-- 库位点 -->
|
||||
<img
|
||||
v-else-if="item.type === 2"
|
||||
src="https://api.znkjfw.com/admin-api/infra/file/4/get/库位库存_png_179_1744098544821.png"
|
||||
src="@/assets/imgs/indexPage/bin-location.png"
|
||||
:style="nodeStyle(item, index)"
|
||||
@dblclick="storeClick(item)"
|
||||
/>
|
||||
<!-- 设备点 -->
|
||||
<img
|
||||
v-else-if="item.type === 3"
|
||||
:src="
|
||||
item.dataObj.mapImageUrl ||
|
||||
'https://api.znkjfw.com/admin-api/infra/file/4/get/设备 (4)_png_179_1744102025024.png'
|
||||
"
|
||||
:src="item.dataObj.mapImageUrl || '@/assets/imgs/indexPage/equipment.png'"
|
||||
style="background: #fff"
|
||||
:style="nodeStyle(item, index)"
|
||||
/>
|
||||
<!-- 停车点 -->
|
||||
<img
|
||||
v-else-if="item.type === 4"
|
||||
src="https://api.znkjfw.com/admin-api/infra/file/4/get/停车位_png_179_1744098982069.png"
|
||||
src="@/assets/imgs/indexPage/stop-car.png"
|
||||
style="background: #fff"
|
||||
:style="nodeStyle(item, index)"
|
||||
/>
|
||||
<!-- 区域变更点 -->
|
||||
<img
|
||||
v-else-if="item.type === 5"
|
||||
src="https://api.znkjfw.com/admin-api/infra/file/4/get/区域变更 (1)_png_179_1744100605191.png"
|
||||
src="@/assets/imgs/indexPage/change-point.png"
|
||||
style="background: #fff"
|
||||
:style="nodeStyle(item, index)"
|
||||
/>
|
||||
<!-- 等待点 -->
|
||||
<img
|
||||
v-else-if="item.type === 6"
|
||||
src="https://api.znkjfw.com/admin-api/infra/file/4/get/等待_png_179_1744102070670.png"
|
||||
src="@/assets/imgs/indexPage/wait-point.png"
|
||||
style="background: #fff"
|
||||
:style="nodeStyle(item, index)"
|
||||
/>
|
||||
@ -277,16 +274,16 @@
|
||||
<!-- 右下角的功能 -->
|
||||
<div class="affix-container-right" v-if="!isAllBoard">
|
||||
<div class="item" @click="changeIsDrag">
|
||||
<img src="@/assets/imgs/indexPage/编组 12.png" />
|
||||
<img src="@/assets/imgs/indexPage/hand.png" />
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="@/assets/imgs/indexPage/编组 14.png" @click="changeSize('add')" />
|
||||
<img src="@/assets/imgs/indexPage/zoom.png" @click="changeSize('add')" />
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="@/assets/imgs/indexPage/编组 15.png" @click="changeSize('sub')" />
|
||||
<img src="@/assets/imgs/indexPage/search.png" @click="changeSize('sub')" />
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="@/assets/imgs/indexPage/编组 22.png" @click="toggleFullScreen" />
|
||||
<img src="@/assets/imgs/indexPage/full-screen.png" @click="toggleFullScreen" />
|
||||
</div>
|
||||
</div>
|
||||
<storeDialog ref="storeDialogRef" @success="emitParent" />
|
||||
@ -828,7 +825,6 @@ const getAllNodeList = async (positionMapId) => {
|
||||
item.locationDeepPx = pxObj.pHeight
|
||||
}
|
||||
})
|
||||
console.log(state.allMapPointInfo)
|
||||
}
|
||||
|
||||
//鼠标滚轮
|
||||
|
@ -590,17 +590,14 @@
|
||||
<!-- 2 库位点 -->
|
||||
<img
|
||||
v-if="item.type === 2 && item.layerSelectionShow"
|
||||
src="https://api.znkjfw.com/admin-api/infra/file/4/get/库位库存_png_179_1744098544821.png"
|
||||
src="@/assets/imgs/indexPage/bin-location.png"
|
||||
alt=""
|
||||
:style="binLocationStyle(item, index)"
|
||||
/>
|
||||
<!-- 3 设备点 -->
|
||||
<img
|
||||
v-if="item.type === 3 && item.layerSelectionShow"
|
||||
:src="
|
||||
item.mapImageUrl ||
|
||||
'https://api.znkjfw.com/admin-api/infra/file/4/get/设备 (4)_png_179_1744102025024.png'
|
||||
"
|
||||
:src="item.mapImageUrl || '@/assets/imgs/indexPage/equipment.png'"
|
||||
alt=""
|
||||
style="background: #fff"
|
||||
:style="nodeStyle(item, index)"
|
||||
@ -608,7 +605,7 @@
|
||||
<!-- 4 停车点 -->
|
||||
<img
|
||||
v-if="item.type === 4 && item.layerSelectionShow"
|
||||
src="https://api.znkjfw.com/admin-api/infra/file/4/get/停车位_png_179_1744098982069.png"
|
||||
src="@/assets/imgs/indexPage/stop-car.png"
|
||||
alt=""
|
||||
style="background: #fff"
|
||||
:style="nodeStyle(item, index)"
|
||||
@ -616,7 +613,7 @@
|
||||
<!-- 5 区域变更点 -->
|
||||
<img
|
||||
v-if="item.type === 5 && item.layerSelectionShow"
|
||||
src="https://api.znkjfw.com/admin-api/infra/file/4/get/区域变更 (1)_png_179_1744100605191.png"
|
||||
src="@/assets/imgs/indexPage/change-point.png"
|
||||
alt=""
|
||||
style="background: #fff"
|
||||
:style="nodeStyle(item, index)"
|
||||
@ -624,7 +621,7 @@
|
||||
<!-- 6 等待点 -->
|
||||
<img
|
||||
v-if="item.type === 6 && item.layerSelectionShow"
|
||||
src="https://api.znkjfw.com/admin-api/infra/file/4/get/等待_png_179_1744102070670.png"
|
||||
src="@/assets/imgs/indexPage/wait-point.png"
|
||||
alt=""
|
||||
style="background: #fff"
|
||||
:style="nodeStyle(item, index)"
|
||||
@ -1246,23 +1243,29 @@ const backNextStep = () => {
|
||||
|
||||
//地图点击
|
||||
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
|
||||
|
||||
//新增节点
|
||||
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 (!isDuplicate) {
|
||||
state.allMapPointInfo.push({
|
||||
positionMapId: imgBgObj.positionMapId, //地图的id
|
||||
positionMapId: imgBgObj.positionMapId,
|
||||
layerSelectionShow: true,
|
||||
locationX: x,
|
||||
locationY: y,
|
||||
actualLocationX: actualLocationX,
|
||||
actualLocationY: actualLocationY,
|
||||
actualLocationX,
|
||||
actualLocationY,
|
||||
locationDeep: 40,
|
||||
locationWide: 40,
|
||||
locationDeepPx: 8,
|
||||
@ -1271,33 +1274,42 @@ const mapClick = (e) => {
|
||||
draggable: true,
|
||||
resizable: true,
|
||||
rotatable: false,
|
||||
lockAspectRatio: false, //横纵比
|
||||
lockAspectRatio: false,
|
||||
mapImageUrl: '',
|
||||
locationYaw: 0, //弧度
|
||||
type: 1, //默认类型1 路径节点
|
||||
dataList: [], //存库位的
|
||||
dataObj: {} //存 设备点 停车点 文字
|
||||
locationYaw: 0,
|
||||
type: 1,
|
||||
dataList: [],
|
||||
dataObj: {}
|
||||
})
|
||||
addEditHistory()
|
||||
} else {
|
||||
message.warning('该点位已经存在节点')
|
||||
}
|
||||
}
|
||||
//文字输入
|
||||
if (toolbarSwitchType.value === 'text') {
|
||||
else if (toolbarSwitchType.value === 'text') {
|
||||
state.showInputBox = true
|
||||
state.inputBoxStyle.locationX = x
|
||||
state.inputBoxStyle.locationY = y
|
||||
state.inputBoxStyle.actualLocationX = actualLocationX
|
||||
state.inputBoxStyle.actualLocationY = actualLocationY
|
||||
state.inputBoxStyle = {
|
||||
locationX: x,
|
||||
locationY: y,
|
||||
actualLocationX,
|
||||
actualLocationY
|
||||
}
|
||||
|
||||
// 聚焦输入框
|
||||
setTimeout(() => {
|
||||
inputBoxRef.value.focus()
|
||||
inputBoxRef.value?.focus()
|
||||
}, 0)
|
||||
}
|
||||
//测距
|
||||
if (toolbarSwitchType.value === 'ranging') {
|
||||
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;
|
||||
|