zhiyuan-007 hai 2 semanas
pai
achega
95e2e7b047

+ 1 - 2
src/components/MapView.vue

@@ -25,11 +25,10 @@ export default {
 			}, 2500)
 			myBridge.bridgeContent = bridge = new CityGis.Bridge({
 				id: 'i_map',
-				//url: 'http://localhost:5173/map-tool-widget/',
+				url: 'http://localhost:5173/map-tool-widget/',
 				// url: 'https://cimweb.zjw.sh.cegn.cn:2007/map-tool-widget/#/',
 				// url: 'http://172.16.8.44:9250/map-tool-widget/#/jk_map',
 				// url: 'http://172.16.8.44:8250/map-tool-widget/#/jk_map',
-				url: 'http://10.1.80.67:5173/map-tool-widget/',
 
 				onReady: function () {
 					console.log('地图创建完成')

+ 1 - 1
src/service/panelHxhs.js

@@ -16,7 +16,7 @@ export function routePlanAll(params) {
 		url: '/DataSearch/routePlan/search/routePlanAll',
 		data: {
 			paths: params.paths,
-			level: 14,
+			level: 15,
 			radius: 5,
 			isShowGrid: 0,
 			fields: ['gridCode', 'x', 'y', 'z', 'element', 'boxSize'],

+ 18 - 2
src/utils/map/addLayer.js

@@ -136,7 +136,7 @@ export async function AddSingleLayer(params) {
 				id: params.id,
 				title: params.title,
 				visible: params.visible,
-				opacity: 0.8,
+				opacity: 1,
 				url: params.url + '/SceneServer',
 				where: 'objectid not in  (3941595,3841426)',
 				type: 'scene',
@@ -156,7 +156,7 @@ export async function AddSingleLayer(params) {
 								type: 'fill',
 								material: {
 									//color: [102, 167, 219, 0.9],
-									color: [255, 255, 255, 0.9],
+									color: [255, 255, 255, 1],
 									colorMixMode: 'replace',
 								},
 							},
@@ -412,3 +412,19 @@ export async function setUavDemo(type, stauts) {
 	}
 	layoutStore.toggleGlobalLoading(false)
 }
+
+export function limitHeightAnalysis(params) {
+	invokeParams('LimitHeightAnalysis', {
+		status: params.show ? 'show' : 'hide',
+		layerId: 'D8503010320240901',
+		limitH: params.minZ,
+		maxLimitH: params.maxZ,
+		rings: [
+			[4929.0513305664, 2427.762878418, 0],
+			[544.4196777344, 2427.762878418, 0],
+			[544.4196777344, -1598.4520874023, 0],
+			[4929.0513305664, -1598.4520874023, 0],
+		],
+		token: '',
+	})
+}

+ 1 - 1
src/utils/map/addTool.js

@@ -88,7 +88,7 @@ export async function getPathCube(params) {
 	invokeParams('GetPathCube', {
 		id: 'pathCube',
 		status: params.status,
-		level: 14,
+		level: 15,
 		paths: params.paths,
 		radius: 5,
 	})

+ 2 - 2
src/views/home/cpns/AreaGrid.vue

@@ -5,7 +5,7 @@
 		<el-form ref="formRef" class="p-form mt-7" :model="form" label-position="left" size="large">
 			<el-form-item label="网格级别" prop="level">
 				<el-select v-model="form.level" placeholder="">
-					<el-option label="14级" :value="14" />
+					<el-option label="15级" :value="15" />
 				</el-select>
 			</el-form-item>
 			<el-form-item label="高度" prop="height">
@@ -51,7 +51,7 @@ const mapStore = useMapStore()
 const layoutStore = ref(useLayoutStore())
 
 const form = ref({
-	level: 14,
+	level: 15,
 	isOccupy: true,
 	minZ: 0,
 	maxZ: 120,

+ 1 - 1
src/views/home/cpns/AreaPlan.vue

@@ -97,7 +97,7 @@ function getShapeInfo() {
 	return {
 		height: +form.value.height,
 		rings: drawGeometry.rings,
-		level: '14',
+		level: '15',
 	}
 }
 

+ 36 - 29
src/views/home/cpns/LayeredInspect.vue

@@ -16,16 +16,13 @@
 					</template>
 				</el-input>
 			</el-form-item>
-			<el-form-item label="绘制">
-				<el-button class="btn-secondary" @click="handleDraw">绘制</el-button>
-			</el-form-item>
-			<el-form-item label="评价系数">
-				<el-checkbox v-model="form.evaluation">展示</el-checkbox>
-			</el-form-item>
+			<!--			<el-form-item label="绘制">-->
+			<!--				<el-button class="btn-secondary" @click="handleDraw">绘制</el-button>-->
+			<!--			</el-form-item>-->
 		</el-form>
 
 		<div class="text-center">
-			<el-button class="btn-main" :disabled="!hasDraw" @click="handleCalc">开始计算</el-button>
+			<el-button class="btn-main" @click="handleCalc">开始计算</el-button>
 			<el-button class="btn-main" @click="handleClear">清空</el-button>
 		</div>
 	</div>
@@ -34,7 +31,7 @@
 <script setup>
 import useLayoutStore from '@/store/layout'
 import { useMapStore } from '@/store/map'
-import { clearDraw, DrawPolygon, QueryCube } from '@/utils/map/addLayer'
+import { clearDraw, DrawPolygon, limitHeightAnalysis, QueryCube } from '@/utils/map/addLayer'
 import { geometryMeshEffect } from '@/utils/map/addTool.js'
 import { wait } from '@/utils/tools'
 import { ref, watch, onBeforeUnmount } from 'vue'
@@ -44,7 +41,7 @@ const mapStore = useMapStore()
 const layoutStore = ref(useLayoutStore())
 
 const form = ref({
-	level: 14,
+	level: 15,
 	minZ: '0',
 	maxZ: '120',
 	evaluation: false,
@@ -82,33 +79,43 @@ function getMesh(status) {
 	}
 	let height = form.value.maxZ * 1 - form.value.minZ * 1
 	let rings = []
-	for (let i = 0; i < drawResult[0].length; i++) {
-		rings.push([drawResult[0][i][0], drawResult[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.2],
-				},
-			},
+
+	let bigRings = [
+		[
+			[4929.0513305664, 2427.762878418, 0],
+			[544.4196777344, 2427.762878418, 0],
+			[544.4196777344, -1598.4520874023, 0],
+			[4929.0513305664, -1598.4520874023, 0],
+			[4929.0513305664, 2427.762878418, 0],
 		],
-	})
+	]
+
+	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],
+	// 			},
+	// 		},
+	// 	],
+	// })
 }
 
 function handleCalc() {
 	const { maxZ, minZ } = form.value
-	if (!drawResult) return
 	if (!minZ || !maxZ) return
 	handleClear()
 	getMesh('show')
 	setTimeout(() => {
-		QueryCube({
+		limitHeightAnalysis({
 			...form.value,
 			show: true,
 			level: Number(form.value.level),
@@ -118,9 +125,9 @@ function handleCalc() {
 }
 
 function handleClear() {
-	clearDraw()
+	// clearDraw()
 	getMesh('hide')
-	QueryCube({
+	limitHeightAnalysis({
 		show: false,
 	})
 }