|
@@ -317,83 +317,12 @@ export default {
|
|
|
that.dataSourceLayer.entities.removeAll();
|
|
|
//拾取模型
|
|
|
let pickedFeature = scene.pick(movement.position);
|
|
|
-<<<<<<< HEAD
|
|
|
- console.log("ighui", pickedFeature);
|
|
|
- let eneityName = pickedFeature.primitive.name;
|
|
|
- let Pid = "";
|
|
|
- // "ResultNetWork@管线#1"///"ResultNetWork_Node@管线#1"
|
|
|
- if (eneityName.indexOf("管线") > 0) {
|
|
|
- let buildingLayer = scene.layers.find(eneityName);
|
|
|
- buildingLayer.indexedDBSetting.isAttributesSave = true; //保存属性
|
|
|
- if (buildingLayer.getSelection().length > 0) {
|
|
|
- const selectedId = Number(buildingLayer.getSelection()[0]);
|
|
|
- console.log(selectedId, "selectedId");
|
|
|
- buildingLayer.getAttributesById([selectedId]).then(function (atts) {
|
|
|
- if (atts) {
|
|
|
- console.log(atts);
|
|
|
- // var Pid = atts['管线段']
|
|
|
- console.log(atts["管线段"]);
|
|
|
- console.log(atts["物探点"]);
|
|
|
- Pid = atts["管线段"] || atts["物探点"];
|
|
|
- // viewer.entities.removeAll();
|
|
|
-
|
|
|
- // var length = Object.keys(atts).length;
|
|
|
- // var des;
|
|
|
- // for (var i = 0; i < length; i++) {
|
|
|
- // var key = Object.keys(atts)[i];
|
|
|
- // var value = atts[key];
|
|
|
- // console.log(key);
|
|
|
- // console.log(value);
|
|
|
-
|
|
|
- // var index = i.toString();
|
|
|
- // if (i == 0) {
|
|
|
- // des = '<table class="cesium-infoBox-defaultTable"><tbody>' + '<tr><th>' + key + '</th><td>' + value + '</td></tr>';
|
|
|
- // } else if (i == length - 1) {
|
|
|
- // des += '<tr><th>' + key + '</th><td>' + value + '</td></tr>' + "</tbody></table>";
|
|
|
- // } else {
|
|
|
- // des += '<tr><th>' + key + '</th><td>' + value + '</td></tr>';
|
|
|
- // }
|
|
|
- // }
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
-=======
|
|
|
-
|
|
|
->>>>>>> db9c93e4ce133445c90a126de3e23e577009e242
|
|
|
if (
|
|
|
scene.pickPositionSupported &&
|
|
|
Cesium.defined(pickedFeature) &&
|
|
|
pickedFeature != null &&
|
|
|
pickedFeature.primitive
|
|
|
) {
|
|
|
-<<<<<<< HEAD
|
|
|
- //解构赋值点击对象的id
|
|
|
- // let Pid = pickedFeature.getProperty("id");
|
|
|
- let commaIndex = pickedFeature.primitive.url.indexOf("=");
|
|
|
- let substring = "";
|
|
|
- if (commaIndex !== -1) {
|
|
|
- //primitive级别id
|
|
|
- substring = pickedFeature.primitive.url.substring(commaIndex + 1); // 从逗号后一位开始,到字符串末尾
|
|
|
- }
|
|
|
- //定义数组用于存储转换完成的管井数据
|
|
|
- let newArr = [];
|
|
|
- //判断对象类型
|
|
|
-
|
|
|
- if (Pid.indexOf("_") < 0) {
|
|
|
- gwtype = 1;
|
|
|
- } else {
|
|
|
- // Pid = Pid.replace("_", "-");
|
|
|
- gwtype = 2;
|
|
|
- }
|
|
|
- GetGDlnfo({ type: gwtype, key: Pid }).then((res) => {
|
|
|
- let aaa = Object.entries(res.data);
|
|
|
- for (const [name, value] of aaa) {
|
|
|
- newArr.push({
|
|
|
- name: name,
|
|
|
- value: value,
|
|
|
-=======
|
|
|
let eneityName = pickedFeature.primitive.name;
|
|
|
let Pid = "";
|
|
|
var tempArr = [];
|
|
@@ -437,7 +366,6 @@ export default {
|
|
|
that.queryResults[substring] = [tempArr];
|
|
|
that.queryResultsGeom[substring] = [];
|
|
|
that.activeLayerId = substring;
|
|
|
->>>>>>> db9c93e4ce133445c90a126de3e23e577009e242
|
|
|
});
|
|
|
}
|
|
|
}
|
|
@@ -599,6 +527,8 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
addLayerList(label) {
|
|
|
+
|
|
|
+ if (this.layerList.findIndex((a) => a.label == label) >= 0) return;
|
|
|
let layers = store.state.vectorlayerlist.filter(
|
|
|
(element) => element.label === label
|
|
|
);
|
|
@@ -611,6 +541,9 @@ export default {
|
|
|
* 左键点击模型查询
|
|
|
*/
|
|
|
mapModelQuery(movement) {
|
|
|
+ this.activeLayerId = "0";
|
|
|
+ this.layerList = [];
|
|
|
+ this.layersData = [];
|
|
|
this.viewer.entities.removeAll();
|
|
|
this.dataSourceLayer.entities.removeAll();
|
|
|
let title;
|