DESKTOP-CRQ4N2U\jintian 2 年之前
父節點
當前提交
0426d29b88

+ 18 - 13
src/views/Map3d/Map3DMain.vue

@@ -22,12 +22,14 @@
 	// const SpecialEffects = defineAsyncComponent(() => import('./components/special-effects.vue'));
 	// const coordsTool = defineAsyncComponent(() => import('./components/coordsTool.vue'));
 	// const basicLayer = defineAsyncComponent(() => import('./components/basicLayer.vue'));
-	const queryKeyword = defineAsyncComponent(() => import('./components/query-keyword.vue'));
+	// const queryKeyword = defineAsyncComponent(() => import('./components/query-keyword.vue'));
 	// const toolbars = defineAsyncComponent(() => import('./components/toolbars.vue'));
 	// const map3d = defineAsyncComponent(() => import('./components/map.vue'));
+
+	const navigation = defineAsyncComponent(() => import('./components/navigation.vue'));
+
 	import map3d from './components/map.vue';
 	// import queryKeyword from './components/query-keyword.vue';
-	
 	import toolbars from './components/toolbars.vue';
 	import layer from './components/layer.vue';
 	import measure from './components/measure.vue';
@@ -79,15 +81,18 @@
 			<basicLayer v-show="showbasicLayer" ref="basicLayers"></basicLayer>
 
 			<!-- 弹出框组件,tabs组件测试 -->
-			<jt-popup  title="地区导航" ref="refmapNavigate" :isEmit="true" @closeJTPopup="closeMapNavigate">
+			<jt-popup title="地区导航" ref="refmapNavigate" :isEmit="true" @closeJTPopup="closeMapNavigate">
 				<mapNavigate ref="_refmapNavigate"></mapNavigate>
 			</jt-popup>
 
 			<!-- 关键字查询组件 -->
-			<queryKeyword ref="queryword" />
+			<!-- <queryKeyword ref="queryword" /> -->
+			
+			<!-- 比例尺、指南针 -->
+			<navigation/>
 
 			<!-- 视角标签 -->
-			<jt-popup  title="视角标签" ref="refviewerlabel">
+			<jt-popup title="视角标签" ref="refviewerlabel">
 				<viewerlabel ref="_refviewerlabel"></viewerlabel>
 			</jt-popup>
 
@@ -100,12 +105,12 @@
 			<toolbars />
 
 			<!-- 图上量算组件 -->
-			<jt-popup  title="图上量算" ref="refMeasure" :isEmit="true" @closeJTPopup="closeMeasure">
+			<jt-popup title="图上量算" ref="refMeasure" :isEmit="true" @closeJTPopup="closeMeasure">
 				<measure ref="_refMeasure" />
 			</jt-popup>
 
 			<!-- 数据分析组件 -->
-			<jt-popup  title="数据分析" ref="refAnalysisData">
+			<jt-popup title="数据分析" ref="refAnalysisData">
 				<analysisData />
 			</jt-popup>
 
@@ -120,7 +125,7 @@
 			</jt-drawer>
 
 			<!-- 图形查询组件 -->
-			<jt-popup  title="图形查询" ref="refQueryGraphics" :isEmit="true" @closeJTPopup="closeQuery">
+			<jt-popup title="图形查询" ref="refQueryGraphics" :isEmit="true" @closeJTPopup="closeQuery">
 				<queryGraphics ref="_refQueryGraphics" />
 			</jt-popup>
 
@@ -191,7 +196,7 @@
 		 */
 		data() {
 			return {
-				isshowfooter:false,
+				isshowfooter: false,
 				mapLoaded: false,
 				showbasicLayer: false, //控制地图组件显示隐藏
 				ChartTestData: {}, //剖面分析结果chart
@@ -451,16 +456,16 @@
 				jt3d = map;
 				this.mapLoaded = true;
 			},
-			
-			
+
+
 
 		},
 		created() {
 			store.markID = ''
-			store.queryMapTables=[]
+			store.queryMapTables = []
 		},
 		mounted() {
-			
+
 		}
 	};
 </script>

+ 4 - 4
src/views/Map3d/components/analysis-space.vue

@@ -26,7 +26,7 @@
 					<el-button color="rgb(255 100 100)" @click="SunShine('remove')"><span style="color: #fff;">移除光照分析</span></el-button>
 				</div>
 			</el-collapse-item>
-			<el-collapse-item name="方量分析">
+			<!-- <el-collapse-item name="方量分析">
 				<template #title>
 					<i class='iconfont icon-svgfangliangfenxi' />方量分析
 				</template>
