|  | @@ -254,7 +254,7 @@
 | 
											
												
													
														|  |  					window["viewer"].entities.remove(jt3d.LocateUtil._locationEntity);
 |  |  					window["viewer"].entities.remove(jt3d.LocateUtil._locationEntity);
 | 
											
												
													
														|  |  				}
 |  |  				}
 | 
											
												
													
														|  |  				store.queryMapTables.forEach((itemTable, index) => {
 |  |  				store.queryMapTables.forEach((itemTable, index) => {
 | 
											
												
													
														|  | -					getData(itemTable).then(flag => {
 |  | 
 | 
											
												
													
														|  | 
 |  | +					this.getData(itemTable,options).then(flag => {
 | 
											
												
													
														|  |  						if (flag === true && index === (store.queryMapTables.length - 1) && _self.treeNodes.length > 0) {
 |  |  						if (flag === true && index === (store.queryMapTables.length - 1) && _self.treeNodes.length > 0) {
 | 
											
												
													
														|  |  							console.log("treeNodes", _self.treeNodes);
 |  |  							console.log("treeNodes", _self.treeNodes);
 | 
											
												
													
														|  |  
 |  |  
 | 
											
										
											
												
													
														|  | @@ -280,110 +280,111 @@
 | 
											
												
													
														|  |  						}
 |  |  						}
 | 
											
												
													
														|  |  					});
 |  |  					});
 | 
											
												
													
														|  |  				});
 |  |  				});
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -				//Promise回调
 |  | 
 | 
											
												
													
														|  | -				function getData(itemTable) {
 |  | 
 | 
											
												
													
														|  | -					return new Promise((resolve, reject) => {
 |  | 
 | 
											
												
													
														|  | -						_self.$http.get('/getSpatialQuery', {
 |  | 
 | 
											
												
													
														|  | -							tableName: itemTable,
 |  | 
 | 
											
												
													
														|  | -							spatialType: options.spatialType,
 |  | 
 | 
											
												
													
														|  | -							coordinate: options.coordinate,
 |  | 
 | 
											
												
													
														|  | -							buffer: options.buffer
 |  | 
 | 
											
												
													
														|  | -						}).then(res => {
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -							_self.tableName = res.table[0].tableName;
 |  | 
 | 
											
												
													
														|  | -							_self.field = res.table[0].fields;
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -							if (res.data.features.length > 0) {
 |  | 
 | 
											
												
													
														|  | -								//添加父节点
 |  | 
 | 
											
												
													
														|  | -								let parentNode = {
 |  | 
 | 
											
												
													
														|  | -									id: _self.tableName,
 |  | 
 | 
											
												
													
														|  | -									parentid: "CIM",
 |  | 
 | 
											
												
													
														|  | -									label: res.table[0].tableDescription + "(" + res.data.features.length + ")",
 |  | 
 | 
											
												
													
														|  | 
 |  | +			},
 | 
											
												
													
														|  | 
 |  | +			getData(itemTable,options) {
 | 
											
												
													
														|  | 
 |  | +				let _self = this;
 | 
											
												
													
														|  | 
 |  | +				return new Promise((resolve, reject) => {
 | 
											
												
													
														|  | 
 |  | +					_self.$http.get('/getSpatialQuery', {
 | 
											
												
													
														|  | 
 |  | +						tableName: itemTable,
 | 
											
												
													
														|  | 
 |  | +						spatialType: options.spatialType,
 | 
											
												
													
														|  | 
 |  | +						coordinate: options.coordinate,
 | 
											
												
													
														|  | 
 |  | +						buffer: options.buffer
 | 
											
												
													
														|  | 
 |  | +					}).then(res => {
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +						_self.tableName = itemTable;
 | 
											
												
													
														|  | 
 |  | +						_self.field = res.table;
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +						if (res.data.features.length > 0) {
 | 
											
												
													
														|  | 
 |  | +							//添加父节点
 | 
											
												
													
														|  | 
 |  | +							let parentNode = {
 | 
											
												
													
														|  | 
 |  | +								id: _self.tableName,
 | 
											
												
													
														|  | 
 |  | +								parentid: "CIM",
 | 
											
												
													
														|  | 
 |  | +								label: res.table[0].tableDescription + "(" + res.data.features.length + ")",
 | 
											
												
													
														|  | 
 |  | +							};
 | 
											
												
													
														|  | 
 |  | +							_self.treeNodes.push(parentNode);
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +							res.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: _self.tableName,
 | 
											
												
													
														|  | 
 |  | +									field: _self.field,
 | 
											
												
													
														|  | 
 |  | +									data: itemData,
 | 
											
												
													
														|  |  								};
 |  |  								};
 | 
											
												
													
														|  | -								_self.treeNodes.push(parentNode);
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -								res.data.features.forEach(itemData => {
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -									//**************高亮显示****************
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -									// /* 转换坐标 */
 |  | 
 | 
											
												
													
														|  | -									// 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: _self.tableName,
 |  | 
 | 
											
												
													
														|  | -										field: _self.field,
 |  | 
 | 
											
												
													
														|  | -										data: itemData,
 |  | 
 | 
											
												
													
														|  | -									};
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -									switch (_self.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;
 |  | 
 | 
											
												
													
														|  | -									}
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -									_self.treeNodes.push(childNode);
 |  | 
 | 
											
												
													
														|  | -								});
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -								resolve(true)
 |  | 
 | 
											
												
													
														|  | -							}
 |  | 
 | 
											
												
													
														|  | -						})
 |  | 
 | 
											
												
													
														|  | -					})
 |  | 
 | 
											
												
													
														|  | -				}
 |  | 
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +								switch (_self.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;
 | 
											
												
													
														|  | 
 |  | +								}
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +								_self.treeNodes.push(childNode);
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +								if (index === (res.data.features.length - 1)) {
 | 
											
												
													
														|  | 
 |  | +									resolve(true)
 | 
											
												
													
														|  | 
 |  | +								}
 | 
											
												
													
														|  | 
 |  | +							});
 | 
											
												
													
														|  | 
 |  | +						}
 | 
											
												
													
														|  | 
 |  | +					});
 | 
											
												
													
														|  | 
 |  | +				});
 | 
											
												
													
														|  |  			}
 |  |  			}
 | 
											
												
													
														|  |  		},
 |  |  		},
 | 
											
												
													
														|  |  
 |  |  
 |