管道基础大数据平台系统开发-【前端】-新系統界面
Surpriseplus
2023-02-06 4e3d77dcbe421a4d6611ebcdd1ac3165cb36ad4b
src/views/Synthesis/LeftMenu.vue
@@ -1,5 +1,5 @@
<template>
  <div class="menu_Box">
  <div class="menu_Box box_div">
    <div
      class="leftMen_div"
      @click="setChangeTwoMenu(item)"
@@ -14,6 +14,7 @@
    </div>
    <mapinfo ref="mapinfo" />
    <maplayer ref="maplayer" />
    <queryinfo ref="queryinfo" />
    <input
      type="file"
      accept=".kml"
@@ -27,9 +28,9 @@
import { transform } from 'ol/proj';
import mapinfo from '../Tools/mapinfo.vue';
import maplayer from '../Tools/maplayer.vue';
import queryinfo from '../Tools/queryinfo.vue'
export default {
  components: { mapinfo, maplayer },
  components: { mapinfo, maplayer, queryinfo },
  data() {
    return {
      showTwoMenuFlag: false,
@@ -92,6 +93,12 @@
            label: 'synthesis.compass',
            name: '指北针',
            css: 'twoMenu_imge28',
          },
          {
            id: 'b9',
            label: 'synthesis.undergroundMode',
            name: '地下模式',
            css: 'twoMenu_imge29',
          },
        ],
        [
@@ -221,7 +228,7 @@
          {
            id: 'j1',
            label: 'synthesis.synthobj.m1',
            name: '水平距离',
            name: '表面距离',
            css: 'twoMenu_imge71',
          },
          {
@@ -323,6 +330,7 @@
      isolineFlag: false,
      isslopeFlag: false,
      isContrastFlag: false,
      UndergroundMode: false
    };
  },
  methods: {
@@ -364,7 +372,7 @@
          sgworld.Creator.SimpleGraphic.edit(true, { editProp: true });
          this.setPlot(res.id);
          break;
      }
    },
    setPlot(res) {
@@ -520,7 +528,7 @@
            (data) => {
              data.id = window.sgworld.Core.getuid();
              this.measureData.set(data.id, measure);
              this.openMeasureResultInfo('水平距离', data);
              this.openMeasureResultInfo('表面距离', data);
            }
          );
          break;
