管道基础大数据平台系统开发-【前端】-新系統界面
1
Surpriseplus
2023-08-02 7c515e10fcdffcff295a04533b5789a373aee59d
src/views/Tools/LayerTree.vue
@@ -48,8 +48,8 @@
      >
        <span v-show="!data.isEdit">
          <span :class="[data.id >= 99 ? 'slot-t-node--label' : '']">{{
              node.label
            }}</span>
                              node.label
                            }}</span>
        </span>
        <span v-show="data.isEdit">
          <el-input
@@ -295,6 +295,7 @@
    // 定位
    async positioning() {
      this.rmListener();
      if (["Tileset", "3DML"].indexOf(this.currentData.serveType) > -1) {
        for (let i in Viewer.scene.primitives._primitives) {
          if (Viewer.scene.primitives._primitives[i].id == this.currentData.cnName) {
@@ -318,7 +319,18 @@
      }
      if ("Mpt" == this.currentData.serveType) {
        viewer.camera.flyTo({ destination: Cesium.Cartesian3.fromDegrees(101.8, 37.9, 10000000.0) }); // 中国
        if (this.currentData.json) {
          var json = JSON.parse(this.currentData.json);
          if (json.west) {
            Viewer.camera.flyTo({
              destination: Cesium.Rectangle.fromDegrees(json.west, json.south, json.east, json.north)
            })
          }
        } else {
          Viewer.camera.flyTo({ destination: Cesium.Cartesian3.fromDegrees(101.8, 37.9, 10000000.0) }); // 中国
        }
      }
    },
    // 钻孔柱状图
@@ -403,7 +415,7 @@
        }
      }
      if (obj.TMS.length) this.setChangeDEM(obj.DEM, checked);
      if (obj.DEM.length) this.setChangeDEM(obj.DEM, checked);
      if (obj.TMS.length) this.setChangeTMS(obj.TMS, checked);
      if (obj.Mpt.length) this.setChangeMpt(obj.Mpt, checked);
      if (obj.Tileset.length) this.setChangeTileset(obj.Tileset, checked);
@@ -585,12 +597,18 @@
      for (let i in layers) {
        let res = layers[i];
        if (res.url.indexOf("{host}") > -1) res.url = res.url.replace("{host}", iisHost);
        let urls = res.url.split(';')
        let layer = sgworld.Creator.createImageryProvider(res.cnName, "wms", {
        let urls = res.url.split(';');
        var ops = {
          url: urls[0],
          layers: urls[1]
        }, "0", undefined, true, "");
        };
        if (res && res.json) {
          var rs = JSON.parse(res.json);
          ops.rectangle = Cesium.Rectangle.fromDegrees(rs.west, rs.south, rs.east, rs.north);
        }
        let layer = sgworld.Creator.createImageryProvider(res.cnName, "wms", ops, "0", undefined, true, "");
        this.mptLayer.push(layer);
      }
    },