Browse Source

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

maxiaoxiao 1 year ago
parent
commit
25c8ec9d07

+ 2 - 1
config/index.js

@@ -14,7 +14,8 @@ module.exports = {
         disableHostCheck:true,
 
         // Various Dev Server settings
-        host: '0.0.0.0', // can be overwritten by process.env.HOST
+        host: '127.0.0.1',
+        // host: '0.0.0.0', // can be overwritten by process.env.HOST
         // host: '192.168.100.252', // can be overwritten by process.env.HOST
         port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
         autoOpenBrowser: false,

+ 2 - 2
src/components/Combinations/toolBar/toolBar.vue

@@ -46,7 +46,7 @@
       <li class="sm-btn sm-tool-btn" :title="Resource.sceneOptions" @click="choose(3)">
         <i class="el-icon-setting"></i>
       </li>
-      <li class="sm-btn sm-tool-btn" title="行政区划开关" @click="choose(11)">
+      <li class="sm-btn sm-tool-btn" title="行政区划开关" @click="choose(12)">
         <i class="el-icon-map-location"></i>
       </li>
       <!-- </ul> -->
@@ -250,7 +250,7 @@ export default {
       this.show = !this.show;
     },
     choose(i) {
-      if (i == 11) {
+      if (i == 12) {
         store.state.xzqh_flag = !store.state.xzqh_flag
         // 隐藏行政区划console.log();
         cockpit.hidden_xzqh(store.state.xzqh_flag);

+ 27 - 7
src/components/Query/clickQuery/CockpitVector.vue

@@ -1,10 +1,15 @@
 <template>
-  <el-table :data="tableData" :show-header="false" border  style="width: 100%">
-    <el-table-column prop="name" label="" width="100">
-    </el-table-column>
-    <el-table-column prop="value" label="" width="230">
-    </el-table-column>
-  </el-table>
+  <!-- <el-select v-model="value" placeholder="请选择对象">
+    <el-option v-for="(item, index) in options" :key="index" :label="item.name" :value="item" @click.native="test(item)">
+    </el-option>
+  </el-select> -->
+  <div>
+    <div class="list_vector" v-for="(item, index ) in tableData" :key="index">
+      <span>{{ item.name }}:</span>
+      <span>{{ item.value }}</span>
+      <p></p>
+    </div>
+  </div>
 </template>
 
 <script>
@@ -47,4 +52,19 @@ export default {
   deactivated() { } //若组件实例是 <KeepAlive> 缓存树的一部分,当组件从 DOM 中被移除时调用。
 };
 </script>
-<style  scoped></style>
+<style  scoped lang="scss">
+.list_vector {
+  background-image: url("/static/images/ghzc/内容框.png");
+
+  width: 20rem;
+  border-top: 1px solid #CCC;
+  font-size: 14px;
+  padding: 1rem;
+  // border-bottom:1px solid #CCC ;
+}
+
+.list_vector:last-child {
+
+  border-bottom: 1px solid #CCC;
+}
+</style>

+ 33 - 0
src/components/Query/clickQuery/MultiLevelQuery.vue

@@ -0,0 +1,33 @@
+<template>
+
+</template>
+
+<script>
+//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
+
+export default {
+  components: {},
+  data() {
+    return {};
+  },
+  //监听属性 类似于data概念
+  computed: {},
+  //监控data中的数据变化
+  watch: {},
+  //方法集合
+  methods: {},
+  beforeCreate() { }, //生命周期 - 创建之前
+  created() { }, //生命周期 - 创建完成(可以访问当前this实例)
+  beforeMount() { }, //生命周期 - 挂载之前
+  mounted() { }, //生命周期 - 挂在完成
+  beforeUpdate() { }, //生命周期 - 更新之前
+  updated() { }, //生命周期 - 更新之后
+  beforeDestroy() { }, //生命周期 - 销毁之前
+  destroy() { },//生命周期 - 销毁完成
+  activated() { }, //若组件实例是 <KeepAlive> 缓存树的一部分,当组件被插入到 DOM 中时调用。
+  deactivated() { } //若组件实例是 <KeepAlive> 缓存树的一部分,当组件从 DOM 中被移除时调用。
+};
+</script>
+<style  scoped>
+
+</style>

+ 22 - 14
src/components/Query/clickQuery/clickQuery.vue

@@ -44,6 +44,7 @@
     </div>
 
     <!-- <CockpitVector class="cockpit_vector"></CockpitVector> -->
+
   </div>
 </template>
 
@@ -53,6 +54,7 @@ import { GetGDlnfo, GetXzqhTree, GetHouseInfo } from "../../../api/map";
 import { keys } from "lodash";
 import { handModel, handnew, clearTranslate, keyName } from "./modelLayering";
 import CockpitVector from "./CockpitVector.vue";
+import * as pick_cockpit_vector from "./pick_cockpit_vector.js";
 
 let gwtype;
 export default {
@@ -85,18 +87,6 @@ export default {
       queryResultsGeomPart: {},
       viewer: null,
       dataSourceLayer: null,
-      obj: [[
-        {
-          "name": "BSM",
-          "value": "460203251000000700"
-        }, {
-          "name": "BSM",
-          "value": "460203251000000700"
-        }, {
-          "name": "BSM",
-          "value": "460203251000000700"
-        }
-      ]],
       actionOptions: [
         {
           index: 1,
@@ -113,7 +103,12 @@ export default {
         {
           index: 4,
           lable: "矢量",
-          iconName: "el-icon-picture-outline-round",
+          iconName: "el-icon-picture",
+          isSelect: false,
+        }, {
+          index: 5,
+          lable: "联级查询",
+          iconName: "el-icon-c-scale-to-original",
           isSelect: false,
         },
         {
@@ -158,7 +153,11 @@ export default {
       }
     },
   },
-  mounted() { },
+  mounted() {
+
+    this.$nextTick((res) => {
+    });
+  },
   methods: {
     toggleVisibility() {
       this.removeMapLayerQuery();
@@ -702,6 +701,15 @@ export default {
           clearTranslate();
           break;
         }
+        case 4: {//驾驶舱矢量数据点选查询
+          pick_cockpit_vector.init_handler();
+
+          break;
+        } case 5: {//联级查询
+          pick_cockpit_vector.init_handler();
+
+          break;
+        }
         default:
           break;
       }

+ 50 - 0
src/components/Query/clickQuery/pick_cockpit_vector.js

@@ -0,0 +1,50 @@
+let handler_cockpit = null;
+
+
+
+export const init_handler = () => {
+
+    if (handler_cockpit == null) {
+        handler_cockpit = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas);
+    }
+    handler_cockpit.setInputAction(async event => {
+        let pickObj = viewer.scene.pick(event.position);
+        var position = viewer.scene.pickPosition(event.position);
+
+        if (!position)//点击到地球之外
+            return false;
+        var cartographic = Cesium.Cartographic.fromCartesian(position);
+
+
+        let longitude = Cesium.Math.toDegrees(cartographic.longitude);
+        let latitude = Cesium.Math.toDegrees(cartographic.latitude);
+        let height = cartographic.height;
+        let heading = viewer.scene.camera.heading;
+        let pitch = viewer.scene.camera.pitch;
+        // that.addSceneFun()
+
+        if (!position) {
+            position = Cesium.Cartesian3.fromDegrees(0, 0, 0);
+        }
+        if (Cesium.defined(pickObj)) {
+
+            if (pickObj.primitive instanceof Cesium.Primitive && pickObj.id.properties && pickObj.id.properties.type == '国有建设用地完成项目') {//点击primitive
+                //primitive相关操作
+                let propertyNames = pickObj.id.properties.propertyNames
+                propertyNames.forEach((res) => {
+                    console.log(res,pickObj.id.properties[res]._value);
+
+                })
+            }
+
+            handler_cockpit.destroy();
+            handler_cockpit = null;
+        } else {
+
+
+        }
+
+    }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
+
+
+}

+ 117 - 87
src/views/ConstructionApplication3D/BenchmarkLandPriceAnalysis/jzdjfxsmjg.vue

@@ -212,6 +212,7 @@ import {
   midpoint,
   difference,
 } from "@turf/turf";
+// import html2canvas from "html2canvas";
 import { getJZDJWord, getWord } from "@/api/zt/ztApi.js";
 export default {
   data() {
@@ -286,6 +287,21 @@ export default {
       await this.CalculateAnalysisArea();
       await this.getGYLandOwnership();
       await this.getJTLandOwnership();
+      let entitys = [];
+      if (viewer.entities.getById("HZFW")) {
+        entitys.push(viewer.entities.getById("HZFW"));
+      }
+      this.LayerData.GYData.forEach((GYData) => {
+        if (viewer.entities.getById(GYData.id)) {
+          entitys.push(viewer.entities.getById(GYData.id));
+        }
+      });
+      this.LayerData.JTData.forEach((JTData) => {
+        if (viewer.entities.getById(JTData.id)) {
+          entitys.push(viewer.entities.getById(JTData.id));
+        }
+      });
+      viewer.flyTo(entitys);
       await this.CalculateJZDJ();
       // await this.getGHDK();
       // await this.getJZDJ();
@@ -495,8 +511,13 @@ export default {
               }
             });
           });
+
           that.gyjtzdj();
-          that.setFXBG();
+
+          setTimeout(function () {
+            that.setFXBG();
+          }, 4000); // 这里的3000毫秒等于3秒
+
           debugger;
         } else {
           this.$message.error("未配置当前土地用途,请联系管理员添加");
@@ -786,98 +807,107 @@ export default {
      * 生成报告
      */
     async setFXBG() {
-      let data = {
-        projectName: this.info.BenchmarkLandPrice.ProjectName, //项目名称
-        analysisDate: moment(new Date()).format("YYYY-MM-DD HH:mm:ss"), //分析时间
-        projectType: this.info.BenchmarkLandPrice.ProjectType, //项目类型
-        buildUnit: this.info.BenchmarkLandPrice.ConstructionUnit, //建设单位
-        analysisArea: this.formData.fxzmj, //分析面积(平方米)
-        totalLandPrice: this.formData.zdj, //总地价(万元) 国有+集体 总地价预估合计
-        areaSCL: 0, //国有建设用地面积(平方米) 国有 土地面积合计
-        baseLandPriceSCL: 0, //国有建设用地基准地价(万元)
-        areaCCL: 0, //集体建设用地面积(平方米) 集体 土地面积合计
-        baseLandPriceCCL: 0, //集体建设用地基准地价(万元)
-        picList: [], //图片集 分析范围
-        definitionBLP: this.jzdj_LandUse, //报告类型名称
-        totalArea: 0, //国有+集体土地面积合计 平方米 tableList01 土地面积 + tableList01土地面积
-        landPriceESCL: 0, //国有土地地价预估 万元 国有 总地价预估合计 tableList01 总地价预估 累加
-        landPriceECCL: 0, // 集体土地地价预估 万元 集体 总地价预估合计 tableList02 总地价预估 累加
-        tableList01: [], //国有建设用地
-        tableList02: [], //集体建设用地
-      };
-      debugger;
-      this.LayerData.GYData.forEach((gyelement) => {
-        gyelement.fromData.forEach((element) => {
-          data.totalArea += element.area;
-          data.baseLandPriceSCL += element.zdj;
-          data.areaSCL += element.area;
-          data.landPriceESCL += element.zdj;
-          data.tableList01.push({
-            lv: element.tdjb,
-            landPrice: Number((element.dj * 666.67).toFixed(2)),
-            area: Number((element.area / 666.67).toFixed(2)),
-            landPriceES: Number((element.zdj / 10000).toFixed(2)),
+      let that = this;
+      var promise = scene.outputSceneToFile();
+      // html2canvas(document.getElementById("cesiumContainer")).then(
+      Cesium.when(promise, async function (canvas) {
+        // 将canvas转换为base64图片
+        // let imageBase64 = canvas.toDataURL("image/jpeg");
+        let imageBase64 = canvas;
+        debugger;
+        let data = {
+          projectName: that.info.BenchmarkLandPrice.ProjectName, //项目名称
+          analysisDate: moment(new Date()).format("YYYY-MM-DD HH:mm:ss"), //分析时间
+          projectType: that.info.BenchmarkLandPrice.ProjectType, //项目类型
+          buildUnit: that.info.BenchmarkLandPrice.ConstructionUnit, //建设单位
+          analysisArea: that.formData.fxzmj, //分析面积(平方米)
+          totalLandPrice: that.formData.zdj, //总地价(万元) 国有+集体 总地价预估合计
+          areaSCL: 0, //国有建设用地面积(平方米) 国有 土地面积合计
+          baseLandPriceSCL: 0, //国有建设用地基准地价(万元)
+          areaCCL: 0, //集体建设用地面积(平方米) 集体 土地面积合计
+          baseLandPriceCCL: 0, //集体建设用地基准地价(万元)
+          picBase64List: [imageBase64], //图片集 分析范围
+          definitionBLP: that.jzdj_LandUse, //报告类型名称
+          totalArea: 0, //国有+集体土地面积合计 平方米 tableList01 土地面积 + tableList01土地面积
+          landPriceESCL: 0, //国有土地地价预估 万元 国有 总地价预估合计 tableList01 总地价预估 累加
+          landPriceECCL: 0, // 集体土地地价预估 万元 集体 总地价预估合计 tableList02 总地价预估 累加
+          tableList01: [], //国有建设用地
+          tableList02: [], //集体建设用地
+        };
+        debugger;
+        that.LayerData.GYData.forEach((gyelement) => {
+          gyelement.fromData.forEach((element) => {
+            data.totalArea += element.area;
+            data.baseLandPriceSCL += element.zdj;
+            data.areaSCL += element.area;
+            data.landPriceESCL += element.zdj;
+            data.tableList01.push({
+              lv: element.tdjb,
+              landPrice: Number((element.dj * 666.67).toFixed(2)),
+              area: Number((element.area / 666.67).toFixed(2)),
+              landPriceES: Number((element.zdj / 10000).toFixed(2)),
+            });
           });
         });
-      });
-      this.LayerData.JTData.forEach((jtelement) => {
-        jtelement.fromData.forEach((element) => {
-          data.totalArea += element.area;
-          data.baseLandPriceCCL += element.zdj;
-          data.areaCCL += element.area;
-          data.landPriceECCL += element.zdj;
-          data.tableList02.push({
-            lv: element.tdjb,
-            landPrice: Number((element.dj * 666.67).toFixed(2)),
-            area: Number((element.area / 666.67).toFixed(2)),
-            landPriceES: Number((element.zdj / 10000).toFixed(2)),
+        that.LayerData.JTData.forEach((jtelement) => {
+          jtelement.fromData.forEach((element) => {
+            data.totalArea += element.area;
+            data.baseLandPriceCCL += element.zdj;
+            data.areaCCL += element.area;
+            data.landPriceECCL += element.zdj;
+            data.tableList02.push({
+              lv: element.tdjb,
+              landPrice: Number((element.dj * 666.67).toFixed(2)),
+              area: Number((element.area / 666.67).toFixed(2)),
+              landPriceES: Number((element.zdj / 10000).toFixed(2)),
+            });
           });
         });
-      });
-      data.analysisArea = Number((data.analysisArea / 666.67).toFixed(2));
-      data.totalLandPrice = Number((data.totalLandPrice / 10000).toFixed(2));
-      data.areaSCL = Number((data.areaSCL / 666.67).toFixed(2));
-      data.areaCCL = Number((data.areaCCL / 666.67).toFixed(2));
-      data.totalArea = Number((data.totalArea / 666.67).toFixed(2));
-      data.landPriceESCL = Number((data.landPriceESCL / 10000).toFixed(2));
-      data.landPriceECCL = Number((data.landPriceECCL / 10000).toFixed(2));
-      data.baseLandPriceCCL = Number(
-        (data.baseLandPriceCCL / 10000).toFixed(2)
-      );
-      data.baseLandPriceSCL = Number(
-        (data.baseLandPriceSCL / 10000).toFixed(2)
-      );
-      debugger;
-      let JZDJWordPath = await getJZDJWord(data);
-      debugger;
-      if (JZDJWordPath.code == 200) {
-        this.info.BenchmarkLandPrice.AnalysisStatus = "完成";
-        this.info.BenchmarkLandPrice.ReportPath = JZDJWordPath.msg;
-        let BenchmarkLandPrice = window.BenchmarkLandPriceList.find(
-          (c) => (c.id = this.info.BenchmarkLandPrice.id)
+        data.analysisArea = Number((data.analysisArea / 666.67).toFixed(2));
+        data.totalLandPrice = Number((data.totalLandPrice / 10000).toFixed(2));
+        data.areaSCL = Number((data.areaSCL / 666.67).toFixed(2));
+        data.areaCCL = Number((data.areaCCL / 666.67).toFixed(2));
+        data.totalArea = Number((data.totalArea / 666.67).toFixed(2));
+        data.landPriceESCL = Number((data.landPriceESCL / 10000).toFixed(2));
+        data.landPriceECCL = Number((data.landPriceECCL / 10000).toFixed(2));
+        data.baseLandPriceCCL = Number(
+          (data.baseLandPriceCCL / 10000).toFixed(2)
         );
-        BenchmarkLandPrice.AnalysisStatus = "完成";
-        BenchmarkLandPrice.ReportPath = JZDJWordPath.msg;
-
-        // this.$notify({
-        //   title: "成功",
-        //   message:
-        //     this.info.BenchmarkLandPrice.ProjectName + "报告已生成,可下载",
-        //   type: "success",
-        // });
-      } else {
-        this.info.BenchmarkLandPrice.AnalysisStatus = "异常";
-        let BenchmarkLandPrice = window.BenchmarkLandPriceList.find(
-          (c) => (c.id = this.info.BenchmarkLandPrice.id)
+        data.baseLandPriceSCL = Number(
+          (data.baseLandPriceSCL / 10000).toFixed(2)
         );
-        BenchmarkLandPrice.AnalysisStatus = "异常";
-        this.$notify.error({
-          title: "异常",
-          message:
-            this.info.BenchmarkLandPrice.ProjectName +
-            "报告生成异常,请重新选取区域分析",
-        });
-      }
+        debugger;
+        let JZDJWordPath = await getJZDJWord(data);
+        debugger;
+        if (JZDJWordPath.code == 200) {
+          that.info.BenchmarkLandPrice.AnalysisStatus = "完成";
+          that.info.BenchmarkLandPrice.ReportPath = JZDJWordPath.msg;
+          let BenchmarkLandPrice = window.BenchmarkLandPriceList.find(
+            (c) => (c.id = that.info.BenchmarkLandPrice.id)
+          );
+          BenchmarkLandPrice.AnalysisStatus = "完成";
+          BenchmarkLandPrice.ReportPath = JZDJWordPath.msg;
+
+          // that.$notify({
+          //   title: "成功",
+          //   message:
+          //     that.info.BenchmarkLandPrice.ProjectName + "报告已生成,可下载",
+          //   type: "success",
+          // });
+        } else {
+          that.info.BenchmarkLandPrice.AnalysisStatus = "异常";
+          let BenchmarkLandPrice = window.BenchmarkLandPriceList.find(
+            (c) => (c.id = that.info.BenchmarkLandPrice.id)
+          );
+          BenchmarkLandPrice.AnalysisStatus = "异常";
+          that.$notify.error({
+            title: "异常",
+            message:
+              that.info.BenchmarkLandPrice.ProjectName +
+              "报告生成异常,请重新选取区域分析",
+          });
+        }
+      });
     },
 
     /**

+ 2 - 1
src/views/cockpit/tdsy.vue

@@ -840,6 +840,7 @@ export default {
     draw_vector_tdgy_gy_jd() {
 
       this.vector_data.forEach((res) => {
+        res.type = '国有建设用地完成项目'
         res.geom.coordinates[0].forEach((res_coordinates) => {
 
           const twoDArray = res_coordinates;
@@ -848,7 +849,7 @@ export default {
 
           this.gy_jd_entity.entities.add({
             // position: Cesium.Cartesian3.fromDegrees(res_coordinates[0], res_coordinates[1], 0),
-            // properties: obj,
+            properties: res,
             name: "国有建设用地完成项目",
             polygon: {
               zIndex: 1,