管道基础大数据平台系统开发-【前端】-新系統界面
Surpriseplus
2023-02-22 853873ddb35e8eeb42b1b1b9fdb247ba5b1f19d1
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,14 +411,6 @@
  methods: {
    //二級菜单点击切换
    setChangeTwoMenu(res) {
      //关闭打开的信息窗体
      this.showTwoMenuFlag = res.id;
      this.$store.state.mapMenuBoolean = false;
      this.$store.state.mapMenuBoxFlag = null;
      this.$store.state.mapPopBoolean = false;
@@ -427,8 +420,11 @@
        window.model.deleteObject();
        window.model = null;
      }
      if (this.isMenuFlag != val) {
      sgworld.Analysis.clearCurtainContrast();
      if (this.isMenuFlag == "d") {
        this.clearAllAnalsy();
      }
      if (this.isMenuFlag !=val) {
        sgworld.Creator.SimpleGraphic.clear();
        this.isMenuFlag = val;
        if (this.entityaLayers.length != 0) {
@@ -442,13 +438,17 @@
        }
        this.$store.state.queryInfo = [];
        if (this.$store.state.primitLayer != null) {
          sgworld.Viewer.entities.remove(this.$store.state.primitLayer);
          sgworld.Creator.DeleteObject(this.$store.state.primitLayer);
          this.$store.state.primitLayer = null;
        }
      }
      this.showTwoMenuFlag = res.id;
      switch (val) {
        case 'a': //图层管理
          this.setCoverage(res.id);
@@ -804,7 +804,6 @@
            this.entityaLayers.push(line)
            break;
          case 'label':
            debugger
            const label = Viewer.entities.add({
              position: Cesium.Cartesian3.fromDegrees(wkt.coordinates[0], wkt.coordinates[1]),
              label: {
@@ -1086,6 +1085,23 @@
          break;
      }
    },
    clearAllAnalsy() {
      // switch (this.showTwoMenuFlag) {
      //   case 'd1':
      //     that.isolineFlag = false;
      //     elevationTool.tf = that.isolineFlag;
      //     elevationTool.render();
      //     break;
      //   case 'd2':
      //     that.isslopeFlag = false;
      //     elevationTool.type = 'none';
      //     elevationTool.render();
      //     break;
      // }
    },
    setAnalsy(res) {
      //this.$refs && this.$refs.queryinfo && this.$refs.queryinfo.close("queryinfo");
      var that = this;
@@ -1097,12 +1113,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 = {
@@ -1149,7 +1167,7 @@
          var that = this;
          window.model = sgworld.Creator.create3DTilesets(
            '',
            modelUrl,
            modelUrl+'/SN/tileset.json',
            {},
            {},
            '0',
@@ -1185,28 +1203,21 @@
          }
          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;
                    sgworld.Creator.SimpleGraphic.remove(entity.id);
                    window.DXTerrainFlattening = sgworld.Creator.createTerrainModifier("地形压平", positions, 10, {});
                }
            );
          break;
        case 'd11':
@@ -1223,11 +1234,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",
            })
          }
@@ -1355,7 +1366,7 @@
          window.sgworld.Command.execute(2, 3, '', (data) => {
            data.showPoint = false;
            data.showLine = true;
            data.mode = 1;
            data.mode = 0;
            // 弹窗数据
            window.PathAnimationData = {
              flyData: data,
@@ -1464,8 +1475,10 @@
            this.$refs && this.$refs.maplayer && this.$refs.maplayer.open();
            this.$store.state.layerMnage = true;
          } else if (this.$store.state.layerMnage == true) {
                       this.$bus.$emit("treeDataCopy","true");
            this.$refs && this.$refs.maplayer && this.$refs.maplayer.closeAll();
            this.$store.state.layerMnage = false;
          }
          break;
@@ -1506,7 +1519,7 @@
  margin: 0;
  padding: 0;
  overflow-y: auto;
  text-align: center;
  // text-align: center;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
@@ -1520,6 +1533,7 @@
    margin-left: 10px;
    margin-top: 10px;
    border-radius: 5px;
    text-align: center;
  }
  .leftMen_div:hover {
    background: rgba(64, 158, 255, 0.4);