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" 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 路径点 --> <!-- 1 路径点 -->
<el-tooltip <el-tooltip
class="box-item" class="box-item"
@ -417,17 +420,33 @@
:x2="Number(state.currentDrawX)" :x2="Number(state.currentDrawX)"
:y2="Number(state.currentDrawY)" :y2="Number(state.currentDrawY)"
stroke="#00329F" stroke="#00329F"
stroke-width="4" stroke-width="3"
/> />
<template v-if="state.mapRouteList.length > 0"> <template v-if="state.mapRouteList.length > 0">
<template v-for="(curve, index) in state.mapRouteList" :key="index"> <template v-for="(curve, index) in state.mapRouteList" :key="index">
<!-- 定义箭头 --> <!-- 定义箭头 -->
<defs> <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" /> <path d="M 0 0 L 10 5 L 0 10 z" fill="black" />
</marker> </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" /> <path d="M 10 0 L 0 5 L 10 10 z" fill="black" />
</marker> </marker>
</defs> </defs>
@ -880,10 +899,10 @@ const mapClick = (e) => {
locationY: y, locationY: y,
actualLocationX: actualLocationX, actualLocationX: actualLocationX,
actualLocationY: actualLocationY, actualLocationY: actualLocationY,
locationDeep: 50, locationDeep: 40,
locationWide: 50, locationWide: 40,
locationDeepPx: 10, locationDeepPx: 8,
locationWidePx: 10, locationWidePx: 8,
angle: 0, angle: 0,
draggable: true, draggable: true,
resizable: true, resizable: true,
@ -1609,10 +1628,10 @@ const markFormSubmit = async () => {
locationY: pointPx.y, locationY: pointPx.y,
actualLocationX: actualPoint.actualLocationX, actualLocationX: actualPoint.actualLocationX,
actualLocationY: actualPoint.actualLocationY, actualLocationY: actualPoint.actualLocationY,
locationDeep: 50, locationDeep: 40,
locationWide: 50, locationWide: 40,
locationDeepPx: 10, locationDeepPx: 8,
locationWidePx: 10, locationWidePx: 8,
angle: 0, angle: 0,
draggable: true, draggable: true,
resizable: true, resizable: true,
@ -2196,7 +2215,6 @@ const getAllNodeList = async () => {
let list = await MapApi.getPositionMapItemList({ let list = await MapApi.getPositionMapItemList({
positionMapId: imgBgObj.positionMapId positionMapId: imgBgObj.positionMapId
}) })
console.log(imgBgObj.width)
state.allMapPointInfo = [] state.allMapPointInfo = []
state.currentIndex = 0 state.currentIndex = 0
list.forEach((item) => { list.forEach((item) => {
@ -2207,8 +2225,8 @@ const getAllNodeList = async () => {
if (item.type === 1) { if (item.type === 1) {
item.dataObj = {} item.dataObj = {}
item.dataList = [] item.dataList = []
item.locationDeep = 50 item.locationDeep = 40
item.locationWide = 50 item.locationWide = 40
item.draggable = true item.draggable = true
item.resizable = false item.resizable = false
item.rotatable = false item.rotatable = false