图片替换
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 || '' }}
|
{{ item.robotNo || '' }}
|
||||||
</div>
|
</div>
|
||||||
<img
|
<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%"
|
style="position: absolute; top: 0; left: 0; width: 100%; height: 100%"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@ -190,38 +190,35 @@
|
|||||||
<!-- 库位点 -->
|
<!-- 库位点 -->
|
||||||
<img
|
<img
|
||||||
v-else-if="item.type === 2"
|
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)"
|
:style="nodeStyle(item, index)"
|
||||||
@dblclick="storeClick(item)"
|
@dblclick="storeClick(item)"
|
||||||
/>
|
/>
|
||||||
<!-- 设备点 -->
|
<!-- 设备点 -->
|
||||||
<img
|
<img
|
||||||
v-else-if="item.type === 3"
|
v-else-if="item.type === 3"
|
||||||
:src="
|
:src="item.dataObj.mapImageUrl || '@/assets/imgs/indexPage/equipment.png'"
|
||||||
item.dataObj.mapImageUrl ||
|
|
||||||
'https://api.znkjfw.com/admin-api/infra/file/4/get/设备 (4)_png_179_1744102025024.png'
|
|
||||||
"
|
|
||||||
style="background: #fff"
|
style="background: #fff"
|
||||||
:style="nodeStyle(item, index)"
|
:style="nodeStyle(item, index)"
|
||||||
/>
|
/>
|
||||||
<!-- 停车点 -->
|
<!-- 停车点 -->
|
||||||
<img
|
<img
|
||||||
v-else-if="item.type === 4"
|
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="background: #fff"
|
||||||
:style="nodeStyle(item, index)"
|
:style="nodeStyle(item, index)"
|
||||||
/>
|
/>
|
||||||
<!-- 区域变更点 -->
|
<!-- 区域变更点 -->
|
||||||
<img
|
<img
|
||||||
v-else-if="item.type === 5"
|
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="background: #fff"
|
||||||
:style="nodeStyle(item, index)"
|
:style="nodeStyle(item, index)"
|
||||||
/>
|
/>
|
||||||
<!-- 等待点 -->
|
<!-- 等待点 -->
|
||||||
<img
|
<img
|
||||||
v-else-if="item.type === 6"
|
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="background: #fff"
|
||||||
:style="nodeStyle(item, index)"
|
:style="nodeStyle(item, index)"
|
||||||
/>
|
/>
|
||||||
@ -277,16 +274,16 @@
|
|||||||
<!-- 右下角的功能 -->
|
<!-- 右下角的功能 -->
|
||||||
<div class="affix-container-right" v-if="!isAllBoard">
|
<div class="affix-container-right" v-if="!isAllBoard">
|
||||||
<div class="item" @click="changeIsDrag">
|
<div class="item" @click="changeIsDrag">
|
||||||
<img src="@/assets/imgs/indexPage/编组 12.png" />
|
<img src="@/assets/imgs/indexPage/hand.png" />
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<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>
|
||||||
<div class="item">
|
<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>
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<img src="@/assets/imgs/indexPage/编组 22.png" @click="toggleFullScreen" />
|
<img src="@/assets/imgs/indexPage/full-screen.png" @click="toggleFullScreen" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<storeDialog ref="storeDialogRef" @success="emitParent" />
|
<storeDialog ref="storeDialogRef" @success="emitParent" />
|
||||||
@ -828,7 +825,6 @@ const getAllNodeList = async (positionMapId) => {
|
|||||||
item.locationDeepPx = pxObj.pHeight
|
item.locationDeepPx = pxObj.pHeight
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
console.log(state.allMapPointInfo)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//鼠标滚轮
|
//鼠标滚轮
|
||||||
|
@ -590,17 +590,14 @@
|
|||||||
<!-- 2 库位点 -->
|
<!-- 2 库位点 -->
|
||||||
<img
|
<img
|
||||||
v-if="item.type === 2 && item.layerSelectionShow"
|
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=""
|
alt=""
|
||||||
:style="binLocationStyle(item, index)"
|
:style="binLocationStyle(item, index)"
|
||||||
/>
|
/>
|
||||||
<!-- 3 设备点 -->
|
<!-- 3 设备点 -->
|
||||||
<img
|
<img
|
||||||
v-if="item.type === 3 && item.layerSelectionShow"
|
v-if="item.type === 3 && item.layerSelectionShow"
|
||||||
:src="
|
:src="item.mapImageUrl || '@/assets/imgs/indexPage/equipment.png'"
|
||||||
item.mapImageUrl ||
|
|
||||||
'https://api.znkjfw.com/admin-api/infra/file/4/get/设备 (4)_png_179_1744102025024.png'
|
|
||||||
"
|
|
||||||
alt=""
|
alt=""
|
||||||
style="background: #fff"
|
style="background: #fff"
|
||||||
:style="nodeStyle(item, index)"
|
:style="nodeStyle(item, index)"
|
||||||
@ -608,7 +605,7 @@
|
|||||||
<!-- 4 停车点 -->
|
<!-- 4 停车点 -->
|
||||||
<img
|
<img
|
||||||
v-if="item.type === 4 && item.layerSelectionShow"
|
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=""
|
alt=""
|
||||||
style="background: #fff"
|
style="background: #fff"
|
||||||
:style="nodeStyle(item, index)"
|
:style="nodeStyle(item, index)"
|
||||||
@ -616,7 +613,7 @@
|
|||||||
<!-- 5 区域变更点 -->
|
<!-- 5 区域变更点 -->
|
||||||
<img
|
<img
|
||||||
v-if="item.type === 5 && item.layerSelectionShow"
|
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=""
|
alt=""
|
||||||
style="background: #fff"
|
style="background: #fff"
|
||||||
:style="nodeStyle(item, index)"
|
:style="nodeStyle(item, index)"
|
||||||
@ -624,7 +621,7 @@
|
|||||||
<!-- 6 等待点 -->
|
<!-- 6 等待点 -->
|
||||||
<img
|
<img
|
||||||
v-if="item.type === 6 && item.layerSelectionShow"
|
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=""
|
alt=""
|
||||||
style="background: #fff"
|
style="background: #fff"
|
||||||
:style="nodeStyle(item, index)"
|
:style="nodeStyle(item, index)"
|
||||||
@ -1246,58 +1243,73 @@ const backNextStep = () => {
|
|||||||
|
|
||||||
//地图点击
|
//地图点击
|
||||||
const mapClick = (e) => {
|
const mapClick = (e) => {
|
||||||
const x = disposeEventPoints(e).x
|
try {
|
||||||
const y = disposeEventPoints(e).y
|
// 提取坐标处理
|
||||||
const actualLocationX = disposeEventPoints(e).actualLocationX
|
const { x, y, actualLocationX, actualLocationY } = disposeEventPoints(e)
|
||||||
const actualLocationY = disposeEventPoints(e).actualLocationY
|
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 (!isDuplicate) {
|
||||||
if (toolbarSwitchType.value === 'drawNodes') {
|
state.allMapPointInfo.push({
|
||||||
state.allMapPointInfo.push({
|
positionMapId: imgBgObj.positionMapId,
|
||||||
positionMapId: imgBgObj.positionMapId, //地图的id
|
layerSelectionShow: true,
|
||||||
layerSelectionShow: true,
|
locationX: x,
|
||||||
locationX: x,
|
locationY: y,
|
||||||
locationY: y,
|
actualLocationX,
|
||||||
actualLocationX: actualLocationX,
|
actualLocationY,
|
||||||
actualLocationY: actualLocationY,
|
locationDeep: 40,
|
||||||
locationDeep: 40,
|
locationWide: 40,
|
||||||
locationWide: 40,
|
locationDeepPx: 8,
|
||||||
locationDeepPx: 8,
|
locationWidePx: 8,
|
||||||
locationWidePx: 8,
|
angle: 0,
|
||||||
angle: 0,
|
draggable: true,
|
||||||
draggable: true,
|
resizable: true,
|
||||||
resizable: true,
|
rotatable: false,
|
||||||
rotatable: false,
|
lockAspectRatio: false,
|
||||||
lockAspectRatio: false, //横纵比
|
mapImageUrl: '',
|
||||||
mapImageUrl: '',
|
locationYaw: 0,
|
||||||
locationYaw: 0, //弧度
|
type: 1,
|
||||||
type: 1, //默认类型1 路径节点
|
dataList: [],
|
||||||
dataList: [], //存库位的
|
dataObj: {}
|
||||||
dataObj: {} //存 设备点 停车点 文字
|
})
|
||||||
})
|
addEditHistory()
|
||||||
addEditHistory()
|
} else {
|
||||||
}
|
message.warning('该点位已经存在节点')
|
||||||
//文字输入
|
}
|
||||||
if (toolbarSwitchType.value === 'text') {
|
}
|
||||||
state.showInputBox = true
|
//文字输入
|
||||||
state.inputBoxStyle.locationX = x
|
else if (toolbarSwitchType.value === 'text') {
|
||||||
state.inputBoxStyle.locationY = y
|
state.showInputBox = true
|
||||||
state.inputBoxStyle.actualLocationX = actualLocationX
|
state.inputBoxStyle = {
|
||||||
state.inputBoxStyle.actualLocationY = actualLocationY
|
locationX: x,
|
||||||
|
locationY: y,
|
||||||
|
actualLocationX,
|
||||||
|
actualLocationY
|
||||||
|
}
|
||||||
|
|
||||||
// 聚焦输入框
|
// 聚焦输入框
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
inputBoxRef.value.focus()
|
inputBoxRef.value?.focus()
|
||||||
}, 0)
|
}, 0)
|
||||||
}
|
}
|
||||||
//测距
|
//测距
|
||||||
if (toolbarSwitchType.value === 'ranging') {
|
else if (toolbarSwitchType.value === 'ranging') {
|
||||||
measureDistancesClick(e)
|
measureDistancesClick(e)
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error('地图点击处理错误:', error)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//输入文字样式改变
|
//输入文字样式改变
|
||||||
const textFormSuccess = (form) => {
|
const textFormSuccess = (form) => {
|
||||||
state.inputBoxStyle.fontSize = `${form.fontSize}`
|
state.inputBoxStyle.fontSize = `${form.fontSize}`
|
||||||
@ -1746,7 +1758,6 @@ const toolbarClick = async (item) => {
|
|||||||
state.showInputBox = false
|
state.showInputBox = false
|
||||||
state.inputBoxValue = ''
|
state.inputBoxValue = ''
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
toolbarSwitchType.value === 'generateLine' ||
|
toolbarSwitchType.value === 'generateLine' ||
|
||||||
toolbarSwitchType.value === 'createLineLibrary' ||
|
toolbarSwitchType.value === 'createLineLibrary' ||
|
||||||
@ -1765,10 +1776,6 @@ const toolbarClick = async (item) => {
|
|||||||
state.cursorStyle = 'pointer'
|
state.cursorStyle = 'pointer'
|
||||||
} else {
|
} else {
|
||||||
state.cursorStyle = `auto`
|
state.cursorStyle = `auto`
|
||||||
//工具切换 不适用框选的 要把框选的信息都删掉
|
|
||||||
state.drawSelectionAreaShow = false
|
|
||||||
state.allDrawSelectionAreaBox = []
|
|
||||||
state.drawSelectionPointList = []
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//非测距
|
//非测距
|
||||||
@ -1795,6 +1802,11 @@ const toolbarClick = async (item) => {
|
|||||||
state.prohibitedOperation = false
|
state.prohibitedOperation = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//工具切换 不适用框选的 要把框选的信息都删掉
|
||||||
|
state.drawSelectionAreaShow = false
|
||||||
|
state.allDrawSelectionAreaBox = []
|
||||||
|
state.drawSelectionPointList = []
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'open':
|
case 'open':
|
||||||
// 打开
|
// 打开
|
||||||
@ -2733,6 +2745,18 @@ const submitBatchCopyingFormSuccess = async (form) => {
|
|||||||
actualPoint
|
actualPoint
|
||||||
} = calculateNewCoordinates(node.locationX, node.locationY)
|
} = 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
|
const { sortNum, createTime, ...restNode } = node
|
||||||
|
|
||||||
let dataObj = {}
|
let dataObj = {}
|
||||||
@ -2775,6 +2799,9 @@ const submitBatchCopyingFormSuccess = async (form) => {
|
|||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// 过滤掉重复的节点
|
||||||
|
const filteredPointList = newPointList.filter((point) => point !== null)
|
||||||
|
|
||||||
// 处理路线列表
|
// 处理路线列表
|
||||||
const newRouteList = validRoutes.map((route) => {
|
const newRouteList = validRoutes.map((route) => {
|
||||||
const newRoute = { ...route }
|
const newRoute = { ...route }
|
||||||
@ -2842,7 +2869,7 @@ const submitBatchCopyingFormSuccess = async (form) => {
|
|||||||
return restRoute
|
return restRoute
|
||||||
})
|
})
|
||||||
|
|
||||||
state.allMapPointInfo.push(...newPointList)
|
state.allMapPointInfo.push(...filteredPointList)
|
||||||
state.mapRouteList.push(...newRouteList)
|
state.mapRouteList.push(...newRouteList)
|
||||||
message.success('复制成功')
|
message.success('复制成功')
|
||||||
addEditHistory()
|
addEditHistory()
|
||||||
@ -4091,7 +4118,7 @@ const findClosestPoint = (x, y) => {
|
|||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
box-shadow: rgba(0, 0, 0, 0.06) 0rem 0.125rem 0.1875rem;
|
box-shadow: rgba(0, 0, 0, 0.06) 0rem 0.125rem 0.1875rem;
|
||||||
height: 60px;
|
height: 60px;
|
||||||
padding: 0 0.75rem;
|
padding: 0 0 0 4px;
|
||||||
|
|
||||||
.top-tool-list {
|
.top-tool-list {
|
||||||
max-width: calc(100vw - 260px);
|
max-width: calc(100vw - 260px);
|
||||||
@ -4107,7 +4134,7 @@ const findClosestPoint = (x, y) => {
|
|||||||
|
|
||||||
.tool-item {
|
.tool-item {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
width: 44px;
|
width: 42px;
|
||||||
height: 60px;
|
height: 60px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|