增加点击展示实际点位

This commit is contained in:
yyy 2025-04-09 15:20:45 +08:00
parent 54872ec9d9
commit d50e547f18

View File

@ -646,6 +646,11 @@
<!-- </map-scale-tool> --> <!-- </map-scale-tool> -->
</div> </div>
<div class="actual-location" v-if="state.actualLocation.x && state.actualLocation.y">
<div>X{{ state.actualLocation.x }}</div>
<div>Y{{ state.actualLocation.y }}</div>
</div>
<!-- 节点编辑 --> <!-- 节点编辑 -->
<editNodeProperties <editNodeProperties
v-if="imgBgObj.positionMapId" v-if="imgBgObj.positionMapId"
@ -1006,6 +1011,9 @@ const mapClick = (e) => {
const actualLocationX = disposeEventPoints(e).actualLocationX const actualLocationX = disposeEventPoints(e).actualLocationX
const actualLocationY = disposeEventPoints(e).actualLocationY const actualLocationY = disposeEventPoints(e).actualLocationY
state.actualLocation.x = actualLocationX
state.actualLocation.y = actualLocationY
// //
if (toolbarSwitchType.value === 'drawNodes') { if (toolbarSwitchType.value === 'drawNodes') {
state.allMapPointInfo.push({ state.allMapPointInfo.push({
@ -1370,7 +1378,11 @@ const state = reactive({
mapMarkCarList: [], // mapMarkCarList: [], //
popoverVisible: false, // popoverVisible: false, //
noLocationNumberList: [], //index noLocationNumberList: [], //index
isShowSortNum: false // isShowSortNum: false, //
actualLocation: {
x: '',
y: ''
}
}) })
const toolbarClick = async (item) => { const toolbarClick = async (item) => {
@ -3330,4 +3342,15 @@ onUnmounted(() => {
user-select: none; user-select: none;
color: #000; color: #000;
} }
.actual-location {
position: fixed;
bottom: 10px;
right: 16px;
background-color: #f48924;
color: #fff;
padding: 6px;
border-radius: 2px;
font-size: 14px;
user-select: none;
}
</style> </style>