ソースを参照

1.代码优化2.加载发布数据

wangjiahui 2 週間 前
コミット
4337bf71a6

+ 3 - 3
index.html

@@ -22,8 +22,8 @@
   <script src="./static/lib/thirdLib/kdbush/kdbush.min.js"></script>
 
 
-    <!-- tiff -->
-<script src="./static/lib/thirdLib/tiff/tiff.min.js"></script>
+  <!-- tiff -->
+  <script src="./static/lib/thirdLib/tiff/tiff.min.js"></script>
   <!-- viewerCesiumNavigationMixin -->
   <script src="./static/lib/thirdParty/Navigation/viewerCesiumNavigationMixin.js"></script>
 
@@ -38,4 +38,4 @@
   <div id="app"></div>
 </body>
 
-</html>
+</html>

ファイルの差分が大きいため隠しています
+ 460 - 192
package-lock.json


+ 1 - 3
src/components/Header/ToolBarHeader.vue

@@ -66,8 +66,6 @@ export default {
                item.active = !item.active;
             }
          });
-
-
          /* 控制右侧工具条的 */
          if (item.name === "toolBar") {
             this.$bus.emit("floatToolBarShow_bus", item.active)
@@ -104,7 +102,7 @@ export default {
    border-radius: 4px;
    z-index: 99999;
    position: absolute;
-   right: 0;
+   right: -1700px;
 }
 
 .ulClass li {

+ 104 - 98
src/components/Main/EarthMainContainer/EarthContainer.vue

@@ -1,8 +1,8 @@
 <template>
- <div :id="earthId" class="earthContainer">
-  <!-- 卷帘对比用 -->
-  <div id="juanLianslider" style="display: none"></div>
- </div>
+   <div :id="earthId" class="earthContainer">
+      <!-- 卷帘对比用 -->
+      <div id="juanLianslider" style="display: none"></div>
+   </div>
 </template>
 
 <script>
@@ -12,51 +12,51 @@ import MapApp from "../../../mapApp/MapApp.js";
 import DataMap from "../../../mapApp/DataMap.js";
 
 export default {
- name: "EarthContainer",
- created() {
-  this.earthId = createGuid();
- },
-
- mounted() {
-  this.init();
- },
-
- methods: {
-  init() {
-   //初始化地球
-   var viewer = new Uninpho.Viewer(this.earthId, {
-    shouldAnimate: true,
-    highlight: true
-   });
-viewer.scene.screenSpaceCameraController.enableCollisionDetection = false;
-
-   /* 创建appInstance 实例 */
-   const appInstance = new MapApp(viewer, this);
-   // 数据管理体系
-   window.dm = new DataMap(viewer)
-
-   /* 先临时挂在这里,因为v-if的组件,暂时获取不到earth对象,其中工具箱中所需要的viewer均无法使用 */
-   window.earth = viewer
-   window.viewer = viewer
-
-   this.$bus.emit("app.init", appInstance);
-
-   Object.defineProperty(viewer, "uuid", {
-    get: function () {
-     return this._container.id;
-    },
-   });
-
-
-  },
- },
+   name: "EarthContainer",
+   created() {
+      this.earthId = createGuid();
+   },
+
+   mounted() {
+      this.init();
+   },
+
+   methods: {
+      init() {
+         //初始化地球
+         var viewer = new Uninpho.Viewer(this.earthId, {
+            shouldAnimate: true,
+            highlight: true
+         });
+         viewer.scene.screenSpaceCameraController.enableCollisionDetection = false;
+
+         /* 创建appInstance 实例 */
+         const appInstance = new MapApp(viewer, this);
+         // 数据管理体系
+         window.dm = new DataMap(viewer)
+
+         /* 先临时挂在这里,因为v-if的组件,暂时获取不到earth对象,其中工具箱中所需要的viewer均无法使用 */
+         window.earth = viewer
+         window.viewer = viewer
+
+         this.$bus.emit("app.init", appInstance);
+
+         Object.defineProperty(viewer, "uuid", {
+            get: function () {
+               return this._container.id;
+            },
+         });
+
+
+      },
+   },
 };
 </script>
 
 <style scoped>
 .earthContainer {
- width: 100%;
- height: 100%;
+   width: 100%;
+   height: 100%;
 }
 
 /* .multiEarth {
@@ -72,78 +72,84 @@ viewer.scene.screenSpaceCameraController.enableCollisionDetection = false;
 
 <style>
 .ysc-dynamic-layer {
- /*重要*/
- user-select: none; /*禁止选中*/
- pointer-events: none; /*鼠标穿透*/
- /*重要*/
- position: fixed;
- top: 0;
- left: 0;
- width: 320px;
- height: 200px;
- z-index: 1;
+   /*重要*/
+   user-select: none;
+   /*禁止选中*/
+   pointer-events: none;
+   /*鼠标穿透*/
+   /*重要*/
+   position: fixed;
+   top: 0;
+   left: 0;
+   width: 320px;
+   height: 200px;
+   z-index: 1;
 }
 
 .ysc-dynamic-layer .line {
- position: absolute;
- left: 0;
- width: 50px;
- height: 115px;
- bottom: -30px;
- z-index: 10;
- background: url('/static/img/inforDiv/line.png') no-repeat;
+   position: absolute;
+   left: 0;
+   width: 50px;
+   height: 115px;
+   bottom: -30px;
+   z-index: 10;
+   background: url('/static/img/inforDiv/line.png') no-repeat;
 }
+
 .ysc-dynamic-layer .main {
- position: absolute;
- top: 0;
- left: 50px;
- right: 0;
- bottom: 140px;
- background: url('/static/img/inforDiv/layer_border.png') no-repeat;
-
- background-size: 100% 100%;
- color: white;
- padding: 20px 5px 5px 20px;
- font-size: 14px;
- user-select: text;
- pointer-events: auto;
- height: 100px;
+   position: absolute;
+   top: 0;
+   left: 50px;
+   right: 0;
+   bottom: 140px;
+   background: url('/static/img/inforDiv/layer_border.png') no-repeat;
+
+   background-size: 100% 100%;
+   color: white;
+   padding: 20px 5px 5px 20px;
+   font-size: 14px;
+   user-select: text;
+   pointer-events: auto;
+   height: 100px;
 }
+
 .ysc-dynamic-layer .light {
- position: absolute;
- left: 0;
- width: 0;
- height: 100px;
- bottom: 0;
- background: url('/static/img/inforDiv/line.png') no-repeat;
- animation: goLine 0.5s forwards;
+   position: absolute;
+   left: 0;
+   width: 0;
+   height: 100px;
+   bottom: 0;
+   background: url('/static/img/inforDiv/line.png') no-repeat;
+   animation: goLine 0.5s forwards;
 }
+
 .ysc-dynamic-layer .el-input-group__append,
 .el-input-group__prepend {
- background-color: #f5f7fa00;
- color: #e9ebf1;
- position: relative;
- border: 1px solid #dcdfe600;
+   background-color: #f5f7fa00;
+   color: #e9ebf1;
+   position: relative;
+   border: 1px solid #dcdfe600;
 }
+
 .ysc-dynamic-layer .el-input.is-disabled .el-input__inner {
- background-color: #f5f7fa00;
- border: 1px solid #dcdfe600;
- color: #f8f8fa;
- cursor: not-allowed;
+   background-color: #f5f7fa00;
+   border: 1px solid #dcdfe600;
+   color: #f8f8fa;
+   cursor: not-allowed;
 }
 
 /* 卷帘对比专用 */
 #juanLianslider {
- position: absolute;
- left: 50%;
- top: 0px;
- background-color: #d3d3d3;
- width: 5px;
- height: 100%;
- z-index: 9999;
+   position: absolute;
+   left: 50%;
+   top: 0px;
+   background-color: #d3d3d3;
+   width: 5px;
+   height: 100%;
+   z-index: 9999;
 }
 
 #juanLianslider:hover {
