Selaa lähdekoodia

要素点查询

gr 1 kuukausi sitten
vanhempi
commit
fd403912ba
2 muutettua tiedostoa jossa 10 lisäystä ja 1 poistoa
  1. 2 1
      src/views/home/cpns/FloatPanelAirSpace.vue
  2. 8 0
      src/views/home/cpns/PanelSjwg.vue

+ 2 - 1
src/views/home/cpns/FloatPanelAirSpace.vue

@@ -5,7 +5,7 @@
 				<img src="@/assets/images/svg/close.svg" alt="" />
 			</i>
 
-			<h2 class="c-title">空域信息</h2>
+			<h2 class="c-title">要素信息</h2>
 
 			<ul class="des-list">
 				<li v-for="item in list">
@@ -39,6 +39,7 @@ function handleClose() {
 watch(
 	() => mapStore.clickResult,
 	(val) => {
+		if (Object.keys(val).length < 0) return
 		list.value.forEach((row) => {
 			row.value = val[row.id] + row.unit
 		})

+ 8 - 0
src/views/home/cpns/PanelSjwg.vue

@@ -334,6 +334,14 @@ function handleCheck(item, type) {
 			break
 		case 'plot':
 			color = hexToRgb(featureLists.value.find((i) => i.type === 'plot').color, 0.7)
+			const { height, coneHeight, cylinderHeight } = shapeObj
+			additional = {
+				attributes: {
+					id: item.id,
+					name: item.name,
+					height: height || coneHeight + cylinderHeight,
+				},
+			}
 			break
 		case 'route':
 			color = hexToRgb(featureLists.value.find((i) => i.type === 'route').color, 0.5)