管道基础大数据平台系统开发-【前端】-新系統界面
Surpriseplus
2023-05-12 6e92e7b101c2ea468a4b0d2a19066bc1b4d31764
src/components/mapsdk.vue
@@ -80,16 +80,24 @@
            <el-form
              ref="form"
              :model="coordFrom"
              label-width="50px"
            >
              <el-form-item label="经度:">
                <el-input v-model="coordFrom.lon"></el-input>
                <el-input
                  v-model="coordFrom.lon"
                  placeholder="请输入经度"
                ></el-input>
              </el-form-item>
              <el-form-item label="纬度:">
                <el-input v-model="coordFrom.lat"></el-input>
                <el-input
                  v-model="coordFrom.lat"
                  placeholder="请输入纬度"
                ></el-input>
              </el-form-item>
              <el-form-item label="高度:">
                <el-input v-model="coordFrom.height"></el-input>
                <el-input
                  v-model="coordFrom.height"
                  placeholder="请输入高度"
                ></el-input>
              </el-form-item>
              <el-form-item>
                <el-button
@@ -304,7 +312,17 @@
      </div>
      <!--      <div style="display: flex;">-->
      <div
        class="changeTerrain"
        style=" position: absolute;
  bottom: 84px;
  right: 46px;
  height: 30px;
  width: 30px;
  z-index: 101;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.5);"
        @click="changeTerrainLayer"
      >
        <div
@@ -316,7 +334,17 @@
      <!--      class="center CenDiv"-->
      <div
        @click="changeMenulayer"
        class="changeLayer"
        style=" position: absolute;
  bottom: 116px;
  right: 46px;
  height: 30px;
  width: 30px;
  z-index: 101;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.5);"
      >
        <div
          title="底图切换"
@@ -327,7 +355,17 @@
      <div
        @click="changeMapType"
        class="changeMapType"
        style="  position: absolute;
  bottom: 52px;
  right: 46px;
  height: 30px;
  width: 30px;
  z-index: 101;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.5);"
      >
        <div
          title="2/3维切换"
@@ -853,9 +891,9 @@
        val: 50,
      },
      coordFrom: {
        lon: 116.3911,
        lat: 39.9115,
        height: 100000,
        lon: "",
        lat: "",
        height: "",
      },
      listData: {
        name: null,
@@ -1008,7 +1046,9 @@
      window.pickedColor;
      window.modeCatchHandler = new Cesium.ScreenSpaceEventHandler(Viewer.scene.canvas);
      window.modeCatchHandler.setInputAction((event) => {
        window.pickedFeature && (window.pickedFeature.color = window.pickedColor);
        if (window.pickedColor) {
          window.pickedFeature && (window.pickedFeature.color = window.pickedColor);
        }
        window.pickedFeature = sgworld.Viewer.scene.pick(event.position);
        if (Cesium.defined(window.pickedFeature)) {
          if (window.pickedFeature.primitive instanceof Cesium.Cesium3DTileset) {
@@ -1030,10 +1070,11 @@
        const data = await comprehensive_selectPubById({ id: result.tileset.pubid })
        if (data.code != 200) {
          return
        } else {
          modelKey = JSON.parse(data.result.json).modelid
        }
        if (!JSON.parse(data.result.json)) {
          return this.$message('没有数据,无法获取主键ID');
        }
        modelKey = JSON.parse(data.result.json).modelid
        if (!modelKey) {
          return this.$message('没有模型主键ID,无法查询数据');
        }
@@ -1173,24 +1214,25 @@
    changeTerrainLayer() {
      if (this.terrainflag) {
        Viewer.terrainProvider = new Cesium.EllipsoidTerrainProvider();
        window.terrainDemLayer = null;
        var option = {
          url: window.sceneConfig.SGUrl,
          layerName: window.sceneConfig.mptName,
          requestVertexNormals: true,
        };
        window.terrainLayer = sgworld.Creator.sfsterrainprovider("", option, "", true, "");
        window.terrainMptLayer = sgworld.Creator.sfsterrainprovider("", option, "", true, "");
        Viewer.camera.flyTo({
          destination: Cesium.Cartesian3.fromDegrees(110, 33, 8000000),
        });
      } else {
        window.terrainLayer.deleteObject();
        window.terrainLayer = null;
        window.terrainMptLayer.deleteObject();
        window.terrainMptLayer = null;
        window.terrainLayer = new Cesium.CesiumTerrainProvider({
        window.terrainDemLayer = new Cesium.CesiumTerrainProvider({
          url: LFData + '/3d/terrain/dem20230321'
        });
        Viewer.terrainProvider = window.terrainLayer
        Viewer.terrainProvider = window.terrainDemLayer
        Viewer.camera.flyTo({
          destination: Cesium.Cartesian3.fromDegrees(113.229279, 31.215949, 1000),
          orientation: {
@@ -1943,7 +1985,7 @@
      z-index: 40;
      position: absolute;
      right: 8%;
      bottom: 1%;
      bottom: 10%;
    }
    .propertiesPop {
      width: 350px;