Răsfoiți Sursa

中图代码合并

lkk 10 luni în urmă
părinte
comite
9a2ee502de

+ 137 - 74
src/components/Combinations/NightscapeAnalysis/index.js

@@ -46,7 +46,9 @@ const Nightscape = {
       if (scene.layers.find("白天")) scene.layers.find("白天").visible = false;
       if (scene.layers.find("夜晚")) scene.layers.find("夜晚").visible = true;
       // 泛光线底纹
-      let roadLine1 = Cesium.GeoJsonDataSource.load(window.NightLightUrl.csfgx);
+      let roadLine1 = Cesium.GeoJsonDataSource.load(
+        window.NightLightUrl.csfgx.url
+      );
 
       roadLine1
         .then(function (dataSource) {
@@ -58,15 +60,22 @@ const Nightscape = {
             line.polyline.material = new Cesium.PolylineGlowMaterialProperty({
               //设置Glow材质
               glowPower: 0.005,
-              color: Cesium.Color.ORANGE.withAlpha(0.9),
+              color: new Cesium.Color(
+                window.NightLightUrl.csfgx.fgxColor.r,
+                window.NightLightUrl.csfgx.fgxColor.g,
+                window.NightLightUrl.csfgx.fgxColor.b,
+                window.NightLightUrl.csfgx.fgxColor.a
+              ),
             });
-            line.polyline.width = 50;
+            line.polyline.width = window.NightLightUrl.csfgx.fgxWidth;
           }
         })
         .otherwise(function (error) {
           window.alert(error);
         });
-      let roadLine2 = Cesium.GeoJsonDataSource.load(window.NightLightUrl.csfgx);
+      let roadLine2 = Cesium.GeoJsonDataSource.load(
+        window.NightLightUrl.csfgx.url
+      );
       //泛光亮线
       roadLine2
         .then(function (dataSource) {
@@ -78,9 +87,14 @@ const Nightscape = {
             line.polyline.material = new Cesium.PolylineGlowMaterialProperty({
               //设置Glow材质
               glowPower: 0.001,
-              color: Cesium.Color.white,
+              color: new Cesium.Color(
+                window.NightLightUrl.csfgx.fgdxColor.r,
+                window.NightLightUrl.csfgx.fgdxColor.g,
+                window.NightLightUrl.csfgx.fgdxColor.b,
+                window.NightLightUrl.csfgx.fgdxColor.a
+              ),
             });
-            line.polyline.width = 5;
+            line.polyline.width = window.NightLightUrl.csfgx.fgdxWidth;
           }
         })
         .otherwise(function (error) {
@@ -88,7 +102,7 @@ const Nightscape = {
         });
 
       //地标灯光
-      Cesium.loadJson(window.NightLightUrl.yshdg).then((response) => {
+      Cesium.loadJson(window.NightLightUrl.yshdg.url).then((response) => {
         let features = response.features;
         features.forEach((element) => {
           let p = element.geometry.coordinates;
@@ -103,10 +117,15 @@ const Nightscape = {
           //   p[2]
           // );
           var SpotLightOptions3 = {
-            cutoffDistance: 100,
-            color: new Cesium.Color(18 / 255, 80 / 255, 193 / 255, 1),
-            decay: 2,
-            intensity: 1,
+            cutoffDistance: window.NightLightUrl.yshdg.cutoffDistance,
+            color: new Cesium.Color(
+              window.NightLightUrl.yshdg.LightColor.r,
+              window.NightLightUrl.yshdg.LightColor.g,
+              window.NightLightUrl.yshdg.LightColor.b,
+              window.NightLightUrl.yshdg.LightColor.a
+            ),
+            decay: window.NightLightUrl.yshdg.decay,
+            intensity: window.NightLightUrl.yshdg.intensity,
           };
 
           let SpotLight33 = new Cesium.PointLight(
@@ -119,7 +138,7 @@ const Nightscape = {
       });
 
       // 体育场灯光
-      Cesium.loadJson(window.NightLightUrl.tycdg).then((response) => {
+      Cesium.loadJson(window.NightLightUrl.tycdg.url).then((response) => {
         let features = response.features;
         features.forEach((element, indx) => {
           let p = element.geometry.coordinates;
@@ -130,10 +149,15 @@ const Nightscape = {
           );
 
           var SpotLightOptions3 = {
-            cutoffDistance: 150,
-            color: new Cesium.Color(245 / 255, 250 / 255, 216 / 255, 0.51),
-            decay: 1,
-            intensity: 1,
+            cutoffDistance: window.NightLightUrl.tycdg.cutoffDistance,
+            color: new Cesium.Color(
+              window.NightLightUrl.tycdg.LightColor.r,
+              window.NightLightUrl.tycdg.LightColor.g,
+              window.NightLightUrl.tycdg.LightColor.b,
+              window.NightLightUrl.tycdg.LightColor.a
+            ),
+            decay: window.NightLightUrl.tycdg.decay,
+            intensity: window.NightLightUrl.tycdg.intensity,
           };
 
           let SpotLight33 = new Cesium.PointLight(
@@ -141,16 +165,24 @@ const Nightscape = {
             // SpotLightPos32,
             SpotLightOptions3
           );
-          that.tiyuchangdg.push(SpotLight33);
+          // that.tiyuchangdg.push(SpotLight33);
           scene.addLightSource(SpotLight33);
+
+          // if (indx < 11) {
+          //   that.tiyuchangdg1.push(SpotLight33);
+          // } else if (indx >= 11 && indx < 20) {
+          //   that.tiyuchangdg2.push(SpotLight33);
+          // } else {
+          //   that.tiyuchangdg3.push(SpotLight33);
+          // }
         });
-        let sd = that.splitArray(that.tiyuchangdg);
-        that.tiyuchangdg1 = sd[0];
-        that.tiyuchangdg2 = sd[1];
-        that.tiyuchangdg3 = sd[2];
+        // let sd = that.splitArray(that.tiyuchangdg);
+        // that.tiyuchangdg1 = sd[0];
+        // that.tiyuchangdg2 = sd[1];
+        // that.tiyuchangdg3 = sd[2];
       });
       // // 道路灯光
-      Cesium.loadJson(window.NightLightUrl.dldg).then((response) => {
+      Cesium.loadJson(window.NightLightUrl.dldg.url).then((response) => {
         let features = response.features;
         features.forEach((element) => {
           let p = element.geometry.coordinates;
@@ -160,10 +192,15 @@ const Nightscape = {
             p[2] + 40
           );
           var SpotLightOptions3 = {
-            cutoffDistance: 130,
-            color: new Cesium.Color(209 / 255, 209 / 255, 147 / 255, 0.5),
-            decay: 1,
-            intensity: 1,
+            cutoffDistance: window.NightLightUrl.dldg.cutoffDistance,
+            color: new Cesium.Color(
+              window.NightLightUrl.dldg.LightColor.r,
+              window.NightLightUrl.dldg.LightColor.g,
+              window.NightLightUrl.dldg.LightColor.b,
+              window.NightLightUrl.dldg.LightColor.a
+            ),
+            decay: window.NightLightUrl.dldg.decay,
+            intensity: window.NightLightUrl.dldg.intensity,
           };
 
           let SpotLight33 = new Cesium.PointLight(
@@ -175,7 +212,7 @@ const Nightscape = {
         });
       });
       // 草坪灯光
-      Cesium.loadJson(window.NightLightUrl.cpdg).then((response) => {
+      Cesium.loadJson(window.NightLightUrl.cpdg.url).then((response) => {
         let features = response.features;
         features.forEach((element) => {
           let p = element.geometry.coordinates;
@@ -186,10 +223,15 @@ const Nightscape = {
           );
 
           var SpotLightOptions3 = {
-            cutoffDistance: 90,
-            color: new Cesium.Color(209 / 255, 209 / 255, 147 / 255, 1),
-            decay: 1,
-            intensity: 1,
+            cutoffDistance: window.NightLightUrl.cpdg.cutoffDistance,
+            color: new Cesium.Color(
+              window.NightLightUrl.cpdg.LightColor.r,
+              window.NightLightUrl.cpdg.LightColor.g,
+              window.NightLightUrl.cpdg.LightColor.b,
+              window.NightLightUrl.cpdg.LightColor.a
+            ),
+            decay: window.NightLightUrl.cpdg.decay,
+            intensity: window.NightLightUrl.cpdg.intensity,
           };
 
           let SpotLight33 = new Cesium.PointLight(
@@ -212,49 +254,55 @@ const Nightscape = {
         })
       );
       this.imageLayer.alpha = 0.5;
+
       if (this.dgdsq) {
-        clearTimeout(dgdsq);
+        clearTimeout(this.dgdsq);
       }
       this.dgdsq = setInterval(function () {
-        that.tycindex += 1;
-
-        that.t += 0.2;
-        if (that.t > 1) {
-          that.t = 0;
-        }
-        let rgb = that.lerpColor("5,33,232", "232,222,5", that.t);
-        let isch = false;
-        if (that.tiyuchangdg1.length > that.tycindex) {
-          that.tiyuchangdg1[that.tycindex].color = new Cesium.Color(
-            rgb.r / 255,
-            rgb.g / 255,
-            rgb.b / 255,
-            0.51
+        //创建分层设色对象   设置最大/最小可见高度   颜色表  显示模式   透明度及线宽
+        var colorTable = new Cesium.ColorTable();
+        if (that.tycindex == 0) {
+          colorTable.insert(
+            65,
+            new Cesium.Color(255 / 255, 0 / 255, 234 / 255)
           );
-          isch = true;
-        }
-        if (that.tiyuchangdg2.length > that.tycindex) {
-          that.tiyuchangdg2[that.tycindex].color = new Cesium.Color(
-            rgb.r / 255,
-            rgb.g / 255,
-            rgb.b / 255,
-            0.51
+          colorTable.insert(30, new Cesium.Color(13 / 255, 255 / 255, 0 / 255));
+        } else if (that.tycindex == 1) {
+          colorTable.insert(
+            65,
+            new Cesium.Color(255 / 255, 255 / 255, 0 / 255)
           );
-          isch = true;
-        }
-        if (that.tiyuchangdg3.length > that.tycindex) {
-          that.tiyuchangdg3[that.tycindex].color = new Cesium.Color(
-            rgb.r / 255,
-            rgb.g / 255,
-            rgb.b / 255,
-            0.51
+          colorTable.insert(
+            30,
+            new Cesium.Color(0 / 255, 232 / 255, 255 / 255)
+          );
+        } else {
+          colorTable.insert(65, new Cesium.Color(23 / 255, 0 / 255, 255 / 255));
+          colorTable.insert(
+            30,
+            new Cesium.Color(155 / 255, 0 / 255, 255 / 255)
           );
-          isch = true;
         }
-        if (!isch) {
+        var layer = scene.layers.find("TYCB@BaoPo0621N");
+        var hyp = new Cesium.HypsometricSetting();
+        hyp.MaxVisibleValue = 65;
+        hyp.MinVisibleValue = 30;
+        hyp.ColorTable = colorTable;
+        hyp.DisplayMode = Cesium.HypsometricSettingEnum.DisplayMode.FACE;
+        hyp.Opacity = 0.5;
+        hyp.LineInterval = 1.0;
+        //设置图层分层设色属性
+        layer.hypsometricSetting = {
+          hypsometricSetting: hyp,
+          // CoverageArea: ps,
+          analysisMode:
+            Cesium.HypsometricSettingEnum.AnalysisRegionMode.ARM_ALL,
+        };
+        that.tycindex += 1;
+        if (that.tycindex >= 3) {
           that.tycindex = 0;
         }
-      }, 1000 * 1);
+      }, 1000 * 2);
     }
   },
 
@@ -523,7 +571,7 @@ const Nightscape = {
    */
   loadldx() {
     let that = this;
-    Cesium.loadJson(window.NightLightUrl.dlzxx).then((jsonData) => {
+    Cesium.loadJson(window.NightLightUrl.dlzxx.url).then((jsonData) => {
       debugger;
       jsonData.features.forEach((route) => {
         let list = route.geometry.coordinates.flat(Infinity);
@@ -532,8 +580,13 @@ const Nightscape = {
           // 用于打底的线
           polyline: {
             positions: Cesium.Cartesian3.fromDegreesArrayHeights(list),
-            width: 5, // 线的宽度,像素为单位
-            material: Cesium.Color.BLACK.withAlpha(0.3),
+            width: window.NightLightUrl.dlzxx.lddxWidth, // 线的宽度,像素为单位
+            material: new Cesium.Color(
+              window.NightLightUrl.dlzxx.lddxColor.r,
+              window.NightLightUrl.dlzxx.lddxColor.g,
+              window.NightLightUrl.dlzxx.lddxColor.b,
+              window.NightLightUrl.dlzxx.lddxColor.a
+            ),
           },
         });
         this.liudongGntities.push(dl);
@@ -541,13 +594,23 @@ const Nightscape = {
           id: route.properties.OBJECTID,
           polyline: {
             positions: Cesium.Cartesian3.fromDegreesArrayHeights(list),
-            width: 4.0,
+            width: window.NightLightUrl.dlzxx.ldxWidth,
             material: new Cesium.PolylineTrailMaterialProperty({
-              outlineColor: Cesium.Color.WHITE,
-              outlineWidth: 3,
-              color: Cesium.Color.fromCssColorString("rgba(127, 255, 0, 1)"),
-              trailLength: 0.3,
-              period: 4.0,
+              outlineColor: new Cesium.Color(
+                window.NightLightUrl.dlzxx.ldxOutlineColor.r,
+                window.NightLightUrl.dlzxx.ldxOutlineColor.g,
+                window.NightLightUrl.dlzxx.ldxOutlineColor.b,
+                window.NightLightUrl.dlzxx.ldxOutlineColor.a
+              ),
+              outlineWidth: window.NightLightUrl.dlzxx.ldxOutlineWidth,
+              color: new Cesium.Color(
+                window.NightLightUrl.dlzxx.ldxColor.r,
+                window.NightLightUrl.dlzxx.ldxColor.g,
+                window.NightLightUrl.dlzxx.ldxColor.b,
+                window.NightLightUrl.dlzxx.ldxColor.a
+              ),
+              trailLength: window.NightLightUrl.dlzxx.trailLength,
+              period: window.NightLightUrl.dlzxx.period,
             }),
           },
         });

+ 55 - 210
src/views/ConstructionApplication3D/BenchmarkLandPriceAnalysis/jzdjfxsmjg.vue

@@ -171,6 +171,7 @@
 import { v4 as uuidv4 } from "uuid";
 import moment from "moment";
 import elementResizeDetectorMaker from "element-resize-detector";
+import PlanningPlotInfo from "@/views/ConstructionApplication3D/PlanningPlot/PlanningPlotInfo.vue";
 import {
   cartesian3ToWGS84,
   mapQuery,
@@ -189,6 +190,8 @@ import {
 export default {
   data() {
     return {
+      //点查entities事件
+      getEntitiesHandler: null,
       tooltip: createTooltip(document.body),
       zt_jzdj_LandUse: window.dict.zt_jzdj_LandUse,
       jzdj_LandUse: "商服用地",
@@ -245,6 +248,7 @@ export default {
   },
   methods: {
     async init() {
+      this.initEntitiesHandler();
       debugger;
       this.DrawScope();
       await this.CalculateAnalysisArea();
@@ -645,220 +649,56 @@ export default {
       }
     },
 
-    /**
-     * 查询区域内规划地块
-     */
-    async getGHDK() {
+    initEntitiesHandler() {
+      debugger;
       let that = this;
-      //查询规划地块
-      let layer = flatten(window.layerTree).find(
-        (item) => item.core == "003006"
+      this.getEntitiesHandler = new Cesium.ScreenSpaceEventHandler(
+        scene.canvas
       );
-      let points = this.info.BenchmarkLandPrice.ProjectScope;
-      let geo = {
-        id: 0,
-        style: null,
-        parts: [points.length],
-        points: points,
-        type: "REGION",
-        prjCoordSys: {
-          epsgCode: null,
+      this.getEntitiesHandler.setInputAction(function (click) {
+        debugger;
+        let pick = viewer.scene.pick(click.position);
+        let id, info;
+        //集体所有权信息弹窗
+        if (pick && pick.id.id && pick.id.id.indexOf("JTTD") !== -1) {
+          id = pick.id.id.split("JTTD-")[1];
+          info = that.LayerData.JTData.find((c) => c.id == id);
+          that.openOBJInfo("集体所有权详情", info.data);
+        }
+        //国有所有权信息弹窗
+        if (pick && pick.id.id && pick.id.id.indexOf("GYTD-") !== -1) {
+          id = pick.id.id.split("GYTD-")[1];
+          info = that.LayerData.GYData.find((c) => c.id == id);
+          that.openOBJInfo("国有所有权详情", info.data);
+        }
+      }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
+    },
+    //打开用地红线信息弹窗
+    openOBJInfo(title, info) {
+      let w = document.body.offsetWidth;
+      let h = document.body.offsetHeight;
+      //左上角(left=弹窗宽/2;top=弹窗高/2+header高)
+      //右上角 (left=w-弹窗宽+(弹窗宽/2);top=弹窗高/2+header高);
+      let left = 430 / 2 + 556;
+      let top = 430 / 2 + 60;
+      this.$layer.iframe({
+        id: "OBJInfolayer",
+        content: {
+          content: PlanningPlotInfo, //传递的组件对象
+          parent: this, //当前的vue对象
+          data: { info }, //props
         },
-      };
-      let queryByGeometryParameters = {
-        getFeatureMode: "SQL",
-        datasetNames: [
-          layer.date_server.dataSourceName +
-            ":" +
-            layer.date_server.datasetName,
-        ],
-        // geometry: geo,
-        // spatialQueryMode: "INTERSECT",
-        queryParameter: {
-          attributeFilter: "DKBM = '" + bm.value + "'",
+        offset: [left, top], //left top
+        area: ["430px", "430px"], //宽 高
+        title: title,
+        maxmin: false,
+        shade: false, //是否显示遮罩
+        shadeClose: false, //点击遮罩是否关闭
+        cancel: () => {
+          //关闭事件
+          // alert("关闭iframe");
         },
-        hasGeometry: "true",
-      };
-      let e = await mapQuery(
-        layer.date_server.url + "/featureResults.json?returnContent=true",
-        queryByGeometryParameters
-      );
-      if (e && e.totalCount > 0) {
-        e.features.forEach((feature) => {
-          let featureData = {
-            id: uuidv4(),
-            layerInfo: layer,
-            data: [],
-            geometry: feature.geometry,
-          };
-
-          feature.fieldNames.forEach((fieldName, i) => {
-            let Field = e.datasetInfos
-              ? e.datasetInfos[0].fieldInfos.find(
-                  (c) =>
-                    c.name &&
-                    c.name.toUpperCase() == fieldName.toUpperCase() &&
-                    c.name.toUpperCase().indexOf("SM") == -1
-                )
-              : null;
-            if (Field) {
-              featureData.data.push({
-                label: fieldName,
-                labelCN: Field ? Field.caption : fieldName,
-                value: e.features[0].fieldValues[i],
-              });
-            }
-          });
-
-          let point3ds = [];
-          let pointholes = [];
-          let startindex = 0;
-          for (
-            let index = 0;
-            index < featureData.geometry.parts.length;
-            index++
-          ) {
-            let thisps = [];
-            const endindex = startindex + featureData.geometry.parts[index];
-            let geometryPoints = featureData.geometry.points.slice(
-              startindex,
-              endindex
-            );
-            for (
-              let pointindex = 0;
-              pointindex < geometryPoints.length;
-              pointindex++
-            ) {
-              const point = geometryPoints[pointindex];
-              thisps.push(point.x);
-              thisps.push(point.y);
-            }
-            if (featureData.geometry.partTopo[index] === 1) {
-              point3ds.push(Cesium.Cartesian3.fromDegreesArray(thisps));
-            } else {
-              pointholes.push(Cesium.Cartesian3.fromDegreesArray(thisps));
-            }
-
-            startindex = endindex;
-          }
-
-          if (point3ds.length > 0 && pointholes.length > 0) {
-            let holes = [];
-            pointholes.forEach((hole) => {
-              holes.push({ positions: hole });
-            });
-
-            var orangePolygon1 = viewer.entities.add({
-              id: "GHDK-" + featureData.id,
-              polygon: {
-                hierarchy: {
-                  // Cesium.PolygonHierarchy
-                  positions: point3ds[0],
-                  holes: holes, // Cesium.PolygonHierarchy 数组
-                },
-                material: Cesium.Color.RED.withAlpha(0.4),
-                outline: true,
-                outlineColor: Cesium.Color.BLACK,
-                outlineWidth: 2.0,
-              },
-            });
-          } else if (point3ds.length > 0) {
-            var orangePolygon1 = viewer.entities.add({
-              id: "GHDK-" + featureData.id,
-              polygon: {
-                hierarchy: point3ds[0],
-                material: Cesium.Color.RED.withAlpha(0.4),
-                outline: true,
-                outlineColor: Cesium.Color.BLACK,
-                outlineWidth: 2.0,
-              },
-            });
-          }
-
-          that.LayerData.GHDKData.push(featureData);
-        });
-      }
-    },
-
-    /**
-     * 查询区域内基准地价
-     */
-    async getJZDJ() {
-      let that = this;
-      //查询基准地价
-      let layers = flatten(window.layerTree).find((item) => item.core == "006");
-      if (layers && layers.children) {
-        for (let index = 0; index < layers.children.length; index++) {
-          const layer = layers.children[index];
-          let points = this.info.BenchmarkLandPrice.ProjectScope;
-          let geo = {
-            id: 0,
-            style: null,
-            parts: [points.length],
-            points: points,
-            type: "REGION",
-            prjCoordSys: {
-              epsgCode: null,
-            },
-          };
-          let queryByGeometryParameters = {
-            getFeatureMode: "SPATIAL",
-            datasetNames: [
-              layer.date_server.dataSourceName +
-                ":" +
-                layer.date_server.datasetName,
-            ],
-            geometry: geo,
-            spatialQueryMode: "INTERSECT",
-            hasGeometry: "true",
-          };
-          let e = await mapQuery(
-            layer.date_server.url + "/featureResults.json?returnContent=true",
-            queryByGeometryParameters
-          );
-          if (e && e.totalCount > 0) {
-            e.features.forEach((feature) => {
-              let featureData = {
-                id: uuidv4(),
-                layerInfo: layer,
-                data: [],
-                geometry: feature.geometry,
-              };
-
-              feature.fieldNames.forEach((fieldName, i) => {
-                let Field = e.datasetInfos
-                  ? e.datasetInfos[0].fieldInfos.find(
-                      (c) =>
-                        c.name &&
-                        c.name.toUpperCase() == fieldName.toUpperCase() &&
-                        c.name.toUpperCase().indexOf("SM") == -1
-                    )
-                  : null;
-                if (Field) {
-                  featureData.data.push({
-                    label: fieldName,
-                    labelCN: Field ? Field.caption : fieldName,
-                    value: e.features[0].fieldValues[i],
-                  });
-                }
-              });
-
-              let ps = [];
-              for (
-                let index = 0;
-                index < featureData.geometry.points.length;
-                index++
-              ) {
-                const element = featureData.geometry.points[index];
-                ps.push(element.x);
-                ps.push(element.y);
-              }
-
-              that.LayerData.JZDJData.push(featureData);
-            });
-          }
-        }
-      }
+      });
     },
 
     /**
@@ -1147,6 +987,11 @@ export default {
     },
   },
   beforeDestroy() {
+    if (this.getEntitiesHandler) {
+      this.getEntitiesHandler.removeInputAction(
+        Cesium.ScreenSpaceEventType.LEFT_CLICK
+      );
+    }
     this.clear();
   },
 };

+ 2 - 2
src/views/ConstructionApplication3D/Demolition/CQSetInfo.vue

@@ -55,7 +55,7 @@
             <el-button type="primary" @click="saveAs()">另存为</el-button>
             <el-button type="primary" @click="reset()">重置</el-button>
         </el-row>
-        <el-dialog title="标准名称设置" modal="false" :visible.sync="dialogFormVisible" modal-append-to-body>
+        <el-dialog title="标准名称设置" :modal="false" :visible.sync="dialogFormVisible" modal-append-to-body>
             <el-form :model="ruleForm" :rules="rules" ref="ruleForm">
                 <el-form-item label="名称" prop="name">
                     <el-input v-model="ruleForm.name" autocomplete="off"></el-input>
@@ -67,7 +67,7 @@
             </div>
         </el-dialog>
 
-        <el-dialog title="编辑" modal="false" :visible.sync="editFormVisible" modal-append-to-body>
+        <el-dialog title="编辑" :modal="false" :visible.sync="editFormVisible" modal-append-to-body>
             <el-form :model="oldRow" :rules="rules" ref="oldRow">
                 <el-form-item label="房屋结构" prop="JG">
                     <el-select v-model="oldRow.JG">

+ 138 - 94
src/views/ConstructionApplication3D/Demolition/CQShowInfo.vue

@@ -43,15 +43,12 @@
                     <div v-show="!scope.row.seen">{{ scope.row.DES }}</div>
                 </template>
             </el-table-column>
-            <!-- <el-table-column fixed="right" label="操作" width="100">
+            <el-table-column fixed="right" label="操作" width="100">
                 <template slot-scope="scope">
-                    <el-button v-show="!scope.row.seen" @click="handleClick(scope.row)" type="text"
-                        size="small">编辑</el-button>
-                    <el-button v-show="scope.row.seen" @click="saveHandleClick(scope.row)" type="text"
-                        size="small">保存</el-button>
+                    <el-button @click="handleClick(scope.row)" type="text" size="small">编辑</el-button>
                     <el-button type="text" size="small">删除</el-button>
                 </template>
-            </el-table-column> -->
+            </el-table-column>
         </el-table>
         <!-- <el-row justify="center" type="flex">
             <el-button type="primary" @click="save()">保存</el-button>
@@ -69,6 +66,34 @@
                 <el-button type="primary" @click="submitForm('ruleForm')">确 定</el-button>
             </div>
         </el-dialog>
+
+        <el-dialog title="编辑" modal="false" :visible.sync="editFormVisible" modal-append-to-body>
+            <el-form :model="oldRow" :rules="rules" ref="oldRow">
+                <el-form-item label="房屋结构" prop="JG">
+                    <el-select v-model="oldRow.JG">
+                        <el-option label="框架结构" value="框架结构"></el-option>
+                        <el-option label="混合结构" value="混合结构"></el-option>
+                        <el-option label="砖木结构" value="砖木结构"></el-option>
+                        <el-option label="简易结构" value="简易结构"></el-option>
+                        <el-option label="凉棚" value="凉棚"></el-option>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="房屋等级" prop="GRADE">
+                    <el-input v-model="oldRow.GRADE" type="number" min="1" max="5" autocomplete="off"></el-input>
+                </el-form-item>
+                <el-form-item label="单价(元/平方米)" prop="BZ">
+                    <el-input type="number" min="0" max="100000000" v-model="oldRow.BZ"
+                        autocomplete="off"></el-input>
+                </el-form-item>
+                <el-form-item label="规格" prop="DES">
+                    <el-input type="textarea" :rows="4" v-model="oldRow.DES" autocomplete="off"></el-input>
+                </el-form-item>
+            </el-form>
+            <div slot="footer" class="dialog-footer">
+                <el-button @click="editFormVisible = false">取消</el-button>
+                <el-button type="primary" @click="submitEditForm('rowForm')">确 定</el-button>
+            </div>
+        </el-dialog>
     </div>
 </template>
 <script>
@@ -77,6 +102,7 @@ export default {
     name: 'ZDShowInfo',
     data() {
         return {
+            editFormVisible: false,
             dialogFormVisible: false,
             ruleForm: {
                 name: null,
@@ -88,6 +114,30 @@ export default {
                     // { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
                 ]
             },
+            // rowForm: {
+            //     JG: "框架结构",
+            //     GRADE: 1,
+            //     BZ: 1350,
+            //     DES: ''
+            // },
+            rowRules: {
+                JG: [
+                    { required: true, message: '请选择结构', trigger: 'blur' },
+                    // { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
+                ],
+                GRADE: [
+                    { required: true, message: '请选择等级', trigger: 'blur' },
+                    // { min: 1, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
+                ],
+                BZ: [
+                    { required: true, message: '请输入名称', trigger: 'blur' },
+                    // { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
+                ],
+                DES: [
+                    { required: true, message: '请输入规划', trigger: 'blur' },
+                    // { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
+                ]
+            },
             /**
              * 补偿标准绑定值
              */
@@ -213,9 +263,9 @@ export default {
          * 初始化
          */
         initForm() {
-            
+
             debugger
-           console.log(this.cqValue)
+            console.log(this.cqValue)
             if (this.cqValue && this.cqValue != "") {
                 this.bcbz = this.cqValue
                 var item = this.bcbzList.find(t => t.value == this.bcbz)
@@ -241,96 +291,90 @@ export default {
             var item = this.bcbzList.find(t => t.value == this.bcbz)
             debugger
             this.curBCBZ = item
-        }
-    },
-    /**
-     * 保存修改
-     */
-    save() {
-        if (this.bcbz == "") {
-            this.$layer.alert("请选择补偿标准");
-            return;
-        }
-        debugger
-        var index = window.ZSBC.CQBCList.findIndex(t => t.value == this.bcbz)
-        if (index > -1) {
-            window.ZSBC.CQBCList[index] = this.curBCBZ
-            this.$layer.alert("保存完成");
-        }
-    },
-    /***
-     * 另存为
-     */
-    saveAs() {
-        // if (this.bcbz == "") {
-        //     this.$layer.alert("请选择补偿标准");
-        //     return
-        // }
-        this.dialogFormVisible = true;
-    },
-    submitForm(formName) {
-        this.$refs[formName].validate((valid) => {
-            if (valid) {
-                // alert('submit!');
-                this.dialogFormVisible = false
-                this.saveData()
-                // this.$layer.alert("保存完成");
-            } else {
-                console.log('error submit!!');
-                return false;
+        },
+
+        /**
+         * 保存修改
+         */
+        save() {
+            if (this.bcbz == "") {
+                this.$layer.alert("请选择补偿标准");
+                return;
             }
-        });
-    },
-    /**
-     * 另存数据
-     */
-    saveData() {
-        debugger
-        var val = (window.ZSBC.CQBCList.length + 1).toString()
-        var newBCBZ = {
+            debugger
+            var index = window.ZSBC.CQBCList.findIndex(t => t.value == this.bcbz)
+            if (index > -1) {
+                window.ZSBC.CQBCList[index] = this.curBCBZ
+                this.$layer.alert("保存完成");
+            }
+        },
+        /***
+         * 另存为
+         */
+        saveAs() {
+            // if (this.bcbz == "") {
+            //     this.$layer.alert("请选择补偿标准");
+            //     return
+            // }
+            this.dialogFormVisible = true;
+        },
+        submitForm(formName) {
+            this.$refs[formName].validate((valid) => {
+                if (valid) {
+                    // alert('submit!');
+                    this.dialogFormVisible = false
+                    this.saveData()
+                    // this.$layer.alert("保存完成");
+                } else {
+                    console.log('error submit!!');
+                    return false;
+                }
+            });
+        },
+        /**
+         * 另存数据
+         */
+        saveData() {
+            debugger
+            var val = (window.ZSBC.CQBCList.length + 1).toString()
+            var newBCBZ = {
 
-            label: this.ruleForm.name,
-            value: val,
-            BCBZ: this.curBCBZ.BCBZ
-        }
-        window.ZSBC.CQBCList.push(newBCBZ)
-        this.bcbzList = window.ZSBC.CQBCList;
-        this.bcbz = val
-    },
-    /**
-     * 编辑按钮
-     */
-    handleClick(row) {
-        row.seen = true
-    },
-    /**
-     * 开启行编辑
-     * @param {object} row 
-     */
-    handleSetFoucsSetData(row) {
-        this.oldRow = row
+                label: this.ruleForm.name,
+                value: val,
+                BCBZ: this.curBCBZ.BCBZ
+            }
+            window.ZSBC.CQBCList.push(newBCBZ)
+            this.bcbzList = window.ZSBC.CQBCList;
+            this.bcbz = val
+        },
+        /**
+         * 编辑按钮
+         */
+        handleClick(row) {
+          this.oldRow=row;
+          this.editFormVisible=true
+          
+        },
+        /**
+         * 开启行编辑
+         * @param {object} row 
+         */
+        handleSetFoucsSetData(row) {
+            this.oldRow = row
 
-    },
-    /**
-     * 行数据变化更改
-     * @param {object} row 
-     */
-    loseFoucs(row) {
-        // let res = _.isEqual(row, this.oldRow)
-        // if (res) {
-        //     //行编辑未修改
+        },
+        submitEditForm() {
 
-        // }
-        // else {
-        //     //行编辑发生修改
-        // }
-    },
-    /**
-     * 保存当前行
-     * @param {object} row 
-     */
-    saveHandleClick(row) {
-        row.seen = false
+            this.editFormVisible=false;
+
+        },
+        /**
+         * 保存当前行
+         * @param {object} row 
+         */
+        saveHandleClick(row) {
+            row.seen = false
+        }
     }
 }
 </script>

Fișier diff suprimat deoarece este prea mare
+ 2225 - 2105
src/views/ConstructionApplication3D/Demolition/DemolitionList.vue


+ 1 - 1
src/views/ConstructionApplication3D/Demolition/QMSetInfo.vue

@@ -34,7 +34,7 @@
       <el-button type="primary" @click="saveAs()">另存为</el-button>
       <el-button type="primary" @click="reset()">重置</el-button>
     </el-row>
-    <el-dialog title="标准名称设置" modal="false" :visible.sync="dialogFormVisible" modal-append-to-body>
+    <el-dialog title="标准名称设置" :modal="false" :visible.sync="dialogFormVisible" modal-append-to-body>
       <el-form :model="ruleForm" :rules="rules" ref="ruleForm">
         <el-form-item label="名称" prop="name">
           <el-input v-model="ruleForm.name" autocomplete="off"></el-input>

+ 1 - 1
src/views/ConstructionApplication3D/Demolition/ZDSetInfo.vue

@@ -117,7 +117,7 @@
     </el-row>
     <el-dialog
       title="标准名称设置"
-      modal="false"
+      :modal="false"
       :visible.sync="dialogFormVisible"
       modal-append-to-body
     >

+ 159 - 353
src/views/ConstructionApplication3D/NightscapeAnalysis/NightscapeAnalysis.vue

@@ -241,6 +241,9 @@ export default {
 
       // 是否开启夜景
       if (!isNight) {
+        if (this.dgdsq) {
+          clearTimeout(this.dgdsq);
+        }
         if (scene.layers.find("白天")) scene.layers.find("白天").visible = true;
         if (scene.layers.find("夜晚"))
           scene.layers.find("夜晚").visible = false;
@@ -259,7 +262,7 @@ export default {
         if (scene.layers.find("夜晚")) scene.layers.find("夜晚").visible = true;
         // 泛光线底纹
         let roadLine1 = Cesium.GeoJsonDataSource.load(
-          window.NightLightUrl.csfgx
+          window.NightLightUrl.csfgx.url
         );
 
         roadLine1
@@ -272,16 +275,21 @@ export default {
               line.polyline.material = new Cesium.PolylineGlowMaterialProperty({
                 //设置Glow材质
                 glowPower: 0.005,
-                color: Cesium.Color.ORANGE.withAlpha(0.9),
+                color: new Cesium.Color(
+                  window.NightLightUrl.csfgx.fgxColor.r,
+                  window.NightLightUrl.csfgx.fgxColor.g,
+                  window.NightLightUrl.csfgx.fgxColor.b,
+                  window.NightLightUrl.csfgx.fgxColor.a
+                ),
               });
-              line.polyline.width = 50;
+              line.polyline.width = window.NightLightUrl.csfgx.fgxWidth;
             }
           })
           .otherwise(function (error) {
             window.alert(error);
           });
         let roadLine2 = Cesium.GeoJsonDataSource.load(
-          window.NightLightUrl.csfgx
+          window.NightLightUrl.csfgx.url
         );
         //泛光亮线
         roadLine2
@@ -294,17 +302,22 @@ export default {
               line.polyline.material = new Cesium.PolylineGlowMaterialProperty({
                 //设置Glow材质
                 glowPower: 0.001,
-                color: Cesium.Color.white,
+                color: new Cesium.Color(
+                  window.NightLightUrl.csfgx.fgdxColor.r,
+                  window.NightLightUrl.csfgx.fgdxColor.g,
+                  window.NightLightUrl.csfgx.fgdxColor.b,
+                  window.NightLightUrl.csfgx.fgdxColor.a
+                ),
               });
-              line.polyline.width = 5;
+              line.polyline.width = window.NightLightUrl.csfgx.fgdxWidth;
             }
           })
           .otherwise(function (error) {
             window.alert(error);
           });
 
-        //一山湖灯光
-        Cesium.loadJson(window.NightLightUrl.yshdg).then((response) => {
+        //地标灯光
+        Cesium.loadJson(window.NightLightUrl.yshdg.url).then((response) => {
           let features = response.features;
           features.forEach((element) => {
             let p = element.geometry.coordinates;
@@ -313,16 +326,21 @@ export default {
               p[1],
               p[2] + 20
             );
-            var SpotLightPos32 = new Cesium.Cartesian3.fromDegrees(
-              p[0],
-              p[1],
-              p[2]
-            );
+            // var SpotLightPos32 = new Cesium.Cartesian3.fromDegrees(
+            //   p[0],
+            //   p[1],
+            //   p[2]
+            // );
             var SpotLightOptions3 = {
-              cutoffDistance: 120,
-              color: Cesium.Color.ORANGE,
-              decay: 1,
-              intensity: 2,
+              cutoffDistance: window.NightLightUrl.yshdg.cutoffDistance,
+              color: new Cesium.Color(
+                window.NightLightUrl.yshdg.LightColor.r,
+                window.NightLightUrl.yshdg.LightColor.g,
+                window.NightLightUrl.yshdg.LightColor.b,
+                window.NightLightUrl.yshdg.LightColor.a
+              ),
+              decay: window.NightLightUrl.yshdg.decay,
+              intensity: window.NightLightUrl.yshdg.intensity,
             };
 
             let SpotLight33 = new Cesium.PointLight(
@@ -335,9 +353,9 @@ export default {
         });
 
         // 体育场灯光
-        Cesium.loadJson(window.NightLightUrl.tycdg).then((response) => {
+        Cesium.loadJson(window.NightLightUrl.tycdg.url).then((response) => {
           let features = response.features;
-          features.forEach((element) => {
+          features.forEach((element, indx) => {
             let p = element.geometry.coordinates;
             var SpotLightPos3 = new Cesium.Cartesian3.fromDegrees(
               p[0],
@@ -346,10 +364,15 @@ export default {
             );
 
             var SpotLightOptions3 = {
-              cutoffDistance: 150,
-              color: new Cesium.Color(245 / 255, 250 / 255, 216 / 255, 0.51),
-              decay: 1,
-              intensity: 1,
+              cutoffDistance: window.NightLightUrl.tycdg.cutoffDistance,
+              color: new Cesium.Color(
+                window.NightLightUrl.tycdg.LightColor.r,
+                window.NightLightUrl.tycdg.LightColor.g,
+                window.NightLightUrl.tycdg.LightColor.b,
+                window.NightLightUrl.tycdg.LightColor.a
+              ),
+              decay: window.NightLightUrl.tycdg.decay,
+              intensity: window.NightLightUrl.tycdg.intensity,
             };
 
             let SpotLight33 = new Cesium.PointLight(
@@ -357,24 +380,42 @@ export default {
               // SpotLightPos32,
               SpotLightOptions3
             );
+            // that.tiyuchangdg.push(SpotLight33);
             scene.addLightSource(SpotLight33);
+
+            // if (indx < 11) {
+            //   that.tiyuchangdg1.push(SpotLight33);
+            // } else if (indx >= 11 && indx < 20) {
+            //   that.tiyuchangdg2.push(SpotLight33);
+            // } else {
+            //   that.tiyuchangdg3.push(SpotLight33);
+            // }
           });
+          // let sd = that.splitArray(that.tiyuchangdg);
+          // that.tiyuchangdg1 = sd[0];
+          // that.tiyuchangdg2 = sd[1];
+          // that.tiyuchangdg3 = sd[2];
         });
         // // 道路灯光
-        Cesium.loadJson(window.NightLightUrl.dldg).then((response) => {
+        Cesium.loadJson(window.NightLightUrl.dldg.url).then((response) => {
           let features = response.features;
           features.forEach((element) => {
             let p = element.geometry.coordinates;
             var SpotLightPos3 = new Cesium.Cartesian3.fromDegrees(
               p[0],
               p[1],
-              p[2] + 20
+              p[2] + 40
             );
             var SpotLightOptions3 = {
-              cutoffDistance: 110,
-              color: new Cesium.Color(209 / 255, 209 / 255, 147 / 255, 0.5),
-              decay: 1,
-              intensity: 1,
+              cutoffDistance: window.NightLightUrl.dldg.cutoffDistance,
+              color: new Cesium.Color(
+                window.NightLightUrl.dldg.LightColor.r,
+                window.NightLightUrl.dldg.LightColor.g,
+                window.NightLightUrl.dldg.LightColor.b,
+                window.NightLightUrl.dldg.LightColor.a
+              ),
+              decay: window.NightLightUrl.dldg.decay,
+              intensity: window.NightLightUrl.dldg.intensity,
             };
 
             let SpotLight33 = new Cesium.PointLight(
@@ -386,7 +427,7 @@ export default {
           });
         });
         // 草坪灯光
-        Cesium.loadJson(window.NightLightUrl.cpdg).then((response) => {
+        Cesium.loadJson(window.NightLightUrl.cpdg.url).then((response) => {
           let features = response.features;
           features.forEach((element) => {
             let p = element.geometry.coordinates;
@@ -397,10 +438,15 @@ export default {
             );
 
             var SpotLightOptions3 = {
-              cutoffDistance: 90,
-              color: new Cesium.Color(209 / 255, 209 / 255, 147 / 255, 1),
-              decay: 1,
-              intensity: 1,
+              cutoffDistance: window.NightLightUrl.cpdg.cutoffDistance,
+              color: new Cesium.Color(
+                window.NightLightUrl.cpdg.LightColor.r,
+                window.NightLightUrl.cpdg.LightColor.g,
+                window.NightLightUrl.cpdg.LightColor.b,
+                window.NightLightUrl.cpdg.LightColor.a
+              ),
+              decay: window.NightLightUrl.cpdg.decay,
+              intensity: window.NightLightUrl.cpdg.intensity,
             };
 
             let SpotLight33 = new Cesium.PointLight(
@@ -426,6 +472,61 @@ export default {
         this.gyTableData.forEach((element) => {
           this.addLightSource(element);
         });
+
+        if (this.dgdsq) {
+          clearTimeout(this.dgdsq);
+        }
+        this.dgdsq = setInterval(function () {
+          //创建分层设色对象   设置最大/最小可见高度   颜色表  显示模式   透明度及线宽
+          var colorTable = new Cesium.ColorTable();
+          if (that.tycindex == 0) {
+            colorTable.insert(
+              65,
+              new Cesium.Color(255 / 255, 0 / 255, 234 / 255)
+            );
+            colorTable.insert(
+              30,
+              new Cesium.Color(13 / 255, 255 / 255, 0 / 255)
+            );
+          } else if (that.tycindex == 1) {
+            colorTable.insert(
+              65,
+              new Cesium.Color(255 / 255, 255 / 255, 0 / 255)
+            );
+            colorTable.insert(
+              30,
+              new Cesium.Color(0 / 255, 232 / 255, 255 / 255)
+            );
+          } else {
+            colorTable.insert(
+              65,
+              new Cesium.Color(23 / 255, 0 / 255, 255 / 255)
+            );
+            colorTable.insert(
+              30,
+              new Cesium.Color(155 / 255, 0 / 255, 255 / 255)
+            );
+          }
+          var layer = scene.layers.find("TYCB@BaoPo0621N");
+          var hyp = new Cesium.HypsometricSetting();
+          hyp.MaxVisibleValue = 65;
+          hyp.MinVisibleValue = 30;
+          hyp.ColorTable = colorTable;
+          hyp.DisplayMode = Cesium.HypsometricSettingEnum.DisplayMode.FACE;
+          hyp.Opacity = 0.5;
+          hyp.LineInterval = 1.0;
+          //设置图层分层设色属性
+          layer.hypsometricSetting = {
+            hypsometricSetting: hyp,
+            // CoverageArea: ps,
+            analysisMode:
+              Cesium.HypsometricSettingEnum.AnalysisRegionMode.ARM_ALL,
+          };
+          that.tycindex += 1;
+          if (that.tycindex >= 3) {
+            that.tycindex = 0;
+          }
+        }, 1000 * 2);
       }
     },
 
@@ -696,7 +797,7 @@ export default {
      */
     loadldx() {
       let that = this;
-      Cesium.loadJson(window.NightLightUrl.dlzxx).then((jsonData) => {
+      Cesium.loadJson(window.NightLightUrl.dlzxx.url).then((jsonData) => {
         debugger;
         jsonData.features.forEach((route) => {
           let list = route.geometry.coordinates.flat(Infinity);
@@ -705,8 +806,13 @@ export default {
             // 用于打底的线
             polyline: {
               positions: Cesium.Cartesian3.fromDegreesArrayHeights(list),
-              width: 5, // 线的宽度,像素为单位
-              material: Cesium.Color.BLACK.withAlpha(0.3),
+              width: window.NightLightUrl.dlzxx.lddxWidth, // 线的宽度,像素为单位
+              material: new Cesium.Color(
+                window.NightLightUrl.dlzxx.lddxColor.r,
+                window.NightLightUrl.dlzxx.lddxColor.g,
+                window.NightLightUrl.dlzxx.lddxColor.b,
+                window.NightLightUrl.dlzxx.lddxColor.a
+              ),
             },
           });
           this.liudongGntities.push(dl);
@@ -714,13 +820,23 @@ export default {
             id: route.properties.OBJECTID,
             polyline: {
               positions: Cesium.Cartesian3.fromDegreesArrayHeights(list),
-              width: 4.0,
+              width: window.NightLightUrl.dlzxx.ldxWidth,
               material: new Cesium.PolylineTrailMaterialProperty({
-                outlineColor: Cesium.Color.WHITE,
-                outlineWidth: 3,
-                color: Cesium.Color.fromCssColorString("rgba(127, 255, 0, 1)"),
-                trailLength: 0.3,
-                period: 4.0,
+                outlineColor: new Cesium.Color(
+                  window.NightLightUrl.dlzxx.ldxOutlineColor.r,
+                  window.NightLightUrl.dlzxx.ldxOutlineColor.g,
+                  window.NightLightUrl.dlzxx.ldxOutlineColor.b,
+                  window.NightLightUrl.dlzxx.ldxOutlineColor.a
+                ),
+                outlineWidth: window.NightLightUrl.dlzxx.ldxOutlineWidth,
+                color: new Cesium.Color(
+                  window.NightLightUrl.dlzxx.ldxColor.r,
+                  window.NightLightUrl.dlzxx.ldxColor.g,
+                  window.NightLightUrl.dlzxx.ldxColor.b,
+                  window.NightLightUrl.dlzxx.ldxColor.a
+                ),
+                trailLength: window.NightLightUrl.dlzxx.trailLength,
+                period: window.NightLightUrl.dlzxx.period,
               }),
             },
           });
@@ -728,317 +844,7 @@ export default {
         });
       });
     },
-    // //夜景开关
-    // startNight(isNight) {
-    //   scene.globe.show = true;
-    //   viewer.scene.hdrEnabled = isNight;
-    //   viewer.scene.bloomEffect.show = false;
-
-    //   // 是否开启夜景
-    //   if (!isNight) {
-    //     scene.sun.show = true;
-    //     this.clearLightSource(true, true);
-
-    //     scene.skyAtmosphere.show = true;
-
-    //     this.switchLight(true); //白天
-    //     this.setHypsometric(false); //夜景材质
-    //     viewer.imageryLayers.remove(this.imageLayer);
-    //   } else {
-    //     this.switchLight(false);
-    //     scene.sun.show = false;
-    //     scene.skyAtmosphere.show = false;
-
-    //     this.setHypsometric(true); //夜景
-    //     this.imageLayer = viewer.imageryLayers.addImageryProvider(
-    //       new Cesium.SingleTileImageryProvider({
-    //         url: "static/images/zt/Nightscape/BlackMarble_2016-1.jpg",
-    //       })
-    //     );
-    //     this.imageLayer.alpha = 0.8;
-    //     this.gyTableData.forEach((element) => {
-    //       this.addLightSource(element);
-    //     });
-    //   }
-    // },
-
-    // //设置环境光
-    // switchLight(isDayLight) {
-    //   if (isDayLight) {
-    //     //设置环境光(白天)
-    //     scene.lightSource.ambientLightColor = new Cesium.Color(
-    //       0.65,
-    //       0.65,
-    //       0.65,
-    //       1
-    //     );
-    //   } else {
-    //     // //设置环境光(夜晚)
-    //     // scene.lightSource.ambientLightColor = new Cesium.Color(
-    //     //   0.15,
-    //     //   0.15,
-    //     //   0.15,
-    //     //   1
-    //     // );
-
-    //     // // 添加光源
-    //     // let gyData1 = {
-    //     //   gyType: "点光源",
-    //     //   cartesian: new Cesium.Cartesian3.fromDegrees(
-    //     //     109.49115721355469,
-    //     //     18.29592136116859,
-    //     //     80
-    //     //   ),
-    //     //   gyDecay: 1,
-    //     //   gyDistance: 800,
-    //     //   gyColor: "rgba(255,20,147,0.37)",
-    //     //   gyIntensity: 2,
-    //     // };
-    //     // this.addLightSource(gyData1);
-
-    //     // //主建筑光源
-    //     // let gyData2 = {
-    //     //   gyType: "点光源",
-    //     //   cartesian: new Cesium.Cartesian3.fromDegrees(
-    //     //     109.55348802331464,
-    //     //     18.278824564764143,
-    //     //     80
-    //     //   ),
-    //     //   gyDecay: 1,
-    //     //   gyDistance: 800,
-    //     //   gyColor: "rgba(240,248,255,1)",
-    //     //   gyIntensity: 1,
-    //     // };
-    //     // this.addLightSource(gyData2);
-    //     // let gyData3 = {
-    //     //   gyType: "点光源",
-    //     //   cartesian: new Cesium.Cartesian3.fromDegrees(
-    //     //     109.54991809813524,
-    //     //     18.28458792962873,
-    //     //     80
-    //     //   ),
-    //     //   gyDecay: 1,
-    //     //   gyDistance: 800,
-    //     //   gyColor: "rgba(240,248,255,1)",
-    //     //   gyIntensity: 1,
-    //     // };
-    //     // this.addLightSource(gyData3);
-
-    //     // let gyData4 = {
-    //     //   gyType: "点光源",
-    //     //   cartesian: new Cesium.Cartesian3.fromDegrees(
-    //     //     109.5490688547866,
-    //     //     18.283227701313386,
-    //     //     40
-    //     //   ),
-    //     //   gyDecay: 2,
-    //     //   gyDistance: 80,
-    //     //   gyColor: "rgba(13,128,247,0.15)",
-    //     //   gyIntensity: 0.5,
-    //     // };
-    //     // this.addLightSource(gyData4);
-    //     // let gyData5 = {
-    //     //   gyType: "点光源",
-    //     //   cartesian: new Cesium.Cartesian3.fromDegrees(
-    //     //     109.55236475164054,
-    //     //     18.278884181031398,
-    //     //     40
-    //     //   ),
-    //     //   gyDecay: 2,
-    //     //   gyDistance: 80,
-    //     //   gyColor: "rgba(13,128,247,0.15)",
-    //     //   gyIntensity: 0.5,
-    //     // };
-    //     // this.addLightSource(gyData5);
-    //     // let gyData6 = {
-    //     //   gyType: "点光源",
-    //     //   cartesian: new Cesium.Cartesian3.fromDegrees(
-    //     //     109.55195212379788,
-    //     //     18.283303465199854,
-    //     //     40
-    //     //   ),
-    //     //   gyDecay: 2,
-    //     //   gyDistance: 80,
-    //     //   gyColor: "rgba(13,128,247,0.15)",
-    //     //   gyIntensity: 0.5,
-    //     // };
-    //     // this.addLightSource(gyData6);
-    //     // let gyData7 = {
-    //     //   gyType: "点光源",
-    //     //   cartesian: new Cesium.Cartesian3.fromDegrees(
-    //     //     109.55549715519659,
-    //     //     18.279573531714174,
-    //     //     40
-    //     //   ),
-    //     //   gyDecay: 2,
-    //     //   gyDistance: 80,
-    //     //   gyColor: "rgba(13,128,247,0.15)",
-    //     //   gyIntensity: 0.5,
-    //     // };
-    //     // this.addLightSource(gyData7);
-    //     // 添加光源
-    //     // 新增直射光1--西南侧光
-    //     var position = new Cesium.Cartesian3.fromDegrees(
-    //       108.64028472779978,
-    //       17.253899597841926,
-    //       10
-    //     );
-    //     var targetPosition1 = new Cesium.Cartesian3.fromDegrees(
-    //       108.98714556856183,
-    //       17.660729210061046,
-    //       10
-    //     );
-    //     var dirLightOptions = {
-    //       targetPosition: targetPosition1,
-    //       color: new Cesium.Color(220 / 255, 230 / 255, 240 / 255, 0.5),
-    //       intensity: 1,
-    //     };
-    //     this.directionalLight_1 &&
-    //       scene.removeLightSource(this.directionalLight_1);
-    //     this.directionalLight_1 = new Cesium.DirectionalLight(
-    //       position,
-    //       dirLightOptions
-    //     );
-    //     scene.addLightSource(this.directionalLight_1);
-
-    //     //新增直射光1--东北侧光
-    //     var position3 = new Cesium.Cartesian3.fromDegrees(
-    //       110.1833740842942,
-    //       19.23480287256715,
-    //       10
-    //     );
-    //     var targetPosition3 = new Cesium.Cartesian3.fromDegrees(
-    //       109.92243671490641,
-    //       18.823627245617516,
-    //       10
-    //     );
-    //     var dirLightOptions3 = {
-    //       targetPosition: targetPosition3,
-    //       color: new Cesium.Color(220 / 255, 223 / 255, 227 / 255, 0.5),
-    //       intensity: 1.5,
-    //     };
-    //     this.directionalLight_3 &&
-    //       scene.removeLightSource(this.directionalLight_3);
-    //     this.directionalLight_3 = new Cesium.DirectionalLight(
-    //       position3,
-    //       dirLightOptions3
-    //     );
-    //     scene.addLightSource(this.directionalLight_3);
-    //     //新增直射光1--顶光
-    //     var position4 = new Cesium.Cartesian3.fromDegrees(
-    //       109.5264539133307,
-    //       18.2736162462657,
-    //       500
-    //     );
-    //     var targetPosition4 = new Cesium.Cartesian3.fromDegrees(
-    //       109.5264539133307,
-    //       18.2736162462657,
-    //       400
-    //     );
-    //     var dirLightOptions4 = {
-    //       targetPosition: targetPosition4,
-
-    //       color: Cesium.Color.SILVER.withAlpha(0.5),
-    //       intensity: 0.1,
-    //     };
-    //     this.directionalLight_4 &&
-    //       scene.removeLightSource(this.directionalLight_4);
-    //     this.directionalLight_4 = new Cesium.DirectionalLight(
-    //       position4,
-    //       dirLightOptions4
-    //     );
-    //     scene.addLightSource(this.directionalLight_4);
-    //   }
-    // },
-    // //设置白膜自发光纹理
-    // setHypsometric(isShow = true) {
-    //   if (isShow) {
-    //     scene.layers.layerQueue.forEach((layer) => {
-    //       let hyp = null;
-    //       let LayerName = window.NightViewLayerName.find(
-    //         (c) => c == layer.name
-    //       );
-    //       if (LayerName) {
-    //         // 关掉边框线
-    //         layer.style3D.fillStyle = Cesium.FillStyle.Fill;
-    //         hyp = new Cesium.HypsometricSetting();
-    //         hyp.emissionTextureArray = [
-    //           {
-    //             url: "static/images/zt/Nightscape/Texture05.jpg",
-    //             USpeed: 0.5,
-    //             VSpeed: 0,
-    //             UTiling: 1,
-    //             VTiling: 1,
-    //           },
-    //           {
-    //             url: "static/images/zt/Nightscape/Texture01.jpg",
-    //             USpeed: 0.5,
-    //             VSpeed: 0,
-    //             UTiling: 1,
-    //             VTiling: 1,
-    //           },
-
-    //           {
-    //             url: "static/images/zt/Nightscape/build008.JPG",
-    //             USpeed: 0,
-    //             VSpeed: 0,
-    //             UTiling: 1,
-    //             VTiling: 3,
-    //           },
-    //           {
-    //             url: "static/images/zt/Nightscape/build129.JPG",
-    //             USpeed: 0,
-    //             VSpeed: 0,
-    //             UTiling: 1,
-    //             VTiling: 3,
-    //           },
-    //           {
-    //             url: "static/images/zt/Nightscape/build216.JPG",
-    //             USpeed: 0,
-    //             VSpeed: 0,
-    //             UTiling: 1,
-    //             VTiling: 3,
-    //           },
-    //           // {
-    //           //   url: "static/images/zt/Nightscape/HighRiseNight0008_4_S.jpg",
-    //           //   USpeed: 0,
-    //           //   VSpeed: 0,
-    //           //   UTiling: 1,
-    //           //   VTiling: 1,
-    //           // },
-    //           // {
-    //           //   url: "static/images/zt/Nightscape/HighRiseNight0016_3_L.jpg",
-    //           //   USpeed: 0,
-    //           //   VSpeed: 0,
-    //           //   UTiling: 1,
-    //           //   VTiling: 1,
-    //           // },
-    //           // {
-    //           //   url: "static/images/zt/Nightscape/HighRiseNight0020_L.jpg",
-    //           //   USpeed: 0,
-    //           //   VSpeed: 0,
-    //           //   UTiling: 1,
-    //           //   VTiling: 1,
-    //           // },
-    //         ];
-    //         layer.hypsometricSetting = {
-    //           hypsometricSetting: hyp,
-    //         };
-    //       }
-    //     });
-    //   } else {
-    //     scene.layers.layerQueue.forEach((layer) => {
-    //       layer.hypsometricSetting = {
-    //         hypsometricSetting: undefined,
-    //       };
-    //       layer.style3D.fillStyle = Cesium.FillStyle.Fill;
-    //       // 刷新场景
-    //       // layer.refresh();
-    //     });
-    //   }
-    // },
 
-    //提交光源数据
     onSubmit() {
       //更新
       if (this.dgyform.id) {

+ 2 - 1
static/Config/config.js

@@ -1740,7 +1740,8 @@ window.NightLightUrl = {
   tycdg: {
     url: "static/data/体育馆.json",
     cutoffDistance: 150, //扩散距离
-    LightColor: { r: 245 / 255, g: 250 / 255, b: 216 / 255, a: 0.51 }, //灯光颜色
+    // LightColor: { r: 245 / 255, g: 250 / 255, b: 216 / 255, a: 0.51 }, //灯光颜色
+    LightColor: { r: 255 / 255, g: 255 / 255, b: 255 / 255, a: 0.51 }, //灯光颜色
     decay: 2, //衰减
     intensity: 1, //强度
   },

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