@@ -537,16 +545,24 @@
          );
          break;
        case 'j3':
          var measure = window.sgworld.Command.execute(
            1,
            11,
            this.colorAll,
            (data) => {
              data.id = window.sgworld.Core.getuid();
              this.measureData.set(data.id, measure);
              this.openMeasureResultInfo('海拔高度', data);
            }
          );
          // var measure = window.sgworld.Command.execute(
          //   1,
          //   11,
          //   this.colorAll,
          //   (data) => {
          //     data.id = window.sgworld.Core.getuid();
          //     this.measureData.set(data.id, measure);
          //     this.openMeasureResultInfo('海拔高度', data);
          //   }
          // );
          var measure = window.sgworld.Command.execute(0, 3, this.colorAll, (data) => {
            data.id = window.sgworld.Core.getuid();
            this.measureData.set(data.id, measure);
            this.openMeasureResultInfo('平面面积', data);
          });
          break;
        case 'j2':
          var measure = window.sgworld.Command.execute(
@@ -624,12 +640,12 @@
    openMeasureResultInfo(name, data) {
      let info = '';
      switch (name) {
        case '水平距离':
        case '表面距离':
        case '空间距离':
          info = '总长度:' + data.distance[data.distance.length - 1];
          break;
        case '海拔高度':
          info = '海拔:' + data.height;
          info = '高度:' + data.height;
          break;
        case '垂直高度':
          info = `${data.gddistance}<br>${data.kjdistance}<br>${data.spdistance}`;
@@ -760,6 +776,19 @@
            }
          );
          break;
        case 'd9':
          this.$store.state.mapPopBoxFlag = '3';
          this.$refs && this.$refs.queryinfo && this.$refs.queryinfo.open("管道空间分析", null, {
            close: () => {
              if (this.$store.state.pipelineEntity.length != 0) {
                for (var i in this.$store.state.pipelineEntity) {
                  var item = this.$store.state.pipelineEntity[i]
                  sgworld.Viewer.entities.remove(item);
                }
              }
            }
          });
          break;
        case 'd8':
          if (this.isContrastFlag == false) {
            this.isContrastFlag = true;
@@ -793,6 +822,7 @@
            );
          }
          break;
        case 'd11':
          if (window.Excavation) {
            window.Excavation.clear();
@@ -858,6 +888,11 @@
        { cyjj: 50, objid: 0 },
        (Distance) => {
          if (Distance.gcs && Distance.gcs.length) {
            var url = window.location.href;
            var testurl = '';
            if (url.indexOf('web') != -1) {
              testurl = '/web';
            }
            window.AnalysisDXPM.analyseData = Distance;
            this.dxpmIndex = layer.open({
              type: 2,
@@ -866,7 +901,7 @@
              area: ['80%', '280px'],
              offset: 'b',
              skin: 'other-class',
              content: '/SmartEarthSDK/Workers/analysis/AnalysisDXPM.html',
              content: testurl + '/SmartEarthSDK/Workers/analysis/AnalysisDXPM.html',
              end: () => {
                this.dxpmIndex && this.clear('d4');
              },
@@ -976,12 +1011,24 @@
          this.isNaviget = !this.isNaviget;
          window.sgworld.navControl('nav', this.isNaviget);
          break;
        case 'b9': //地下模式
          this.UndergroundMode = !this.UndergroundMode;
          window.sgworld.Analysis.UndergroundMode(this.UndergroundMode, 0.3)
          break;
      }
    },
    setCoverage(res) {
      switch (res) {
        case 'a1':
          this.$refs && this.$refs.maplayer && this.$refs.maplayer.open();
          if (this.$store.state.layerMnage == false) {
            this.$refs && this.$refs.maplayer && this.$refs.maplayer.closeAll();
            this.$refs && this.$refs.maplayer && this.$refs.maplayer.open();
            this.$store.state.layerMnage = true;
          } else if (this.$store.state.layerMnage == true) {
            this.$refs && this.$refs.maplayer && this.$refs.maplayer.closeAll();
            this.$store.state.layerMnage = false;
          }
          break;
      }
    },
@@ -1003,11 +1050,10 @@
      }
    });
    this.$bus.$on('showLeftMenu', (res) => {
      this.$store.state.showAllLayers = true;
      this.setCoverage('a1');
      // this.$bus.$emit('setAllLayers', true);
    });
    this.$store.state.showAllLayers = true;
    this.$store.state.layerMnage = false;
    this.setCoverage('a1');
  },
};
</script>
@@ -1028,7 +1074,7 @@
    font-size: 16px;
    font-family: Microsoft YaHei;
    font-weight: 400;
    color: #ffffff;
    padding: 10px;
    min-width: 100px;
    margin-left: 10px;
@@ -1036,12 +1082,14 @@
    border-radius: 5px;
  }
  .leftMen_div:hover {
    background: linear-gradient(180deg, #002992, #080472);
    border: 1px solid #000000;
    box-shadow: 0px 3px 5px 0px rgba(0, 0, 0, 0.21);
    background: rgba(64, 158, 255, 0.4);
    border: 1px solid #409eff;
    box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
  }
  .lefMenuDivActive {
    background: linear-gradient(180deg, #002992, #080472);
    background: rgba(64, 158, 255, 0.4);
    border: 1px solid #409eff;
  }
  .menuTwoImage {
    width: 32px;
@@ -1089,6 +1137,9 @@
  .twoMenu_imge28 {
    background: url("../../assets/img/synthesis/椭圆 4.png") no-repeat center;
  }
  .twoMenu_imge29 {
    background: url("../../assets/img/synthesis/z_03.png") no-repeat center;
  }
  //漫游
  .twoMenu_imge31 {
    background: url("../../assets/img/synthesis/椭圆 6.png") no-repeat center;