管道基础大数据平台系统开发-【前端】-新系統界面
wulitaotao
2023-02-22 75b9ebdf49c6fe06623278a64aed87cc523c46df
通视分析、地形整平、坡度分析
已添加1个文件
已修改3个文件
84 ■■■■■ 文件已修改
public/globle/globle.js 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/index.html 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/Synthesis/LeftMenu.vue 58 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/Synthesis/index.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/globle/globle.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,20 @@
window.PDelevationTool = null; //坡度分析
window.DXTerrainFlattening = null; //地形压平
window.TSExcavation = null; //通视分析
function ClearAlayse() {
  if (window.PDelevationTool != null) {
    window.PDelevationTool.type = "none";
    window.PDelevationTool.render();
    window.PDelevationTool = null;
  }
  if (window.DXTerrainFlattening != null) {
    DXTerrainFlattening.remove();
    DXTerrainFlattening = null;
  }
  if (window.TSExcavation != null) {
    window.TSExcavation.deleteObject();
    window.TSExcavation = null;
  }
}
public/index.html
@@ -25,6 +25,9 @@
  <script src="./config/config.js"></script>
  <script src="./config/rsa.min.js"></script>
  <script src="./config/rollups.js"></script>
  <script src="./globle/globle.js"></script>
  <style>
    .esriControlsBR {
src/views/Synthesis/LeftMenu.vue
@@ -35,6 +35,7 @@
</template>
<script>
import { transform } from 'ol/proj';
import mapinfo from '../Tools/mapinfo.vue';
import maplayer from '../Tools/maplayer.vue';
@@ -410,7 +411,6 @@
  methods: {
    //二級菜单点击切换
    setChangeTwoMenu(res) {
      this.$store.state.mapMenuBoolean = false;
      this.$store.state.mapMenuBoxFlag = null;
      this.$store.state.mapPopBoolean = false;
@@ -446,6 +446,9 @@
      this.showTwoMenuFlag = res.id;
      switch (val) {
        case 'a': //图层管理
          this.setCoverage(res.id);
@@ -1111,12 +1114,14 @@
          break;
        case 'd2':
          that.isslopeFlag = !that.isslopeFlag;
          window.PDelevationTool= new SmartEarth.ElevationTool(sgworld);//全局变量
          if (that.isslopeFlag == true) {
            elevationTool.type = 'slope';
            PDelevationTool.type = 'slope';
            PDelevationTool.tf = this.checked;
          } else {
            elevationTool.type = 'none';
            PDelevationTool.type = 'none';
          }
          elevationTool.render();
          PDelevationTool.render();
          break;
        case 'd3':
          var value = {
@@ -1199,28 +1204,23 @@
          }
          break;
        case 'd10':
          if (window.TerrainFlattening) {
            window.TerrainFlattening.remove();
            window.TerrainFlattening = null;
          } else {
            sgworld.Creator.createSimpleGraphic(
              'polygon',
              {
                clampToGround: true,
              },
              function (entity) {
                var positions = entity.polygon.hierarchy.getValue().positions;
                sgworld.Creator.SimpleGraphic.remove(entity.id);
                window.TerrainFlattening =
                  sgworld.Creator.createTerrainModifier(
                    '地形压平',
                    positions,
                    10,
                    {}
                  );
              }
            );
          if(window.DXTerrainFlattening!=null){
            DXTerrainFlattening.remove();
          }
          sgworld.Creator.createSimpleGraphic(
                'polygon',
                {
                    clampToGround: true,
                },
                function (entity) {
                    let   positions = entity.polygon.hierarchy.getValue().positions;
                    console.log(positions);
                    sgworld.Creator.SimpleGraphic.remove(entity.id);
                    window.DXTerrainFlattening = sgworld.Creator.createTerrainModifier("地形压平", positions, 10, {});
                }
            );
          break;
        case 'd11':
@@ -1237,11 +1237,11 @@
          break;
        case "d12":
          if (window.Excavation) {
            window.Excavation.deleteObject()
            window.Excavation = null
          if (window.TSExcavation!=null) {
            window.TSExcavation.deleteObject()
            window.TSExcavation = null
          } else {
            window.Excavation = sgworld.Analysis.createSightLine({
            window.TSExcavation = sgworld.Analysis.createSightLine({
              type: "default",
            })
          }
src/views/Synthesis/index.vue
@@ -128,6 +128,9 @@
  methods: {
    //左侧菜单滑动显隐
    setMenuChange(res) {
      //清除分析模块的全局变量
      ClearAlayse();
      switch (res.id) {
        case 1: