管道基础大数据平台系统开发-【前端】-新系統界面
Surpriseplus
2023-05-11 63be6c3a6e0308812cb9f0ab26a15aff293200a0
src/components/preview_map.vue
@@ -917,7 +917,23 @@
      if (this.$store.state.previewLayer) {
        var res = this.$store.state.previewLayer;
        var type = res.type;
        if (res.url.indexOf('.png') != -1) {
        if (type == 'DEM') {
          window.terrainLayer.deleteObject();
          window.terrainLayer = null;
          window.terrainLayer = new Cesium.CesiumTerrainProvider({
            url: res.url
          });
          Viewer.terrainProvider = window.terrainLayer
          Viewer.camera.flyTo({
            destination: Cesium.Cartesian3.fromDegrees(113.229279, 31.215949, 1000),
            orientation: {
              heading: 6.08434611923462,
              pitch: Cesium.Math.toRadians(-45.0),
              roll: 0.0
            }
          });
        } else if (res.url.indexOf('.png') != -1) {
          var wkt = this.$wkt.parse(res.geom);
          var height = this.getHeight(wkt.coordinates[2])
          window.BaseMapLayer = Viewer.imageryLayers.addImageryProvider(
@@ -929,7 +945,7 @@
          Viewer.camera.flyTo({
            destination: Cesium.Cartesian3.fromDegrees(wkt.coordinates[1], wkt.coordinates[0], height),
          });
        } else if (res.url.indexOf('.json') != -1) {
        } else if (type == '3dml' || type == 'fbx' || type == 'ifc' || type == 'rvt') {
          if (this.app.tileset) viewer.scene.primitives.remove(this.app.tileset);
          this.app.tileset = this.createTileset(res);
          var that = this;
@@ -1197,18 +1213,19 @@
      } else {
        var std = data.result
        var val = std.filter((str) => {
          if (str.type == 1 && str.pid == 1) {
            return str;
          }
          if (str.id == 1 && str.pid == 0) {
            return str;
          }
          if (str.type == 1 && str.cnName == '三维地质模型' || str.cnName == '单体模型' || str.cnName == '洞库模型') {
            return str;
        var val = [];
        std.filter((str) => {
          // if (str.type == 1 && str.pid == 1) {
          //   return str;
          // }
          // if (str.id == 1 && str.pid == 0) {
          //   return str;
          // }
          if (str.type == 1) {
            val.push(str);
          }
          if (str.url != null && str.type == 2 && str.serveType == 'Tileset') {
            return str;
            val.push(str);
          }
        });