소스 검색

Merge branch 'master' of http://114.244.114.158:8802/siwei/real3d-portalsite

lkk 3 일 전
부모
커밋
ae197c519c

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

@@ -326,18 +326,19 @@ 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;
             }

+ 31 - 7
src/components/Query/clickQuery/clickQuery.vue

@@ -745,17 +745,41 @@ 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(
+      //   (res) => {
+      //     for (const [key, value] of Object.entries(res.data)) {
+      //       newArr.push({ name: keyName[key], value: value });
+      //     }
+      //     this.addLayerList(title);
+      //     this.queryResults[this.activeLayerId] = [newArr];
+      //     this.queryResultsGeom[this.activeLayerId] = [];
+      //   }
+      // );
+    },
+    getFenCengFenHu(id, obj) {
       let newArr = [];
-      GetHouseInfo({ id: "2c01647f-4533-4472-b20b-f5caa4c705b0" }).then(
+      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) => {
-          for (const [key, value] of Object.entries(res.data)) {
-            newArr.push({ name: keyName[key], value: value });
+          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] = [];
           }
-          this.addLayerList(title);
-          this.queryResults[this.activeLayerId] = [newArr];
-          this.queryResultsGeom[this.activeLayerId] = [];
         }
       );
     },

+ 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)

+ 2 - 1
static/Config/config.js

@@ -30,7 +30,8 @@ window.hostconfig = "localhost";
 window.mapview = [109.55145569681383, 18.28012526287734, 2000.0];
 //默认影像地址,空则为不加载默认影像
 //window.baseImgLayer = "http://127.0.0.1:8090/iserver/services/map-sanyadsm/rest/maps/%E6%B5%B7%E5%8D%97%E5%B2%9B%E5%BD%B1%E5%83%8F15%E7%BA%A7_Level_15%40DataSource";
-window.baseImgLayer = "http://192.168.60.2:8090/iserver/services/map-WorkSpace/rest/maps/%E6%B5%B7%E5%8D%97%E5%B2%9B%E5%BD%B1%E5%83%8F15%E7%BA%A7_Level_15%40DataSource";
+// window.baseImgLayer = "http://192.168.60.2:8090/iserver/services/map-WorkSpace/rest/maps/%E6%B5%B7%E5%8D%97%E5%B2%9B%E5%BD%B1%E5%83%8F15%E7%BA%A7_Level_15%40DataSource";
+window.baseImgLayer = "http://192.168.60.2:8090/iserver/services/map-ugcv5-Image-L18/rest/maps/Image-L18";
 //三维模型查询地址
 window.baseModelQueryLayer = "http://192.168.60.2:8090/iserver/services/data-building/rest/data/featureResults.rjson?returnContent=true";
 // ai大模gugeliulanq