Kaynağa Gözat

底图切换问题修复;分层核查功能调整

gr 2 hafta önce
ebeveyn
işleme
2be5d7bd69

+ 10 - 7
src/views/home/cpns/BaseMap.vue

@@ -8,7 +8,7 @@
 			<li v-for="item in baseMapArr" class="t-4px" :key="item.id">
 				<div class="right-row">
 					<div class="content">
-						<div class="basemap-bgc" @click="changeMapBaseMap(item)" :class="[item.className]">
+						<div class="basemap-bgc" :class="[item.className]" @click="changeMapBaseMap(item)">
 							<span class="basemap-name">{{ item.title }}</span>
 						</div>
 					</div>
@@ -34,9 +34,10 @@ const baseMapArr = ref([
 const isBaseExtend = ref(false)
 
 function changeMapBaseMap({ id }) {
+	console.log('changeMapBaseMap', id)
 	let y = 0
-	for (let i = 0; y < this.baseMapArr.length; y++) {
-		if (this.baseMapArr[i].id === id) this.baseMapArr.push(this.baseMapArr.splice(i, 1)[0])
+	for (let i = 0; y < baseMapArr.value.length; y++) {
+		if (baseMapArr.value[i].id === id) baseMapArr.value.push(baseMapArr.value.splice(i, 1)[0])
 		else i++
 	}
 
@@ -74,10 +75,12 @@ $allWidth: $width * 3 + $borderWidth + $splitWidth * 2;
 	height: $height;
 	box-shadow: 0 0 10px rgba(0, 103, 205, 0.2);
 
-	.basemap-list li {
-		width: $width;
-		height: $height;
-		box-sizing: border-box;
+	.basemap-list {
+		li {
+			width: $width;
+			height: $height;
+			box-sizing: border-box;
+		}
 	}
 
 	.right-row {

+ 19 - 20
src/views/home/cpns/LayeredInspect.vue

@@ -31,10 +31,9 @@
 <script setup>
 import useLayoutStore from '@/store/layout'
 import { useMapStore } from '@/store/map'
-import { clearDraw, DrawPolygon, limitHeightAnalysis, QueryCube } from '@/utils/map/addLayer'
+import { limitHeightAnalysis } from '@/utils/map/addLayer'
 import { geometryMeshEffect } from '@/utils/map/addTool.js'
-import { wait } from '@/utils/tools'
-import { ref, watch, onBeforeUnmount } from 'vue'
+import { onBeforeUnmount, ref, watch } from 'vue'
 
 const mapStore = useMapStore()
 
@@ -60,19 +59,19 @@ watch(
 	{ deep: true }
 )
 
-async function handleDraw() {
+/* async function handleDraw() {
 	if (hasDraw) {
 		handleClear()
 		await wait(300)
 	}
 	DrawPolygon({ hasZ: true })
-}
+} */
 
 //获取带高度三维体
 function getMesh(status) {
 	if (status == 'hide') {
 		geometryMeshEffect({
-			id: 'sgzy_mesh',
+			id: 'fchc_mesh',
 			status: 'hide',
 		})
 		return
@@ -93,20 +92,20 @@ function getMesh(status) {
 	for (let i = 0; i < bigRings[0].length; i++) {
 		rings.push([bigRings[0][i][0], bigRings[0][i][1], form.value.minZ * 1])
 	}
-	// geometryMeshEffect({
-	// 	id: 'sgzy_mesh',
-	// 	status: 'show',
-	// 	data: [
-	// 		{
-	// 			type: 'polygon',
-	// 			shape: {
-	// 				height: height,
-	// 				rings: [rings],
-	// 				color: [0, 255, 0, 0.1],
-	// 			},
-	// 		},
-	// 	],
-	// })
+	geometryMeshEffect({
+		id: 'fchc_mesh',
+		status: 'show',
+		data: [
+			{
+				type: 'polygon',
+				shape: {
+					height: height,
+					rings: [rings],
+					color: [0, 255, 0, 0.1],
+				},
+			},
+		],
+	})
 }
 
 function handleCalc() {