Răsfoiți Sursa

中图20241016代码合并

lkk 11 luni în urmă
părinte
comite
73db63f4f8

+ 4 - 1
src/components/Combinations/NightscapeAnalysis/index.js

@@ -417,12 +417,15 @@ const Nightscape = {
 
       // //模型图层泛光
       var layerP = scene.layers.find(window.NightLightUrl.ghmx);
+      if (layerP) {
+        layerP.hasLight = true;
+      }
       // layerP.bloomEffect.enable =true
       // layerP.bloomEffect.speed =3
       // layerP.bloomEffect.period =5
       // layerP.bloomEffect.maxBloomHeight =8
       // layerP.partlyTransparent =true
-      layerP.hasLight = true;
+
       // layerP.bloomEffect.enable = true;
       // // layerP.bloomEffect.maxBloomHeight=50
       // layerP.bloomEffect.period=2;

Fișier diff suprimat deoarece este prea mare
+ 0 - 0
src/views/ConstructionApplication3D/BenchmarkLandPriceAnalysis/BenchmarkLandPrice.js


+ 12 - 9
src/views/ConstructionApplication3D/BenchmarkLandPriceAnalysis/BenchmarkLandPrice.vue

@@ -298,23 +298,26 @@ export default {
       );
       handlerPolygon.activate();
       handlerPolygon.activeEvt.addEventListener(function (isActive) {
-        if (isActive == true) {
-          // viewer.enableCursorStyle = false;
-          // viewer._element.style.cursor = "";
-          document.body.classList.add("drawCur");
-        } else {
-          // viewer.enableCursorStyle = true;
-          document.body.classList.remove("drawCur");
-        }
+        debugger
+        // if (isActive == true) {
+        //   // viewer.enableCursorStyle = false;
+        //   // viewer._element.style.cursor = "";
+        //   document.body.classList.add("drawCur");
+        // } else {
+        //   // viewer.enableCursorStyle = true;
+          // document.body.classList.remove("drawCur");
+          that.tooltip.setVisible(false);
+        // }
       });
       handlerPolygon.movingEvt.addEventListener((windowPosition) => {
+        
         that.tooltip.showAt(
           windowPosition,
           "<p>点击鼠标左键开始绘制分析区域</p>"
         );
       });
       handlerPolygon.drawEvt.addEventListener((result) => {
-
+        debugger
         handlerPolygon.polygon.show = true;
         handlerPolygon.polyline.show = false;
         debugger

+ 54 - 10
src/views/ConstructionApplication3D/NightscapeAnalysis/NightscapeAnalysis.vue

@@ -249,6 +249,9 @@ export default {
     },
     //获取模型灯光数据
     async getModelLightData() {
+      this.gyTableData.forEach((element) => {
+        scene.removeLightSource(element.LightSource);
+      });
       let rData = await listZtLightList({
         isModelAssociated: true,
         modelId: this.info.id,
@@ -282,13 +285,33 @@ export default {
     },
 
     async onSubmit(formName) {
-      if (!this.dgyform.location || !this.dgyform.location.x) {
+      debugger;
+      if (this.dgyform.location == null) {
         this.$message({
           message: "请点击添加光源位置按钮添加光源",
           type: "warning",
         });
         return;
+      } else {
+        if (this.dgyform.location instanceof Array) {
+          if (this.dgyform.location.length != 2) {
+            this.$message({
+              message: "请点击添加光源位置按钮添加光源",
+              type: "warning",
+            });
+            return;
+          }
+        } else if (this.dgyform.location instanceof Object) {
+          if (this.dgyform.location.x == null) {
+            this.$message({
+              message: "请点击添加光源位置按钮添加光源",
+              type: "warning",
+            });
+            return;
+          }
+        }
       }
+
       this.$refs[formName].validate(async (valid) => {
         if (valid) {
           //更新
@@ -359,8 +382,9 @@ export default {
     //删除添加的光源
     async dgyremove() {
       let that = this;
-      await delZtLightList(that.currentRow.id);
       scene.removeLightSource(that.currentRow.LightSource);
+      await delZtLightList(that.currentRow.id);
+
       that.resetForm();
       //更新列表及光源
       that.getModelLightData();
@@ -374,6 +398,25 @@ export default {
 
       if (row) {
         let data = JSON.parse(JSON.stringify(row));
+        debugger;
+        if (data.location instanceof Array) {
+          viewer.camera.flyTo({
+            destination: Cesium.Cartesian3.fromDegrees(
+              data.location[0].x,
+              data.location[0].y,
+              data.location[0].z + 400
+            ),
+          });
+        } else if (data.location instanceof Object) {
+          viewer.camera.flyTo({
+            destination: Cesium.Cartesian3.fromDegrees(
+              data.location.x,
+              data.location.y,
+              data.location.z + 400
+            ),
+          });
+        }
+
         this.dgyform = data;
         this.dgyform.LightSource = row.LightSource;
       }
@@ -418,14 +461,15 @@ export default {
       pointLightSourceDrawHandler.activeEvt.addEventListener(function (
         isActive
       ) {
-        if (isActive == true) {
-          viewer.enableCursorStyle = false;
-          viewer._element.style.cursor = "";
-          document.body.classList.add("drawCur");
-        } else {
-          viewer.enableCursorStyle = true;
-          document.body.classList.remove("drawCur");
-        }
+        that.tooltip.setVisible(false);
+        // if (isActive == true) {
+        //   viewer.enableCursorStyle = false;
+        //   viewer._element.style.cursor = "";
+        //   document.body.classList.add("drawCur");
+        // } else {
+        //   viewer.enableCursorStyle = true;
+        //   document.body.classList.remove("drawCur");
+        // }
       });
       pointLightSourceDrawHandler.movingEvt.addEventListener(
         (windowPosition) => {

+ 32 - 25
src/views/ConstructionApplication3D/SunlightAnalysis/SunlightAnalysis.vue

@@ -238,7 +238,7 @@ export default {
       tooltip: createTooltip(document.body),
       form: {
         timeInterval: 60,
-        spacing: 3,
+        spacing: 8,
         selDate: new Date(),
         startTime: 10,
         endTime: 14,
@@ -304,7 +304,9 @@ export default {
   computed: {},
   mounted() {
     this.multiViewportMode = scene.multiViewportMode + 1;
-
+    document.oncontextmenu = function (e) {
+      e.preventDefault();
+    };
     this.init();
   },
   methods: {
@@ -374,14 +376,15 @@ export default {
 
       handlerPolygon.activate();
       handlerPolygon.activeEvt.addEventListener(function (isActive) {
-        if (isActive == true) {
-          viewer.enableCursorStyle = false;
-          viewer._element.style.cursor = "";
-          document.body.classList.add("drawCur");
-        } else {
-          viewer.enableCursorStyle = true;
-          document.body.classList.remove("drawCur");
-        }
+        // if (isActive == true) {
+        //   viewer.enableCursorStyle = false;
+        //   viewer._element.style.cursor = "";
+        //   document.body.classList.add("drawCur");
+        // } else {
+        //   viewer.enableCursorStyle = true;
+        //   document.body.classList.remove("drawCur");
+        // }
+        that.tooltip.setVisible(false);
       });
       handlerPolygon.movingEvt.addEventListener((windowPosition) => {
         that.tooltip.showAt(
@@ -473,6 +476,7 @@ export default {
     },
     analysis() {
       let that = this;
+      debugger;
       that.clear();
       that.tableData = [];
       if (!handlerPolygon) {
@@ -485,14 +489,15 @@ export default {
 
       handlerPolygon.activate();
       handlerPolygon.activeEvt.addEventListener(function (isActive) {
-        if (isActive == true) {
-          // viewer.enableCursorStyle = false;
-          // viewer._element.style.cursor = "";
-          document.body.classList.add("drawCur");
-        } else {
-          // viewer.enableCursorStyle = true;
-          document.body.classList.remove("drawCur");
-        }
+        // if (isActive == true) {
+        //   // viewer.enableCursorStyle = false;
+        //   // viewer._element.style.cursor = "";
+        //   document.body.classList.add("drawCur");
+        // } else {
+        //   // viewer.enableCursorStyle = true;
+        //   document.body.classList.remove("drawCur");
+        // }
+        that.tooltip.setVisible(false);
       });
       handlerPolygon.movingEvt.addEventListener((windowPosition) => {
         that.tooltip.showAt(
@@ -511,6 +516,7 @@ export default {
           shadowQuery = new Cesium.ShadowQueryPoints(scene);
           shadowQuery.setVisibleInViewport(that.radio);
           shadowQuery.queryPointsEvent.addEventListener(function (e) {
+            console.log(new Date().getSeconds());
             that.tableData = [];
             that.loading = false;
             let sdsd = [];
@@ -529,10 +535,10 @@ export default {
               sd.properties.value = e_shadowRadio;
               sdsd.push(sd);
             }
-
+            console.log(new Date().getSeconds());
             let gsd = that.setIsoline(sdsd);
             // that.sdh = [];
-
+            console.log(new Date().getSeconds());
             for (
               let featuresindex = 0;
               featuresindex < gsd.features.length;
@@ -564,14 +570,13 @@ export default {
                 });
               }
             }
-
+            console.log(new Date().getSeconds());
             if (shadowQuery) {
               shadowQuery.destroy();
               shadowQuery = null;
             }
           });
         }
-
         let positions = that.positions;
         let points = that.points;
         var polygons = result.object;
@@ -634,11 +639,11 @@ export default {
         let polygonPs = polygon([trufpolygons]);
         let areaPs = area(polygonPs);
         if (areaPs <= 20000) {
-          that.form.spacing = 3;
+          that.form.spacing = 10;
         } else if (areaPs <= 60000) {
-          that.form.spacing = 5;
+          that.form.spacing = 10;
         } else if (areaPs <= 100000) {
-          that.form.spacing = 8;
+          that.form.spacing = 10;
         } else {
           that.form.spacing = 10;
         }
@@ -770,6 +775,7 @@ export default {
       if (handlerPolygon) {
         handlerPolygon.clear();
         handlerPolygon.deactivate();
+        handlerPolygon = null;
       }
       this.tooltip.setVisible(false);
       if (shadowQuery) {
@@ -1082,6 +1088,7 @@ export default {
     },
   },
   beforeDestroy() {
+    document.oncontextmenu = null;
     this.clear();
     this.clearmarkedPoints();
     if (shadowQuery) {

+ 11 - 4
src/views/ConstructionApplication3D/ZBFXAnalysisinfo/ZBFXAnalysisinfo.vue

@@ -33,17 +33,17 @@
                 >
                   <el-table-column label="指标" align="center">
                     <template #default="{ row }">
-                      {{ row.zbmc }}
+                      {{ quNaN(row.zbmc) }}
                     </template>
                   </el-table-column>
                   <el-table-column label="计算书指标" align="center">
                     <template #default="{ row }">
-                      {{ row.tjfazb }}
+                      {{ quNaN(row.tjfazb) }}
                     </template>
                   </el-table-column>
                   <el-table-column label="自动核算指标" align="center">
                     <template #default="{ row }">
-                      {{ row.fazbyg }}
+                      {{ quNaN(row.fazbyg) }}
                     </template>
                   </el-table-column>
                   <el-table-column
@@ -61,7 +61,7 @@
                   </el-table-column>
                   <el-table-column label="控规要求" align="center">
                     <template #default="{ row }">
-                      {{ row.kgyq }}
+                      {{ quNaN(row.kgyq) }}
                     </template>
                   </el-table-column>
                   <el-table-column label="结论" align="center">
@@ -126,6 +126,13 @@ export default {
     this.init();
   },
   methods: {
+    quNaN(value) {
+      if (value == "NaN") {
+        return "";
+      } else {
+        return value;
+      }
+    },
     validateNumber(value) {
       if (!value) {
         return "不能为空";

+ 9 - 8
src/views/ConstructionApplication3D/billboard/addBillboardPoject.vue

@@ -374,14 +374,15 @@ export default {
       );
       this.handlerPolygon.activate();
       this.handlerPolygon.activeEvt.addEventListener(function (isActive) {
-        if (isActive == true) {
-          viewer.enableCursorStyle = false;
-          viewer._element.style.cursor = "";
-          document.body.classList.add("drawCur");
-        } else {
-          viewer.enableCursorStyle = true;
-          document.body.classList.remove("drawCur");
-        }
+        // if (isActive == true) {
+        //   viewer.enableCursorStyle = false;
+        //   viewer._element.style.cursor = "";
+        //   document.body.classList.add("drawCur");
+        // } else {
+        //   viewer.enableCursorStyle = true;
+        //   document.body.classList.remove("drawCur");
+        // }
+        that.tooltip.setVisible(false);
       });
       this.handlerPolygon.movingEvt.addEventListener((windowPosition) => {
         that.tooltip.showAt(

+ 1 - 0
src/views/ConstructionApplication3D/projectManagement/projectManagement.vue

@@ -3364,6 +3364,7 @@ export default {
           this.$layer.full(that.layerid);
           //关闭事件
           this.DestroyAll();
+          this.WaitingSelectionModel = null;
         },
       });
     },

+ 5 - 0
src/views/ConstructionApplication3D/skylineAnalysis/skylineAnalysis.vue

@@ -279,6 +279,11 @@ export default {
         viewer.entities.removeById(this.polylineId)
         this.polylineId = null
       }
+      if (drawHandler) {
+        drawHandler.polyline=null;
+        drawHandler.deactivate()
+        drawHandler = null;
+      }
     }
 
   }

Fișier diff suprimat deoarece este prea mare
+ 0 - 0
src/views/ConstructionApplication3D/skylineAnalysis/skylineExecute.js


Unele fișiere nu au fost afișate deoarece prea multe fișiere au fost modificate în acest diff