@@ -61,7 +61,7 @@
 						</el-form-item>
 					</el-form>
 				</div>
-			</el-collapse-item>
+			</el-collapse-item> -->
 			<el-collapse-item name="剖面分析">
 				<template #title>
 					<i class='iconfont icon-svgpoumianfenxi' />剖面分析
@@ -97,7 +97,7 @@
 					<el-button color="rgb(255 100 100)" @click="ViewShed('deactivate')"><span style="color: #fff;">清除视域</span></el-button>
 				</div>
 			</el-collapse-item>
-			<el-collapse-item name="限高分析">
+		<!-- 	<el-collapse-item name="限高分析">
 				<template #title>
 					<i class='iconfont icon-svgxiangaofenxi' />限高分析
 				</template>
@@ -118,7 +118,7 @@
 						<el-button color="rgb(255 100 100)" @click="HeightLimit('deactivate')"><span style="color: #fff;">清除限高分析</span></el-button>
 					</div>
 				</div>
-			</el-collapse-item>
+			</el-collapse-item> -->
 			<!-- <el-collapse-item name="剖切展示">
 				<template #title>
 					<i class='iconfont icon-svgpouqiezhanshi' />剖切展示

+ 8 - 8
src/views/Map3d/components/coordsTool.vue

@@ -105,10 +105,10 @@
 			 */
 			pickUp() {
 				let _self = this;
-				
+
 				//移除左键单击事件
 				if (jt3d.handlerLeftClick) {
-					jt3d.handlerLeftClick.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK); 
+					jt3d.handlerLeftClick.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK);
 				}
 
 				jt3d.CommonTools._sketchViewModel._lineLabel = _self.pickCoordsLable.toString();
@@ -117,7 +117,7 @@
 						_self.pickCoordsArray.push(gPoint.lng.toFixed(6) + ',' + gPoint.lat.toFixed(6) + ',' + gPoint.height.toFixed(2)) + ";";
 						_self.pickCoords = _self.pickCoordsArray.join(";\n");
 						_self.pickCoordsLable++;
-						
+
 						//还原左键单击事件
 						_self.$parent.$parent.$refs.refMap3d.clickEntity(jt3d);
 					},
