图片替换

This commit is contained in:
yyy 2025-06-13 15:13:03 +08:00
parent 1f892593d8
commit 9341e90017
46 changed files with 100 additions and 1198 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

Before

Width:  |  Height:  |  Size: 666 B

After

Width:  |  Height:  |  Size: 666 B

View File

Before

Width:  |  Height:  |  Size: 855 B

After

Width:  |  Height:  |  Size: 855 B

View File

Before

Width:  |  Height:  |  Size: 794 B

After

Width:  |  Height:  |  Size: 794 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 727 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 767 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 428 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 856 B

After

Width:  |  Height:  |  Size: 856 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 860 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 551 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 443 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 481 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 859 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

File diff suppressed because it is too large Load Diff

View File

@ -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)
} }
// //

View File

@ -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;