This commit is contained in:
xhf 2025-03-06 11:42:50 +08:00
commit 2a807200d9

View File

@ -325,7 +325,10 @@
style="border: none; z-index: 999"
>
<!-- 节点合集 -->
<div @mousedown="startFromPoint(index, $event)" :style="nodeStyle(item, index)">
<div
@mousedown="startFromPoint(index, $event)"
:style="{ width: item.locationWidePx + 'px', height: item.locationDeepPx + 'px' }"
>
<!-- 1 路径点 -->
<el-tooltip
class="box-item"
@ -417,17 +420,33 @@
:x2="Number(state.currentDrawX)"
:y2="Number(state.currentDrawY)"
stroke="#00329F"
stroke-width="4"
stroke-width="3"
/>
<template v-if="state.mapRouteList.length > 0">
<template v-for="(curve, index) in state.mapRouteList" :key="index">
<!-- 定义箭头 -->
<defs>
<marker id="forward-arrow" viewBox="0 0 9 9" refX="10" refY="5" orient="auto">
<marker
id="forward-arrow"
viewBox="0 0 10 10"
refX="10"
refY="5"
orient="auto"
markerWidth="2"
markerHeight="2"
>
<path d="M 0 0 L 10 5 L 0 10 z" fill="black" />
</marker>
<!-- 反向箭头 -->
<marker id="backward-arrow" viewBox="0 0 9 9" refX="0" refY="5" orient="auto">
<marker
id="backward-arrow"
viewBox="0 0 10 10"
refX="0"
refY="5"
orient="auto"
markerWidth="2"
markerHeight="2"
>
<path d="M 10 0 L 0 5 L 10 10 z" fill="black" />
</marker>
</defs>
@ -880,10 +899,10 @@ const mapClick = (e) => {
locationY: y,
actualLocationX: actualLocationX,
actualLocationY: actualLocationY,
locationDeep: 50,
locationWide: 50,
locationDeepPx: 10,
locationWidePx: 10,
locationDeep: 40,
locationWide: 40,
locationDeepPx: 8,
locationWidePx: 8,
angle: 0,
draggable: true,
resizable: true,
@ -1609,10 +1628,10 @@ const markFormSubmit = async () => {
locationY: pointPx.y,
actualLocationX: actualPoint.actualLocationX,
actualLocationY: actualPoint.actualLocationY,
locationDeep: 50,
locationWide: 50,
locationDeepPx: 10,
locationWidePx: 10,
locationDeep: 40,
locationWide: 40,
locationDeepPx: 8,
locationWidePx: 8,
angle: 0,
draggable: true,
resizable: true,
@ -2196,7 +2215,6 @@ const getAllNodeList = async () => {
let list = await MapApi.getPositionMapItemList({
positionMapId: imgBgObj.positionMapId
})
console.log(imgBgObj.width)
state.allMapPointInfo = []
state.currentIndex = 0
list.forEach((item) => {
@ -2207,8 +2225,8 @@ const getAllNodeList = async () => {
if (item.type === 1) {
item.dataObj = {}
item.dataList = []
item.locationDeep = 50
item.locationWide = 50
item.locationDeep = 40
item.locationWide = 40
item.draggable = true
item.resizable = false
item.rotatable = false