Bladeren bron

分层分户

maxiaoxiao 6 maanden geleden
bovenliggende
commit
10f6984776

+ 12 - 12
src/components/3DAnalysis/SightCorridor/index.vue

@@ -326,18 +326,18 @@ export default {
       Cesium.Matrix4.inverse(matrix4, matrix4);
       Cesium.Matrix4.multiplyByPoint(matrix4, positionB, finalPosition);
       Cesium.Cartesian3.normalize(finalPosition, finalPosition);
-      const resultHead = Cesium.Math.toDegrees(
-        Math.atan2(finalPosition.x, finalPosition.y)
-      );
-      const resultPitch = Cesium.Math.toDegrees(Math.asin(finalPosition.z));
-      viewer.camera.setView({
-        destination: positionA,
-        orientation: {
-          heading: Cesium.Math.toRadians(resultHead), // east, default value is 0.0 (north)
-          pitch: Cesium.Math.toRadians(resultPitch), // default value (looking down)
-          roll: 0.0, // default value
-        },
-      });
+      // const resultHead = Cesium.Math.toDegrees(
+      //   Math.atan2(finalPosition.x, finalPosition.y)
+      // );
+      // const resultPitch = Cesium.Math.toDegrees(Math.asin(finalPosition.z));
+      // viewer.camera.setView({
+      //   destination: positionA,
+      //   orientation: {
+      //     heading: Cesium.Math.toRadians(resultHead), // east, default value is 0.0 (north)
+      //     pitch: Cesium.Math.toRadians(resultPitch), // default value (looking down)
+      //     roll: 0.0, // default value
+      //   },
+      // });
       this.initViewshed3D(point1, point2);
     },
     /**

+ 5 - 3
src/components/Combinations/LayerManage/LayerManage.vue

@@ -264,8 +264,9 @@ export default {
               dataSetName: "属性表",
               keyWord: "SmID",
             });
-          } else if (obj.title == "分层分户_白膜" || obj.title == "楼1") {
-            store.setLayerList(layers[0][0]);
+          } else if (obj.dataexplain == "分层分户") {
+            store.setLayerList(layers[0][0]);    
+            layers[0][0].indexedDBSetting.isAttributesSave = true;
           }
           // store.state.S3MList.push(layers[0]);
           store.state.tempLatData = layers;
@@ -282,7 +283,8 @@ export default {
             }
             if (
               item.name.indexOf("雨水") > -1 ||
-              item.name.indexOf("管线") > -1||item.name.indexOf("单体") > -1
+              item.name.indexOf("管线") > -1 ||
+              item.name.indexOf("单体") > -1
             ) {
               item._baseUri.query = obj.id;
             }

+ 25 - 1
src/components/Query/clickQuery/clickQuery.vue

@@ -745,7 +745,7 @@ export default {
       if (title == "分层分户" || title == "8号楼-谷") {
         let id = handModel(movement);
       } else {
-        handnew(movement);
+        handnew(movement,(id)=> this.getFenCengFenHu(id,store.state.checkedData));
       }
       let newArr = [];
       GetHouseInfo({ id: "2c01647f-4533-4472-b20b-f5caa4c705b0" }).then(
@@ -759,6 +759,30 @@ export default {
         }
       );
     },
+    getFenCengFenHu(id, obj) {
+      let newArr = [];
+      let queryByIDPar = {
+        getFeatureMode: "SQL",
+        datasetNames: [`${obj.fwgzkj}:${obj.fwmc}`],
+        queryParameter: { attributeFilter: `ID=\"${id}\"` }
+      };
+     let url2 = calcIserverURI(obj.url).replace("3D-", "data-");
+      mapQuery(url2, queryByIDPar).then(
+        
+        (res) => {
+          if (res && res.totalCount > 0) {
+            let feature = res.features[0];
+            console.log(res, "res");
+            feature.fieldNames.forEach((fieldName, i) => {
+              newArr.push({ name: fieldName, value: feature.fieldValues[i] });
+            }); 
+            this.addLayerList(obj.title);
+            this.queryResults[this.activeLayerId] = [newArr];
+            this.queryResultsGeom[this.activeLayerId] = [];
+          }
+        }
+      );
+    },
     mapQuerys(queryName) {
       this.setData();
       let that = this;

+ 8 - 1
src/components/Query/clickQuery/modelLayering.js

@@ -49,11 +49,18 @@ export function handModel(e) {
         Translate(idList, e);
     });
 }
-export function handnew(e) { //得到户型id
+export function handnew(e, fun) { //得到户型id
     //拾取模型
     let pickedFeature = scene.pick(e.position);
     let id = pickedFeature.id;
     Translate([id], e)
+    // var properties = pickedFeature.getPropertyNames();
+    let layer = store.state.chooseLayer
+    layer.getAttributesById(id).then((data, t, i) => {
+        // console.log(id, data, 'pickedFeature')
+        fun(data['模型名称'])
+    })
+
     // GetFloorIds({ id }).then((res) => {
     //     console.log('idList', res.data)
     //     Translate(res.data, e)