- cursor: ew-resize;
+   cursor: ew-resize;
 }
 </style>

+ 4 - 0
src/components/Platform/Platform.vue

@@ -14,6 +14,7 @@
     <layerTree v-show="menuList[5].active"></layerTree>
     <!-- 统计信息 -->
     <ResultTablePannle :tableData="ResultData" v-if="TubanInfShow"></ResultTablePannle>
+    <ResultTablePannle1 v-if="TubanInfShow"></ResultTablePannle1>
     <DanTiHua_Show :currentInforItem="matchedItem" v-show="DanTiHuaShow"></DanTiHua_Show>
     <EchartsLeft></EchartsLeft>
     <TuBiao_Main></TuBiao_Main>
@@ -36,6 +37,8 @@ import ResultTablePannle from "./ShiKongFenXi/TimeSpatialQuery/ResultTablePannle
 import DanTiHua_Show from "../Platform/ShiKongFenXi/TimeSpatialQuery/DanTiHua_Show.vue";
 import EchartsLeft from "../../components/echarts/EchartsLeft.vue";
 import TuBiao_Main from "./ShiKongFenXi/TimeSpatialQuery/TuBiao_Main.vue";
+import ResultTablePannle1 from "./ShiKongFenXi/TimeSpatialQuery/TimeSpatialQuery/ResultTablePannle1.vue";
+
 // import NewComponent from "../Platform/ShiKongFenXi/TimeSpatialQuery/TimeSpatialQuery/tubanzhushi.vue"; 
 
 export default {
@@ -51,6 +54,7 @@ export default {
     DanTiHua_Show,
     EchartsLeft,
     TuBiao_Main,
+    ResultTablePannle1
     // NewComponent,
   },
   data() {

+ 29 - 2
src/components/Platform/ShiKongFenXi/TimeSpatialQuery/TimeSpatialQuery/5FarmlandCropMonitor.vue

@@ -134,6 +134,12 @@
         <div class="mbcSpandiv"><span>清空查询</span></div>
       </div>
     </div>
+    <div class="queryHeader">加载功能</div>
+    <div :class="{ 'menuButtonClass': true, 'activeMenuButtonClass': menuButtonList[7].active }" @click='adddata'>
+      <div class="mbcIcondiv"><i class="el-icon-document-add"></i></div>
+      <div class="mbcSpandiv"><span>数据加载</span></div>
+    </div>
+
     <div>
 
     </div>
@@ -142,6 +148,8 @@
     <bar :nodeName="nodeName"></bar>
 
     <linechart></linechart>
+    <jichugongneng v-show="isOverlayVisible"></jichugongneng>
+    <datajiazai></datajiazai>
   </div>
 
 
@@ -160,10 +168,13 @@ import DrawTool from "../../lib/DrawTool.js";
 import DrawTool1 from "../../lib/drawCircle.js"
 import bar from "../../../../echarts/bar.vue";
 import linechart from "../../../../echarts/linechart.vue";
+import jichugongneng from "./jichugongneng.vue";
+import datajiazai from "./datajiazai.vue";
 var dthObj = null
 export default {
   data() {
     return {
+      isOverlayVisible: false,
       nodeName: '',
       treeLayerData: [],
       treeData: [
@@ -255,6 +266,9 @@ export default {
         },
         { label: '清空查询', type: 'clearAndClose', icon: 'iconfont', active: false },
 
+
+
+
       ],
       /* 查询结果 */
       attrArr: [],
@@ -282,6 +296,13 @@ export default {
       this.drawTool1 = new DrawTool1(app.viewer)
       dthObj = new Dth(app.viewer, this.$bus)
     });
+    this.$bus.on('isShowResultPannle1', (data) => {
+      if (data && data.isShowResultPannle1 === false) {
+        this.isShowResultPannle1 = false; // 执行关闭面板的逻辑
+
+      }
+    });
+
     this.$bus.on("noticePaltformChildCompontents", currentMenu => {
       if (currentMenu.label == "空间查询" && currentMenu.active == true) {
       } else {
@@ -305,9 +326,15 @@ export default {
     ResultTablePannle,
     ResultTablePannle1,
     bar,
-    linechart
+    linechart,
+    jichugongneng,
+    datajiazai,
   },
   methods: {
+    adddata() {
+      this.isOverlayVisible = true;
+
+    },
 
     handleLayerCheck(node, checked) {
       if (checked) {
@@ -867,7 +894,7 @@ export default {
   z-index: 1000;
 }
 
-/* 修改第1处 */
+
 .treeclass {
   background-color: transparent;
   color: white;

+ 77 - 75
src/components/Platform/ShiKongFenXi/TimeSpatialQuery/TimeSpatialQuery/ResultTablePannle1.vue

@@ -16,14 +16,16 @@
                 <div class="">
                     <el-table :data="tableData" style="width: 2000px" @row-click="fly">
                         <el-table-column v-for="(item, index) in attrArr" v-if="duizhao[item.prop]" :prop="item.prop"
-                            :label="duizhao[item.prop] ? duizhao[item.prop] : item.prop" :key="index" :width="index === 0 ? '60' : ''" align="center">
+                            :label="duizhao[item.prop] ? duizhao[item.prop] : item.prop" :key="index"
+                            :width="index === 0 ? '60' : ''" align="center">
                             <template slot-scope="scope">
-                <!-- 判断是否为class_name并且不存在时显示默认值 -->
-                <span v-if="item === 'class_name' && !scope.row[item.prop]">变化区域</span>
-                <!-- 判断item是否为area,并格式化为两位小数 -->
-                <span v-if="scope.row[item.prop] && item === 'area'">{{ scope.row[item.prop].toFixed(2) }}</span>
-                <span v-else>{{ scope.row[item.prop] }}</span>
-              </template>
+                                <!-- 判断是否为class_name并且不存在时显示默认值 -->
+                                <span v-if="item === 'class_name' && !scope.row[item.prop]">变化区域</span>
+                                <!-- 判断item是否为area,并格式化为两位小数 -->
+                                <span v-if="scope.row[item.prop] && item === 'area'">{{ scope.row[item.prop].toFixed(2)
+                                    }}</span>
+                                <span v-else>{{ scope.row[item.prop] }}</span>
+                            </template>
                         </el-table-column>
                     </el-table>
                 </div>
@@ -42,7 +44,7 @@ import primitiveLayerManager from "../../lib/PrimitiveLayerManager";
 export default {
     data() {
         return {
-            attrArr: ['gid', 'id', 'area', 'class_name'],
+            // attrArr: ['gid', 'id', 'area', 'class_name'],//
             isShowMainPannle: true,
             duizhao: {
                 adname: "县名",
@@ -71,14 +73,14 @@ export default {
         this.calculateTotalArea();
     },
     watch: {
-    // 监听tableData的变化,如果tableData发生变化,则重新计算总面积
-    tableData: {
-      handler() {
-        this.calculateTotalArea();
-      },
-      deep: true,  // 深度监听,确保监听到tableData中的对象变化
-    }
-  },
+        // 监听tableData的变化,如果tableData发生变化,则重新计算总面积
+        tableData: {
+            handler() {
+                this.calculateTotalArea();
+            },
+            deep: true,  // 深度监听,确保监听到tableData中的对象变化
+        }
+    },
     components: {
 
     },
@@ -124,60 +126,60 @@ export default {
         },
 
         fly(row) {
-      const dataShow = JSON.parse(row.st_asgeojson);
-      this.centroid = dataShow.type === 'MultiPolygon'
-        ? this.calculateCentroid(dataShow.coordinates[0][0])
-        : this.calculateCentroid(dataShow.coordinates[0]);
-      primitiveLayerManager.removeLayerChange('Highlightline');
-      // 突出点击的对象
-      primitiveLayerManager._addSingleLine(this.centroid.line, 'Highlightline');
-      // 定位
-      this.flyTo(this.centroid.centroidX, this.centroid.centroidY);
-    },
-    calculateCentroid(points) {
-      let calculateData = {
-        sumX: 0,
-        sumY: 0,
-        line: [],
-        centroidX: 0,
-        centroidY: 0
-      };
-      const numPoints = points.length;
-      // for循环求和
-      for (let i = 0; i < numPoints; i++) {
-        calculateData.sumX += points[i][0];
-        calculateData.sumY += points[i][1];
-        calculateData.line.push(points[i][0]);
-        calculateData.line.push(points[i][1]);
-      }
-      // 计算平均数
-      calculateData.centroidX = calculateData.sumX / numPoints;
-      calculateData.centroidY = calculateData.sumY / numPoints;
-      return calculateData;
-    },
-    flyTo(lon, lat) {
-      viewer.camera.flyTo({
-        destination: Cesium.Cartesian3.fromDegrees(lon, lat, 600),
-        duration: 2,
-      });
-    },
-    closePannle() {
-      this.$bus.emit("TubanInfShow", {
-        isShow: false
-      });
-    },
-    calculateTotalArea() {
-      // 计算area字段的总和,保留小数点后两位
-      this.dataAreaSum = this.tableData.reduce((sum, row) => {
-        return sum + (row.area || 0);  // 如果row.area存在,累加到sum,否则不加
-      }, 0).toFixed(2);  // 保留两位小数
-    },
-    // 判断是否有表格内容,没有就显示xxx
-    caseTypeNamesFormat(row) {
-      let showProp = null
-      row.caseTypeNames ? showProp = row.caseTypeNames : showProp = '---'
-      return showProp
-    },
+            const dataShow = JSON.parse(row.st_asgeojson);
+            this.centroid = dataShow.type === 'MultiPolygon'
+                ? this.calculateCentroid(dataShow.coordinates[0][0])
+                : this.calculateCentroid(dataShow.coordinates[0]);
+            primitiveLayerManager.removeLayerChange('Highlightline');
+            // 突出点击的对象
+            primitiveLayerManager._addSingleLine(this.centroid.line, 'Highlightline');
+            // 定位
+            this.flyTo(this.centroid.centroidX, this.centroid.centroidY);
+        },
+        calculateCentroid(points) {
+            let calculateData = {
+                sumX: 0,
+                sumY: 0,
+                line: [],
+                centroidX: 0,
+                centroidY: 0
+            };
+            const numPoints = points.length;
+            // for循环求和
+            for (let i = 0; i < numPoints; i++) {
+                calculateData.sumX += points[i][0];
+                calculateData.sumY += points[i][1];
+                calculateData.line.push(points[i][0]);
+                calculateData.line.push(points[i][1]);
+            }
+            // 计算平均数
+            calculateData.centroidX = calculateData.sumX / numPoints;
+            calculateData.centroidY = calculateData.sumY / numPoints;
+            return calculateData;
+        },
+        flyTo(lon, lat) {
+            viewer.camera.flyTo({
+                destination: Cesium.Cartesian3.fromDegrees(lon, lat, 600),
+                duration: 2,
+            });
+        },
+        closePannle() {
+            this.$bus.emit("TubanInfShow", {
+                isShow: false
+            });
+        },
+        calculateTotalArea() {
+            // 计算area字段的总和,保留小数点后两位
+            this.dataAreaSum = this.tableData.reduce((sum, row) => {
+                return sum + (row.area || 0);  // 如果row.area存在,累加到sum,否则不加
+            }, 0).toFixed(2);  // 保留两位小数
+        },
+        // 判断是否有表格内容,没有就显示xxx
+        caseTypeNamesFormat(row) {
+            let showProp = null
+            row.caseTypeNames ? showProp = row.caseTypeNames : showProp = '---'
+            return showProp
+        },
 
 
 
@@ -206,11 +208,11 @@ export default {
 }
 
 .numberData {
-  float: left;
-  line-height: 36px;
-  /* color: #66cffa; */
-  margin-right: 20px;
-  /* margin-left: 20px; */
+    float: left;
+    line-height: 36px;
+    /* color: #66cffa; */
+    margin-right: 20px;
+    /* margin-left: 20px; */
 }
 
 .layerMenu {

+ 367 - 0
src/components/Platform/ShiKongFenXi/TimeSpatialQuery/TimeSpatialQuery/datajiazai.vue

@@ -0,0 +1,367 @@
+<template>
+    <div class="background">
+        <div class="bottomTerrainClass">
+            <el-tree class="treeclass" :data="treeLayerData" show-checkbox @node-click="setCurrentNode"
+                highlight-current node-key="name" @check-change="setVisible" ref="xytree2">
+                <span slot-scope="{ node, data }" @dblclick="flyTo(node, data)" style="width: 100%">
+                    <div>
+                        {{ node.label }}
+                    </div>
+                </span>
+            </el-tree>
+            <div>
+                <div>
+                    <el-radio-group v-model="currentTerrain" class="terrain1">
+                        <el-radio :label="item.name" v-for="(item, index) in terrainList" :key="index"
+                            @change="changeTerrain">{{ item.name }}</el-radio>
+                    </el-radio-group>
+                </div>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+import primitiveLayerManager from "../../../../Platform/ShiKongFenXi/lib/PrimitiveLayerManager";
+import axiosRequestAPI from "../../../../Platform/ShiKongFenXi/lib/axiosRequestAPI"
+export default {
+    data() {
+        return {
+            treeLayerData: [],
+            testname: '新增发布数据',
+            currentTerrain: "",
+            terrainList: [],
+
+        };
+    },
+
+    created() {
+        this.$bus.on("app.init", app => {
+            this.app = app;
+            this.earth = app.viewer;
+        });
+        this.treeLayerData = AppConfig.layersConfig.find(layer => layer.name === this.testname).children || [];
+        this.terrainList = AppConfig.terrainList;
+    },
+    methods: {
+        changeTerrain(name) {
+            let terrian = this.terrainList.find(tr => {
+                return tr.name == name;
+                console.log(terrian);
+            });
+            if (terrian) {
+                this.app.viewer.terrainProvider = new Cesium.CesiumTerrainProvider({
+                    url: terrian.url,
+                    requestVertexNormals: true
+                });
+            } else {
+                this.app.viewer.terrainProvider = new Cesium.EllipsoidTerrainProvider();
+            }
+            this.currentTerrain = name;
+        },
+        setCurrentNode(currentNode) {
+            this.currentNode = currentNode;
+            console.log(currentNode);
+        },
+
+        setVisible(node, checked) {
+            // // 取消浏览模式
+            // this.CameraBrowsing(false)
+            // 倾斜节点node
+
+            if (node.type == "group") return;
+            console.log(this.app.layerManager);
+
+            let layer = this.app.layerManager.getLayer(node.name);
+            if (layer) {
+                layer.show = checked;
+            }
+            if (node.type === "geojson_mian" && checked) {
+                axiosRequestAPI
+                    .listAllTuBanTableName(node.name)
+                    .then((result) => {
+                        primitiveLayerManager.addLayer(result, node.name, Cesium.Color.fromBytes(0, 169, 255).withAlpha(1));
+                    })
+            }
+            else if (!checked) {
+                primitiveLayerManager.removeLayerChange(node.name)
+            }
+            if (node.type === "3dTiles" && checked && node.name !== "房屋数据") {
+                earth.zoomTo(layer);
+                //clear鼠标点击操作
+                this.$bus.emit("clearhandler");
+            }
+            if (node.type === "3dTilesHeight" && checked && node.name !== "房屋数据") {
+                earth.zoomTo(layer);
+                //clear鼠标点击操作
+                this.$bus.emit("clearhandler");
+            }
+            if (node.type === "3dTilesMax" && checked && node.name !== "房屋数据") {
+                earth.zoomTo(layer);
+                // 浏览模式
+                this.CameraBrowsing(checked)
+                //clear鼠标点击操作
+                this.$bus.emit("clearhandler");
+                // 打开浏览面板
+            }
+            if (node.type === "3dTilesMax" && checked && node.name === "教学楼max") {
+                this.$bus.emit("showmaxposition1");
+            }
+            if (node.type === "3dTilesMax" && checked && node.name === "停车场max") {
+                this.$bus.emit("showmaxposition2");
+
+            }
+            if (node.type === "3dTilesMax" && !checked) {
+                // 关闭浏览面板
+                this.$bus.emit("closemaxposition");
+            }
+            if (node.type === "3dTilesHeight" && node.name === "房屋数据" && checked) {
+                // console.log(layer._root.transform[14]);
+                earth.zoomTo(layer);
+                //白膜图层高度修改
+                // this.layer1.modelMatrix[14] = this.layer1.modelMatrix[14] +node.height
+                // layer._root.transform[14] = layer._root.transform[14] + node.height;
+                // layer._root.transform[13] = 4802609.35862297
+                // layer._root.transform[12] = -1959543.00275453
+                this.pickshp();
+                this.baimolayer_temp = layer;
+            }
+            if (node.type === "dianyun" && checked) {
+                earth.flyTo(layer);
+                //渲染点云数据
+
+                // layer.readyPromise.then((layer) => {
+                //   // 实例化点云符号化类
+                //   new Uninpho.PclColorStyle({
+                //     viewer: viewer,
+                //     minHeight: node.minHeight,
+                //     maxHeight: node.maxHeight,
+                //     alpha: 0.6,
+                //     // colorImage: '../../../../static/img/colortable/colpick_slider.png',
+                //     center: layer.boundingSphere.center
+                //   });
+                // })
+            }
+            if (node.type === "zaihaidian" && checked) {
+                //获取灾害点所有数据
+                this.$axiosInstance.zaihaidianadding().then(data => {
+                    // console.log(data.data);
+                    let res = data.data;
+                    res.forEach(zaihaidian => {
+                        this.zaihaidian = zaihaidian;
+                        var dzdtc = earth.entities.add({
+                            id: this.zaihaidian.id,
+                            position: Cesium.Cartesian3.fromDegrees(
+                                this.zaihaidian.lon,
+                                this.zaihaidian.lat,
+                                2000
+                            ),
+                            billboard: {
+                                // id :this.zaihaidian.id,
+                                image: "../../../../static/img/poi/zaihaidian.png",
+                                show: true,
+                                scale: 0.1,
+                                // color: Cesium.Color.RED,
+                                heightReference: Cesium.HeightReference.CLAMP_TO_GROUND
+                            }
+                        });
+                        yichuzhd.push(dzdtc);
+                    });
+                    // console.log(yichuzhd);
+                    this.pickshp();
+                });
+            }
+            if (node.type === "zaihaidian" && !checked) {
+                this.zhdshowbox = false;
+                this.earth.entities.removeById("ZHDSearch111");
+                for (var i = 0; i < yichuzhd.length; i++) {
+                    this.earth.entities.removeById(yichuzhd[i].id);
+                    // yichuzhd[i].show = false
+                }
+                yichuzhd = [];
+            }
+            if (node.type === "wms" && node.label === "用地数据" && checked) {
+                ydhandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK); //移除事件
+                ydhandler.removeInputAction(Cesium.ScreenSpaceEventType.MOUSE_MOVE); //移除事件
+                ydhandler.removeInputAction(Cesium.ScreenSpaceEventType.RIGHT_CLICK); //移除事件
+                ydhandler.setInputAction(event => {
+                    //获取点击区域的经纬度
+                    var cartesian = this.earth.camera.pickEllipsoid(
+                        event.position,
+                        this.earth.scene.globe.ellipsoid
+                    );
+                    var cartographic = Cesium.Cartographic.fromCartesian(cartesian);
+                    var lng = Cesium.Math.toDegrees(cartographic.longitude); //经度值
+                    var lat = Cesium.Math.toDegrees(cartographic.latitude); //纬度值
+                    // console.log(lng,lat);
+                    let point = [lng, lat]; //鼠标单击点的 经纬度坐标
+                    //geoserver点查询
+                    let offset = 0.00001;
+
+                    let minx = point[0] - offset;
+                    let miny = point[1] - offset;
+                    let maxx = point[0] + offset;
+                    let maxy = point[1] + offset;
+
+                    //geoserver地址
+                    let geoUrl = node.searchImageUrl;
+                    //查询图层名
+                    let layertuceng = node.geolayer;
+                    let searchImageUrl = `${geoUrl}
+                SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo
+                &QUERY_LAYERS=${layertuceng}
+                &LAYERS=${layertuceng}
+                &INFO_FORMAT=application%2Fjson
+                &FEATURE_COUNT=500
+                &X=50&Y=50
+                &SRS=EPSG%3A4326
+                &WIDTH=101&HEIGHT=101
+                &BBOX=${minx},${miny},${maxx},${maxy}`;
+
+                    // let searchImageUrl =
+                    //   `http://localhost:8090/geoserver/UninphoServer/wms?
+                    //   SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo
+                    //   &QUERY_LAYERS=UninphoServer:qinshui_yongdi
+                    //   &LAYERS=UninphoServer:qinshui_yongdi
+                    //   &INFO_FORMAT=application%2Fjson
+                    //   &FEATURE_COUNT=500
+                    //   &X=50&Y=50
+                    //   &SRS=EPSG%3A4326
+                    //   &WIDTH=101&HEIGHT=101
+                    //   &BBOX=${minx},${miny},${maxx},${maxy}`
+                    //   console.log(searchImageUrl);
+
+                    // url
+
+                    //geoserver点查询
+                    this.$axios.get(searchImageUrl).then(data => {
+                        console.log(data);
+                        if (data.data.features[0] !== undefined) {
+                            let res = data.data.features;
+                            let yongdi = res[0].properties;
+                            // res内容放在框里面
+                            this.$bus.emit("yongdixinxi", yongdi);
+                            setTimeout(() => {
+                                this.ydlxbox = true;
+                            }, 200);
+                        }
+                        //点击空白处取消弹框
+                        else if (data.data.features[0] == undefined) {
+                            this.ydlxbox = false;
+                        }
+                    });
+                }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
+            }
+            if (node.type === "wms" && node.label === "用地数据" && !checked) {
+                this.ydlxbox = false;
+                ydhandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK); //移除事件
+            }
+
+            if (node.type == "yaping") {
+
+                if (checked) {
+                    var arr = node.arr
+                    console.log(arr);
+                    this.app.layerManager.excavation.start(arr, 10);
+                } else {
+                    this.app.layerManager.excavation.stop();
+                }
+
+            }
+
+            if (node.type == "flyToIndoor") {
+                if (checked) {
+                    var camera = viewer.camera;
+                    camera.flyTo({
+                        destination: Cesium.Cartesian3.fromDegrees(node.longitude1, node.latitude1, node.height1),
+                        orientation: {
+                            heading: Cesium.Math.toRadians(node.heading1),
+                            pitch: Cesium.Math.toRadians(node.pitch1),
+                            roll: Cesium.Math.toRadians(node.roll1)
+                        }
+                    });
+                    setTimeout(() => {
+                        camera.flyTo({
+                            destination: Cesium.Cartesian3.fromDegrees(node.longitude2, node.latitude2, node.height2),
+                            orientation: {
+                                heading: Cesium.Math.toRadians(node.heading2),
+                                pitch: Cesium.Math.toRadians(node.pitch2),
+                                roll: Cesium.Math.toRadians(node.roll2)
+                            }
+                        });
+                    }, node.time)
+                }
+            }
+
+        },
+
+        flyTo(el_node, node) {
+            if (node.type === 1) {
+                xyLayerManager.flyToById(node.uuid);
+            } else if (node.type === "3dTiles") {
+                el_node.checked = true;
+                setTimeout(() => {
+                    earth.flyTo(this.app.layerManager.getLayer(node.name));
+                }, 500);
+                if (el_node.data.label !== "房屋数据") {
+                    //关闭A_information属性面板
+                    this.$bus.emit("A_information", {
+                        flag: false,
+                        content: ""
+                    });
+                    this.$bus.emit("pickshp_cancal");
+                } else if (el_node.data.label === "房屋数据") {
+                    this.$bus.emit("pickshp");
+                } else {
+                    return;
+                }
+            } else if (node.type === "dianyun") {
+                el_node.checked = true;
+                setTimeout(() => {
+                    earth.flyTo(this.app.layerManager.getLayer(node.name));
+                }, 500);
+            } else if (node.type === "geojson_mian") {
+                el_node.checked = true;
+                console.log(this.app.layerManager.getLayer(node.name));
+                setTimeout(() => {
+                    earth.flyTo(this.app.layerManager.getLayer(node.name));
+                }, 500);
+            } else {
+                this.$message.warning("请选择数据图层");
+            }
+        },
+    }
+}
+
+</script>
+<style scoped>
+.treeclass {
+    background-color: rgba(0, 0, 0, 0);
+    border: solid 1px rgba(255, 255, 255, 0.402);
+    position: absolute;
+    height: 80px;
+    width: 240px;
+    top: 0;
+    left: 0px;
+}
+
+.terrain1 {
+    background-color: rgba(0, 0, 0, 0);
+    /* border: solid 1px rgba(255, 255, 255, 0.402); */
+    position: absolute;
+    height: 100px;
+    width: 260px;
+    top: 100px;
+    left: 35px;
+}
+
+.background {
+    background-color: rgba(0, 0, 0, 0.52);
+    border: solid 1px rgba(255, 255, 255, 0.402);
+    position: absolute;
+    height: 180px;
+    width: 260px;
+    top: 0;
+    left: 350px;
+}
+</style>

+ 256 - 0
src/components/Platform/ShiKongFenXi/TimeSpatialQuery/TimeSpatialQuery/jichugongneng.vue

@@ -0,0 +1,256 @@
+<template>
+    <div v-if="isVisible" class="cesium-overlay">
+        <!-- 底层黑色透明背景 -->
+        <div class="background"></div>
+
+        <!-- 功能按钮 -->
+        <div class="button1" @click="showModelInput">加载倾斜数据</div>
+        <div class="button2" @click="showImageryInput">加载影像数据</div>
+        <div class="button3" @click="showTerrainInput">加载地形数据</div>
+
+        <!-- 显示倾斜数据输入框 -->
+        <div v-if="showModel" class="input-box">
+            <input class="input-style" type="text" v-model="modelUrl" placeholder="请输入倾斜数据 URL"
+                @keyup.enter="loadModel" />
+            <button class="button4" @click="loadModel">加载倾斜数据</button>
+        </div>
+
+        <!-- 显示影像数据输入框 -->
+        <div v-if="showImagery" class="input-box">
+            <input class="input-style" type="text" v-model="imageryUrl" placeholder="请输入影像数据 URL"
+                @keyup.enter="loadImagery" />
+            <button class="button4" @click="loadImagery">加载影像数据</button>
+        </div>
+
+        <!-- 显示地形数据输入框 -->
+        <div v-if="showTerrain" class="input-box">
+            <input class="input-style" type="text" v-model="terrainUrl" placeholder="请输入地形数据 URL"
+                @keyup.enter="loadTerrain" />
+            <button class="button4" @click="loadTerrain">加载地形数据</button>
+        </div>
+
+        <!-- 关闭按钮 -->
+        <div class="close-btn" @click="closeOverlay">X</div>
+    </div>
+</template>
+
+<script>
+export default {
+    data() {
+        return {
+            isVisible: true, // 控制组件的显示与隐藏
+            showModel: false, // 是否显示倾斜数据输入框
+            showImagery: false, // 是否显示影像数据输入框
+            showTerrain: false, // 是否显示地形数据输入框
+            modelUrl: '', // 倾斜数据 URL
+            imageryUrl: '', // 影像数据 URL
+            terrainUrl: '', // 地形数据 URL
+        };
+    },
+    methods: {
+        // 显示倾斜数据输入框
+        showModelInput() {
+            this.showModel = true;
+            this.showImagery = false;
+            this.showTerrain = false;
+        },
+
+        // 显示影像数据输入框
+        showImageryInput() {
+            this.showImagery = true;
+            this.showModel = false;
+            this.showTerrain = false;
+        },
+
+        // 显示地形数据输入框
+        showTerrainInput() {
+            this.showTerrain = true;
+            this.showModel = false;
+            this.showImagery = false;
+        },
+
+        // 加载倾斜数据
+        loadModel() {
+            if (this.modelUrl) {
+                if (typeof Cesium === 'undefined') {
+                    console.error('Cesium is not loaded.');
+                    return;
+                }
+                const tileset = new Cesium.Cesium3DTileset({
+                    url: this.modelUrl,
+                });
+                viewer.scene.primitives.add(tileset);
+                viewer.flyTo(tileset);
+                this.showModel = false;
+            }
+        },
+
+        // 加载影像数据
+        loadImagery() {
+            if (this.imageryUrl) {
+                if (typeof Cesium === 'undefined') {
+                    console.error('Cesium is not loaded.');
+                    return;
+                }
+                const imageryProvider = new Cesium.UrlTemplateImageryProvider({
+                    url: this.imageryUrl,
+                });
+                viewer.imageryLayers.addImageryProvider(imageryProvider);
+                this.showImagery = false;
+            }
+        },
+
+        // 加载地形数据
+        loadTerrain() {
+            if (this.terrainUrl) {
+                if (typeof Cesium === 'undefined') {
+                    console.error('Cesium is not loaded.');
+                    return;
+                }
+                const terrainProvider = new Cesium.CesiumTerrainProvider({
+                    url: this.terrainUrl,
+                });
+                viewer.terrainProvider = terrainProvider;
+                this.showTerrain = false;
+            }
+        },
+
+        // 关闭组件
+        closeOverlay() {
+            this.isVisible = false;
+        },
+
+        // 重新打开并重置组件状态
+        openOverlay() {
+            this.isVisible = true;
+            this.resetComponent(); // 重置组件状态
+        },
+
+        // 重置组件状态
+        resetComponent() {
+            this.showModel = false;
+            this.showImagery = false;
+            this.showTerrain = false;
+            this.modelUrl = '';
+            this.imageryUrl = '';
+            this.terrainUrl = '';
+        }
+    }
+};
+</script>
+
+<style scoped>
+.cesium-overlay {
+    position: relative;
+    width: 100%;
+    height: 100%;
+}
+
+.background {
+    position: absolute;
+    top: 0;
+    left: 550px;
+    width: 100%;
+    height: 100%;
+    background-color: black;
+    opacity: 0.5;
+    height: 370px;
+    width: 500px;
+}
+
+/* 按钮样式 */
+.button1,
+.button2,
+.button3 {
+    position: absolute;
+    top: 40px;
+    z-index: 10;
+    height: 60px;
+    width: 150px;
+    margin: 5px;
+    text-align: center;
+    background-color: rgba(0, 0, 0, 0.52);
+    border: solid 1px rgba(255, 255, 255, 0.402);
+    cursor: pointer;
+    border-radius: 6px;
+    line-height: 60px;
+}
+
+.button1 {
+    left: 720px;
+}
+
+.button2 {
+    left: 550px;
+}
+
+.button3 {
+    left: 888px;
+}
+
+/* 输入框按钮 */
+.button4 {
+    color: white;
+    background-color: rgba(0, 0, 0, 0.52);
+    border: solid 1px rgba(255, 255, 255, 0.402);
+    top: 80px;
+    position: absolute;
+    z-index: 100000;
+    width: 100px;
+    height: 25px;
+    left: 100px;
+}
+
+/* 输入框样式 */
+.input-style {
+    background-color: black;
+    color: white;
+    border: 0.5px solid rgba(255, 255, 255, 0.402);
+    padding: 8px;
+    width: 300px;
+}
+
+.input-box {
+    position: absolute;
+    top: 150px;
+    left: 630px;
+    z-index: 10;
+    background-color: rgba(0, 0, 0, 0.52);
+    border: solid 1px rgba(255, 255, 255, 0.402);
+    padding: 10px;
+    border-radius: 5px;
+    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
+    height: 100px;
+}
+
+/* 关闭按钮样式 */
+.close-btn {
+    position: absolute;
+    top: 5px;
+    left: 1010px;
+    width: 30px;
+    /* 设置为正方形 */
+    height: 30px;
+    /* 设置为正方形 */
+    background-color: black;
+    /* 背景为黑色 */
+    color: white;
+    /* X为白色 */
+    border: 1px solid white;
+    /* 白色边框 */
+    font-size: 18px;
+    font-weight: bold;
+    text-align: center;
+    line-height: 30px;
+    /* 使X垂直居中 */
+    cursor: pointer;
+    border-radius: 4px;
+    /* 正方形的角稍微圆滑 */
+    z-index: 1001;
+}
+
+.close-btn:hover {
+    background-color: rgba(0, 166, 255, 0.2);
+    /* 鼠标悬停时的背景色 */
+}
+</style>

+ 6 - 6
src/components/echarts/bar.vue

@@ -48,7 +48,7 @@ export default {
                 title: {
                     text: '用地类型',
                     textStyle: {
-                        color: '#000000',
+                        color: '#FFFFFF',
                         fontWeight: 'bold',
                         fontSize: 18
                     }
@@ -57,19 +57,19 @@ export default {
                 legend: {
                     data: ['面积总和'],
                     textStyle: {
-                        color: '#000000',
+                        color: '#FFFFFF',
                     }
                 },
                 xAxis: {
                     data: this.xAxisData,
                     axisLabel: {
                         interval: 0,
-                        color: '#000000',
+                        color: '#FFFFFF',
                     }
                 },
                 yAxis: {
                     axisLabel: {
-                        color: '#000000',
+                        color: '#FFFFFF',
                     }
                 },
                 series: [
@@ -118,8 +118,8 @@ export default {
     width: 550px;
     position: absolute;
     bottom: 0px;
-    right: -2000px;
+    right: -1600px;
     z-index: 1000000;
-    background-color: rgba(240, 248, 255, 0.2);
+    background-color: rgba(0, 0, 0, 0.2);
 }
 </style>

+ 7 - 6
src/components/echarts/linechart.vue

@@ -28,20 +28,20 @@ export default {
                 title: {
                     text: '太原市水体区域面积变化',
                     textStyle: {
-                        color: '#000000', // 设置标题文字为黑色
+                        color: '#FFFFFF',
                     }
                 },
                 xAxis: {
                     type: 'category',
                     data: ['2014', '2017', '2021', '2023'],
                     axisLabel: {
-                        color: '#000000', // 设置 X 轴文字为黑色
+                        color: '#FFFFFF',
                     }
                 },
                 yAxis: {
                     type: 'value',
                     axisLabel: {
-                        color: '#000000', // 设置 Y 轴文字为黑色
+                        color: '#FFFFFF',
                     },
                     axisLine: {
                         lineStyle: {
@@ -88,9 +88,10 @@ export default {
     position: absolute;
     width: 550px;
     height: 280px;
-    top: 0px;
-    right: -2000px;
+    top: 100px;
+    right: -1600px;
     z-index: 20330;
-    background-color: rgba(240, 248, 255, 0.2);
+    background-color: rgba(0, 0, 0, 0.2);
+
 }
 </style>

+ 103 - 11
static/AppConfig.js

@@ -1,4 +1,4 @@
-const geoserverurl = 'http://localhost:8090/geoserver/TianZhen/wms?'
+const geoserverurl = 'http://localhost:8090/geoserver/UninphoServer/wms?'
 const geoserverwmtsurl = 'http://localhost:8090/geoserver/TianZhen/wmts?'
 
 // 系统总配置
@@ -19,20 +19,48 @@ window.AppConfig = {
   layersConfig: [
     {
       type: 'group',
-      name: '基础影像',
-      label: '基础影像',
-      tag: '',
-      show: false,
+      name: '新增发布数据',
+      label: "新增发布数据",
       children: [
         {
-          type: 'urltemplate',
-          name: '全国影像',
-          label: '全国影像',
+          type: "urltemplate",
+          name: "天镇县城3cm影像",
+          label: "天镇县城3cm影像",
           show: false,
           parms: {
-            url: 'http://localhost:9016/dataServer/part1/DATA/ChinaImage/{z}/{x}/{y}.jpg'
+            url: "http://localhost:8002/chinaImage/chinaImage/{z}/{x}/{y}.jpg",
           }
         },
+        {
+          type: "3dTiles",
+          name: "倾斜数据",
+          label: "倾斜数据",
+          show: true,
+          parms: {
+            url: "http://localhost:8002/building/tileset.json",
+          }
+        }
+
+      ]
+    },
+
+
+    {
+      type: 'group',
+      name: '基础影像',
+      label: '基础影像',
+      tag: '',
+      show: false,
+      children: [
+        // {
+        //   type: 'urltemplate',
+        //   name: '全国影像',
+        //   label: '全国影像',
+        //   show: false,
+        //   parms: {
+        //     url: 'http://localhost:9016/dataServer/part1/DATA/ChinaImage/{z}/{x}/{y}.jpg'
+        //   }
+        // },
         {
           type: 'arcgis',
           name: '天镇影像',
@@ -41,7 +69,66 @@ window.AppConfig = {
           parms: {
             url: 'https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer'
           }
-        }
+        },
+        // {
+        //   type: 'wms',
+        //   name: '全国影像',
+        //   label: '全国影像',
+        //   show: false,
+        //   parms: {
+        //     url: 'http://localhost:8002/chinaImage/chinaImage/{z}/{x}/{y}.jpg'
+        //   }
+        // },
+        {
+          type: "urltemplate",
+          name: "天镇县城3cm影像",
+          label: "天镇县城3cm影像",
+          show: false,
+          parms: {
+            url: "http://localhost:8002/chinaImage/chinaImage/{z}/{x}/{y}.jpg",
+          }
+        },
+        {
+          type: "wms",
+          name: "汾河影像",
+          label: "汾河影像",
+          show: false,
+          parms: {
+            url: geoserverurl,
+            layers: "UninphoServer:84",
+            minimumLevel: 0,
+            maximumLevel: 18,
+            parameters: {
+              transparent: true,
+              format: "image/png"
+            }
+          }
+        },
+      ]
+    },
+    {
+      type: "group",
+      name: "用地图层",
+      label: "用地图层",
+      children: [
+        {
+          type: "wms",
+          name: "用地数据",
+          label: "用地数据",
+          show: false,
+          parms: {
+            url: geoserverurl,
+            layers: "UninphoServer:84",
+            minimumLevel: 0,
+            maximumLevel: 18,
+            parameters: {
+              transparent: true,
+              format: "image/png"
+            },
+          },
+          searchImageUrl: "http://localhost:8090/geoserver/UninphoServer/wms?", //geoserver路径
+          geolayer: "UninphoServer:84" //查询图层名
+        },
       ]
     },
     {
@@ -520,7 +607,12 @@ window.AppConfig = {
       name: '山西全省dem',
       show: false,
       url: 'http://data.mars3d.cn/terrain'
-    }
+    },
+    {
+      name: "天镇地形数据",
+      show: false,
+      url: "http://localhost:8002/dem/dem_shanxixioakuai/",
+    },
   ],
   tableNamesOptions: [
     {

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません