|  | @@ -256,145 +256,148 @@
 | 
	
		
			
				|  |  |  					window["viewer"].entities.remove(jt3d.LocateUtil._locationEntity);
 | 
	
		
			
				|  |  |  				}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -				//查询等待框
 | 
	
		
			
				|  |  | -				loading = ElLoading.service({
 | 
	
		
			
				|  |  | -					lock: true,
 | 
	
		
			
				|  |  | -					text: 'Loading',
 | 
	
		
			
				|  |  | -					background: 'rgba(0, 0, 0, 0.7)',
 | 
	
		
			
				|  |  | -				});
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  				const getData = () => {
 | 
	
		
			
				|  |  | -					let data = [];
 | 
	
		
			
				|  |  | -					store.queryMapTables.forEach((itemTable, index) => {
 | 
	
		
			
				|  |  | -						let result = getAxios(itemTable, options);
 | 
	
		
			
				|  |  | -						data.push(result);
 | 
	
		
			
				|  |  | -					})
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -					Promise.all(data).then(itemList => {
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -						console.log("itemList", itemList) //itemList返回的数据是按顺序的
 | 
	
		
			
				|  |  | -						//执行自己接下来的操作
 | 
	
		
			
				|  |  | -						//doSomething
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -						itemList.forEach((item, index) => {
 | 
	
		
			
				|  |  | -							let field = item.table;
 | 
	
		
			
				|  |  | -							let tableName = item.table[0].tableName;
 | 
	
		
			
				|  |  | -							let tableDescription = item.table[0].tableDescription;
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -							if (item.data.features.length > 0) {
 | 
	
		
			
				|  |  | -								//添加父节点
 | 
	
		
			
				|  |  | -								let parentNode = {
 | 
	
		
			
				|  |  | -									id: tableName,
 | 
	
		
			
				|  |  | -									parentid: "CIM",
 | 
	
		
			
				|  |  | -									label: tableDescription + "(" + item.data.features.length + ")",
 | 
	
		
			
				|  |  | -								};
 | 
	
		
			
				|  |  | -								treeNodes.push(parentNode);
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -								item.data.features.forEach((itemData, index) => {
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -									//**************高亮显示****************
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -									// /* 转换坐标 */
 | 
	
		
			
				|  |  | -									// let positions = itemData.geometry.coordinates[0][0].map(point => {
 | 
	
		
			
				|  |  | -									// 	return Cesium.Cartesian3.fromDegrees(point[0], point[1], point[2] || 0);
 | 
	
		
			
				|  |  | -									// });
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -									// //先创建一个CustomDataSource源,然后把entity存入这里面
 | 
	
		
			
				|  |  | -									// let Polygon = new Cesium.CustomDataSource("单击高亮显示");
 | 
	
		
			
				|  |  | -									// jt3d._dataSources.add(Polygon);
 | 
	
		
			
				|  |  | -									// //添加数据的方式
 | 
	
		
			
				|  |  | -									// Polygon.entities.add({
 | 
	
		
			
				|  |  | -									// 	polygon: {
 | 
	
		
			
				|  |  | -									// 		hierarchy: new Cesium.PolygonHierarchy(positions),
 | 
	
		
			
				|  |  | -									// 		material: Cesium.Color.fromCssColorString("rgba(255,0,255,.7)"),
 | 
	
		
			
				|  |  | -									// 		classificationType: Cesium.ClassificationType.BOTH,
 | 
	
		
			
				|  |  | -									// 	},
 | 
	
		
			
				|  |  | -									// });
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -									//**************高亮显示****************
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -									let childNode = {
 | 
	
		
			
				|  |  | -										id: itemData.properties["id"],
 | 
	
		
			
				|  |  | -										parentid: tableName,
 | 
	
		
			
				|  |  | -										field: field,
 | 
	
		
			
				|  |  | -										data: itemData,
 | 
	
		
			
				|  |  | -									};
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -									switch (tableName) {
 | 
	
		
			
				|  |  | -										//==============规划管理数据-重要控制线=========================
 | 
	
		
			
				|  |  | -										case "yjjbnt": //永久基本农田
 | 
	
		
			
				|  |  | -											childNode.label = itemData.properties["cfzr"] + "(" + itemData.properties["zzsxmc"] + ")"
 | 
	
		
			
				|  |  | -											break;
 | 
	
		
			
				|  |  | -										case "yjtz": //永久基本农田调整
 | 
	
		
			
				|  |  | -											childNode.label = itemData.properties["zldwmc"] + "(" + itemData.properties["dlmc"] + ")"
 | 
	
		
			
				|  |  | -											break;
 | 
	
		
			
				|  |  | -										case "bnrgdbh": //不纳入耕地保护目标
 | 
	
		
			
				|  |  | -											childNode.label = itemData.properties["zldwmc"] + "(" + itemData.properties["dlmc"] + ")"
 | 
	
		
			
				|  |  | -											break;
 | 
	
		
			
				|  |  | -										case "gdbhrw": //耕地保护任务
 | 
	
		
			
				|  |  | -											childNode.label = itemData.properties["zldwmc"] + "(" + itemData.properties["dlmc"] + ")"
 | 
	
		
			
				|  |  | -											break;
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -											//==============规划管理数据-历史规划==============
 | 
	
		
			
				|  |  | -										case "tdzgh": //土地利用总体规划
 | 
	
		
			
				|  |  | -											childNode.label = itemData.properties["ghdlmc"]
 | 
	
		
			
				|  |  | -											break;
 | 
	
		
			
				|  |  | -										case "jsyd": //建设用地管制区
 | 
	
		
			
				|  |  | -											childNode.label = itemData.properties["id"]
 | 
	
		
			
				|  |  | -											break;
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -											//==============现状类数据-森林资源-森林资源调查==============
 | 
	
		
			
				|  |  | -										case "slyzt": //2019年森林资源管理一张图
 | 
	
		
			
				|  |  | -											childNode.label = itemData.properties["id"]
 | 
	
		
			
				|  |  | -											break;
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -											//==============现状类数据-国土调查==============
 | 
	
		
			
				|  |  | -										case "ed2009": //二调
 | 
	
		
			
				|  |  | -											childNode.label = itemData.properties["zldwmc"] + "(" + itemData.properties["dlmc"] + ")"
 | 
	
		
			
				|  |  | -											break;
 | 
	
		
			
				|  |  | -										case "ed2020": //二调2020
 | 
	
		
			
				|  |  | -											childNode.label = itemData.properties["zldwmc"] + "(" + itemData.properties["dlmc"] + ")"
 | 
	
		
			
				|  |  | -											break;
 | 
	
		
			
				|  |  | -										case "ed2021": //二调2021
 | 
	
		
			
				|  |  | -											childNode.label = itemData.properties["zldwmc"] + "(" + itemData.properties["dlmc"] + ")"
 | 
	
		
			
				|  |  | -											break;
 | 
	
		
			
				|  |  | -										case "sddltb": //三调   
 | 
	
		
			
				|  |  | -											childNode.label = itemData.properties["zldwmc"] + "(" + itemData.properties["dlmc"] + ")"
 | 
	
		
			
				|  |  | -											break;
 | 
	
		
			
				|  |  | -									}
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -									treeNodes.push(childNode);
 | 
	
		
			
				|  |  | -								});
 | 
	
		
			
				|  |  | -							}
 | 
	
		
			
				|  |  | +					if (store.queryMapTables.length > 0) {
 | 
	
		
			
				|  |  | +						//查询等待框
 | 
	
		
			
				|  |  | +						loading = ElLoading.service({
 | 
	
		
			
				|  |  | +							lock: true,
 | 
	
		
			
				|  |  | +							text: 'Loading',
 | 
	
		
			
				|  |  | +							background: 'rgba(0, 0, 0, 0.7)',
 | 
	
		
			
				|  |  |  						});
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -						//处理查询结果树
 | 
	
		
			
				|  |  | -						if (treeNodes.length > 0) {
 | 
	
		
			
				|  |  | +						let data = [];
 | 
	
		
			
				|  |  | +						store.queryMapTables.forEach((itemTable, index) => {
 | 
	
		
			
				|  |  | +							let result = getAxios(itemTable, options);
 | 
	
		
			
				|  |  | +							data.push(result);
 | 
	
		
			
				|  |  | +						})
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +						Promise.all(data).then(itemList => {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -							_self.$parent.$parent.$refs.refQueryResult.expandedKeys = []
 | 
	
		
			
				|  |  | -							_self.$parent.$parent.$refs.refQueryResultPopup.isshow = true;
 | 
	
		
			
				|  |  | -							_self.$parent.$parent.$refs.refQueryResult.treeData = deepTree(treeNodes);
 | 
	
		
			
				|  |  | +							console.log("itemList", itemList) //itemList返回的数据是按顺序的
 | 
	
		
			
				|  |  | +							//执行自己接下来的操作
 | 
	
		
			
				|  |  | +							//doSomething
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -							//默认选中第一个节点并赋予选中样式
 | 
	
		
			
				|  |  | -							_self.$nextTick(function() {
 | 
	
		
			
				|  |  | -								let currentNode = _self.$parent.$parent.$refs.refQueryResult.treeData[0].children[0];
 | 
	
		
			
				|  |  | -								let currentKey = currentNode.id;
 | 
	
		
			
				|  |  | -								_self.$parent.$parent.$refs.refQueryResult.currentKey = currentKey;
 | 
	
		
			
				|  |  | -								_self.$parent.$parent.$refs.refQueryResult.$refs.tree.setCurrentKey(currentKey);
 | 
	
		
			
				|  |  | -								_self.$parent.$parent.$refs.refQueryResult.handleNodeClick(currentNode);
 | 
	
		
			
				|  |  | +							itemList.forEach((item, index) => {
 | 
	
		
			
				|  |  | +								let field = item.table;
 | 
	
		
			
				|  |  | +								let tableName = item.table[0].tableName;
 | 
	
		
			
				|  |  | +								let tableDescription = item.table[0].tableDescription;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +								if (item.data.features.length > 0) {
 | 
	
		
			
				|  |  | +									//添加父节点
 | 
	
		
			
				|  |  | +									let parentNode = {
 | 
	
		
			
				|  |  | +										id: tableName,
 | 
	
		
			
				|  |  | +										parentid: "CIM",
 | 
	
		
			
				|  |  | +										label: tableDescription + "(" + item.data.features.length + ")",
 | 
	
		
			
				|  |  | +									};
 | 
	
		
			
				|  |  | +									treeNodes.push(parentNode);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +									item.data.features.forEach((itemData, index) => {
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +										//**************高亮显示****************
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +										// /* 转换坐标 */
 | 
	
		
			
				|  |  | +										// let positions = itemData.geometry.coordinates[0][0].map(point => {
 | 
	
		
			
				|  |  | +										// 	return Cesium.Cartesian3.fromDegrees(point[0], point[1], point[2] || 0);
 | 
	
		
			
				|  |  | +										// });
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +										// //先创建一个CustomDataSource源,然后把entity存入这里面
 | 
	
		
			
				|  |  | +										// let Polygon = new Cesium.CustomDataSource("单击高亮显示");
 | 
	
		
			
				|  |  | +										// jt3d._dataSources.add(Polygon);
 | 
	
		
			
				|  |  | +										// //添加数据的方式
 | 
	
		
			
				|  |  | +										// Polygon.entities.add({
 | 
	
		
			
				|  |  | +										// 	polygon: {
 | 
	
		
			
				|  |  | +										// 		hierarchy: new Cesium.PolygonHierarchy(positions),
 | 
	
		
			
				|  |  | +										// 		material: Cesium.Color.fromCssColorString("rgba(255,0,255,.7)"),
 | 
	
		
			
				|  |  | +										// 		classificationType: Cesium.ClassificationType.BOTH,
 | 
	
		
			
				|  |  | +										// 	},
 | 
	
		
			
				|  |  | +										// });
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +										//**************高亮显示****************
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +										let childNode = {
 | 
	
		
			
				|  |  | +											id: itemData.properties["id"],
 | 
	
		
			
				|  |  | +											parentid: tableName,
 | 
	
		
			
				|  |  | +											field: field,
 | 
	
		
			
				|  |  | +											data: itemData,
 | 
	
		
			
				|  |  | +										};
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +										switch (tableName) {
 | 
	
		
			
				|  |  | +											//==============规划管理数据-重要控制线=========================
 | 
	
		
			
				|  |  | +											case "yjjbnt": //永久基本农田
 | 
	
		
			
				|  |  | +												childNode.label = itemData.properties["cfzr"] + "(" + itemData.properties["zzsxmc"] + ")"
 | 
	
		
			
				|  |  | +												break;
 | 
	
		
			
				|  |  | +											case "yjtz": //永久基本农田调整
 | 
	
		
			
				|  |  | +												childNode.label = itemData.properties["zldwmc"] + "(" + itemData.properties["dlmc"] + ")"
 | 
	
		
			
				|  |  | +												break;
 | 
	
		
			
				|  |  | +											case "bnrgdbh": //不纳入耕地保护目标
 | 
	
		
			
				|  |  | +												childNode.label = itemData.properties["zldwmc"] + "(" + itemData.properties["dlmc"] + ")"
 | 
	
		
			
				|  |  | +												break;
 | 
	
		
			
				|  |  | +											case "gdbhrw": //耕地保护任务
 | 
	
		
			
				|  |  | +												childNode.label = itemData.properties["zldwmc"] + "(" + itemData.properties["dlmc"] + ")"
 | 
	
		
			
				|  |  | +												break;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +												//==============规划管理数据-历史规划==============
 | 
	
		
			
				|  |  | +											case "tdzgh": //土地利用总体规划
 | 
	
		
			
				|  |  | +												childNode.label = itemData.properties["ghdlmc"]
 | 
	
		
			
				|  |  | +												break;
 | 
	
		
			
				|  |  | +											case "jsyd": //建设用地管制区
 | 
	
		
			
				|  |  | +												childNode.label = itemData.properties["id"]
 | 
	
		
			
				|  |  | +												break;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +												//==============现状类数据-森林资源-森林资源调查==============
 | 
	
		
			
				|  |  | +											case "slyzt": //2019年森林资源管理一张图
 | 
	
		
			
				|  |  | +												childNode.label = itemData.properties["id"]
 | 
	
		
			
				|  |  | +												break;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +												//==============现状类数据-国土调查==============
 | 
	
		
			
				|  |  | +											case "ed2009": //二调
 | 
	
		
			
				|  |  | +												childNode.label = itemData.properties["zldwmc"] + "(" + itemData.properties["dlmc"] + ")"
 | 
	
		
			
				|  |  | +												break;
 | 
	
		
			
				|  |  | +											case "ed2020": //二调2020
 | 
	
		
			
				|  |  | +												childNode.label = itemData.properties["zldwmc"] + "(" + itemData.properties["dlmc"] + ")"
 | 
	
		
			
				|  |  | +												break;
 | 
	
		
			
				|  |  | +											case "ed2021": //二调2021
 | 
	
		
			
				|  |  | +												childNode.label = itemData.properties["zldwmc"] + "(" + itemData.properties["dlmc"] + ")"
 | 
	
		
			
				|  |  | +												break;
 | 
	
		
			
				|  |  | +											case "sddltb": //三调   
 | 
	
		
			
				|  |  | +												childNode.label = itemData.properties["zldwmc"] + "(" + itemData.properties["dlmc"] + ")"
 | 
	
		
			
				|  |  | +												break;
 | 
	
		
			
				|  |  | +										}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +										treeNodes.push(childNode);
 | 
	
		
			
				|  |  | +									});
 | 
	
		
			
				|  |  | +								}
 | 
	
		
			
				|  |  |  							});
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -							//expandedKeys默认展开treedata第一层,加载第一层数据
 | 
	
		
			
				|  |  | -							_self.$parent.$parent.$refs.refQueryResult.expandedKeys.push(_self.$parent.$parent.$refs.refQueryResult.treeData[0].id)
 | 
	
		
			
				|  |  | -						}
 | 
	
		
			
				|  |  | +							//处理查询结果树
 | 
	
		
			
				|  |  | +							if (treeNodes.length > 0) {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -						//清除绘制
 | 
	
		
			
				|  |  | -						jt3d.CommonTools.clear();
 | 
	
		
			
				|  |  | +								_self.$parent.$parent.$refs.refQueryResult.expandedKeys = []
 | 
	
		
			
				|  |  | +								_self.$parent.$parent.$refs.refQueryResultPopup.isshow = true;
 | 
	
		
			
				|  |  | +								_self.$parent.$parent.$refs.refQueryResult.treeData = deepTree(treeNodes);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -						//关闭等待框
 | 
	
		
			
				|  |  | -						loading.close()
 | 
	
		
			
				|  |  | +								//默认选中第一个节点并赋予选中样式
 | 
	
		
			
				|  |  | +								_self.$nextTick(function() {
 | 
	
		
			
				|  |  | +									let currentNode = _self.$parent.$parent.$refs.refQueryResult.treeData[0].children[0];
 | 
	
		
			
				|  |  | +									let currentKey = currentNode.id;
 | 
	
		
			
				|  |  | +									_self.$parent.$parent.$refs.refQueryResult.currentKey = currentKey;
 | 
	
		
			
				|  |  | +									_self.$parent.$parent.$refs.refQueryResult.$refs.tree.setCurrentKey(currentKey);
 | 
	
		
			
				|  |  | +									_self.$parent.$parent.$refs.refQueryResult.handleNodeClick(currentNode);
 | 
	
		
			
				|  |  | +								});
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -					})
 | 
	
		
			
				|  |  | +								//expandedKeys默认展开treedata第一层,加载第一层数据
 | 
	
		
			
				|  |  | +								_self.$parent.$parent.$refs.refQueryResult.expandedKeys.push(_self.$parent.$parent.$refs.refQueryResult.treeData[0].id)
 | 
	
		
			
				|  |  | +							}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +							//清除绘制
 | 
	
		
			
				|  |  | +							jt3d.CommonTools.clear();
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +							//关闭等待框
 | 
	
		
			
				|  |  | +							loading.close()
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +						})
 | 
	
		
			
				|  |  | +					}
 | 
	
		
			
				|  |  |  				}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  				const getAxios = (itemTable, options) => {
 |