From 9eb8bb59b802ceef1f52d334c8e577f2bf02c90e Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Wed, 21 Jan 2026 15:12:02 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 applications/drone-command/src/components/map-container/device-map-container.vue |   35 +++++++++++++++++++++++++++++++----
 1 files changed, 31 insertions(+), 4 deletions(-)

diff --git a/applications/drone-command/src/components/map-container/device-map-container.vue b/applications/drone-command/src/components/map-container/device-map-container.vue
index 1dcdcc8..46199a1 100644
--- a/applications/drone-command/src/components/map-container/device-map-container.vue
+++ b/applications/drone-command/src/components/map-container/device-map-container.vue
@@ -22,7 +22,15 @@
 
 		<div v-if="popupVisible" class="device-popup" :style="popupStyle" @click.stop>
 			<div class="device-popup__header">
-				<span class="device-popup__title">{{ popupTitle }}</span>
+				<el-tooltip
+					class="device-popup__title-tooltip"
+					:content="popupTitle"
+					placement="top"
+					effect="dark"
+					:show-after="200"
+				>
+					<span class="device-popup__title">{{ popupTitleDisplay }}</span>
+				</el-tooltip>
 
 				<img class="device-popup__close" :src="popupClose" alt="" @click.stop="closePopup">
 			</div>
@@ -496,11 +504,10 @@
 				style: Cesium.LabelStyle.FILL_AND_OUTLINE,
 				verticalOrigin: Cesium.VerticalOrigin.CENTER,
 				horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
-				font: '12pt Source Han Sans CN',
+				font: '11pt Source Han Sans CN',
 				eyeOffset: new Cesium.Cartesian3(0, 0, -20), // 让label "浮" 在广告牌前面
-				pixelOffset: new Cesium.Cartesian2(2, -11),
 
-				pixelOffset: new Cesium.Cartesian2(0, -48),
+				pixelOffset: new Cesium.Cartesian2(0, -35),
 				disableDepthTestDistance: Number.POSITIVE_INFINITY,
 				heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
 			},
@@ -580,7 +587,13 @@
 	top: `${popupPosition.value.y}px`,
 }))
 
+const POPUP_TITLE_MAX = 12
 const popupTitle = computed(() => selectedDevice.value?.deviceName || selectedDevice.value?.deviceModel || '-')
+const popupTitleOverflow = computed(() => popupTitle.value.length > POPUP_TITLE_MAX)
+const popupTitleDisplay = computed(() => {
+	if (!popupTitleOverflow.value) return popupTitle.value
+	return `${popupTitle.value.slice(0, POPUP_TITLE_MAX)}……`
+})
 const popupStatusText = computed(() => {
 	const status = selectedDevice.value?.status
 	if (status === 0) return '在线'
@@ -829,6 +842,20 @@
 			border-radius: 0px 0px 5px 5px;
 		}
 
+		.device-popup__title-tooltip {
+			flex: 1;
+			min-width: 0;
+			display: block;
+		}
+
+		.device-popup__title {
+			display: inline-block;
+			max-width: 100%;
+			white-space: nowrap;
+			overflow: hidden;
+			text-overflow: ellipsis;
+		}
+
 		.device-popup__close {
 			cursor: pointer;
 		}

--
Gitblit v1.9.3