@@ -263,12 +263,12 @@
 			flyToEntity(entity) {
 				let flyToEntity = jt3d.LocateUtil.flyToEntity(entity, {
 					duration: 3,
-					heading: 0,
-					pitch: -60,
-					range: 0
+					heading: 200,
+					pitch: -80,
+					range: 1000
 				});
-				flyToEntity.then(function(entity11) {
-					// alert(1111)
+				flyToEntity.then(function(entity) {
+					jt3d._viewer.entities.remove(entity);
 				});
 			},
 

+ 24 - 10
src/views/Map3d/components/layer.vue

@@ -26,13 +26,13 @@
 		<!-- :default-checked-keys="checkedkeys"  默认勾选的节点的 key 的数组-->
 		<!-- :default-expanded-keys="expandedKeys" 默认展开的节点的 key 的数组-->
 		<!-- @node-click 节点单击事件 -->
-		<el-tree :data="treeData" :default-expanded-keys="expandedKeys" :default-checked-keys="checkedkeys" node-key="id" class="tree-line" ref="treeRef" >
+		<el-tree :data="treeData" :default-expanded-keys="expandedKeys" :default-checked-keys="checkedkeys" node-key="id" class="tree-line" ref="treeRef">
 			<template #default="{ node, data }">
 				<!-- 复选框 -->
 				<el-checkbox v-if="data.ischeck == '1' && store.userport == 'PC'" v-model="node.checked" :indeterminate="node.indeterminate" :disabled="!!node.disabled" @change="handleCheckBoxChange($event, data, node)">
 				</el-checkbox>
 				<el-switch v-else-if="data.ischeck == 1 && store.userport == 'APP'" width="30rem" size="small" v-model="node.checked" @change="handleCheckBoxChange($event, data, node)" />
-				<span class="custom-tree-node"  @click="handleClick(data)">
+				<span class="custom-tree-node" @click="handleClick(data)" style="width: 150rem;text-align: left;">
 					<!-- 字体、图标 -->
 					<!-- <span>
 						<img src="@/assets/images/logo16x16.ico" />
@@ -162,14 +162,28 @@
 
 								break;
 							case "Cesium3DTileset": //加载3DTileset地图服务--实景
+
 								if (window[_serviceId]) {
-									jt3d._viewer.flyTo(window[_serviceId], {
-										offset: {
-											heading: Cesium.Math.toRadians(20.0), //方向
-											pitch: Cesium.Math.toRadians(-90), //倾斜角度
-											range: 1000
-										}
-									});
+									// jt3d._viewer.flyTo(window[_serviceId], {
+									// 	offset: {
+									// 		heading: Cesium.Math.toRadians(20.0), //方向
+									// 		pitch: Cesium.Math.toRadians(-90), //倾斜角度
+									// 		range: 1000
+									// 	}
+									// });
+
+									jt3d._viewer.flyTo(window[_serviceId]);
+
+									// // 初始化参数默认值
+									// let options = {};
+									// options.heading = Cesium.defaultValue(options.heading, 5200);//方向
+									// options.pitch = Cesium.defaultValue(options.pitch, -10);//倾斜角度
+									// options.range = Cesium.defaultValue(options.range, 450.0);
+									// options.duration = Cesium.defaultValue(options.duration, 2);
+
+									// jt3d.LocateUtil.flyToTileset(window[_serviceId],options);
+
+									// jt3d.LocateUtil.zoomToTilesets(window[_serviceId], options);
 								}
 								break;
 							case "Cesium3DTileset_BM": //加载3DTileset地图服务--白膜
@@ -224,7 +238,7 @@
 			 * @param {Object} node TreeNode 的 node 属性
 			 */
 			handleCheckBoxChange(checked, data, node) {
-				
+
 				let _node = this.$refs.treeRef.getNode(data);
 				if (_node.isLeaf) {
 					this.setLayerControl(data, checked);

+ 14 - 4
src/views/Map3d/components/toolbars.vue

@@ -83,15 +83,21 @@
 					<!-- <el-dropdown-item command="query-graphics"><i class="iconfont icon-search"></i>图形查询</el-dropdown-item> -->
 					<!-- <el-dropdown-item command="analysis-data"><i class="iconfont maxsize icon-svgjiexiwenjian"></i>文件解析</el-dropdown-item> -->
 					<el-dropdown-item command="analysis-space"><i class="iconfont icon-duodiankeshiyu"></i>空间分析</el-dropdown-item>
-					<el-dropdown-item command="analysis-terrain"><i class="iconfont icon-iconfonttubiao_dixing"></i>地形分析</el-dropdown-item>
+					<!-- <el-dropdown-item command="analysis-terrain"><i class="iconfont icon-iconfonttubiao_dixing"></i>地形分析</el-dropdown-item> -->
 					<el-dropdown-item command="special-effects"><i class="iconfont icon-yu"></i>特效效果</el-dropdown-item>
 					<el-dropdown-item command="coordsTool"><i class="iconfont icon-zuobiao"></i>坐标定位</el-dropdown-item>
-					<el-dropdown-item command="TrackRoam"><i class="iconfont maxsize icon-jurassic_jiankong"></i>路径漫游</el-dropdown-item>
+					<!-- <el-dropdown-item command="TrackRoam"><i class="iconfont maxsize icon-jurassic_jiankong"></i>路径漫游</el-dropdown-item> -->
 					<!-- <el-dropdown-item command="ImageLayerSplit"><i class="iconfont maxsize icon-juanlian"></i>卷帘对比</el-dropdown-item>
 					<el-dropdown-item command="ViewerSplitScreen"><i class="iconfont minsize icon-fenping"></i>分屏对比</el-dropdown-item> -->
 				</el-dropdown-menu>
 			</template>
 		</el-dropdown>
+		<div class="toolbar-item" @click="showWidget('clearAll')">
+			<i class="iconfont minsize icon-shanchu"></i>
+			<span class="title">
+				清除所有
+			</span>
+		</div>
 	</div>
 </template>
 
@@ -213,7 +219,11 @@
 				} else if (type == "viewerlabel") {
 					this.closePopup()
 					this.$parent.$refs.refviewerlabel.isshow = true
-				} else {
+				} else if (type == "clearAll") {//清除所有
+					jt3d.CommonTools.clear();
+					jt3d.DrawToolsEdit.Clear();
+					jt3d.DrawMilitaryPlot.clearAll();
+				}else {
 					this.closePopup()
 					this.$parent.showbasicLayer = true
 				}
@@ -355,7 +365,7 @@
 	.toolbars {
 		position: absolute;
 		top: 80rem;
-		width: 450rem;
+		width: 550rem;
 		// width: 580rem;
 		right: 20rem;
 		cursor: pointer !important;