管道基础大数据平台系统开发-【前端】-新系統界面
Surpriseplus
2023-05-22 ff5731b6a22c9f2451dc8065d2fa32153bdd4a1a
图层管理,空间查询修改
已修改4个文件
98 ■■■■■ 文件已修改
src/components/MapView/mapMenuTop.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/MapView/mapSpaceTop.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/mapsdk.vue 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/Tools/LayerTree.vue 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/MapView/mapMenuTop.vue
@@ -9,7 +9,7 @@
        <el-select
          v-model="menuTopFrom.queryLayer"
          :title="treeChange"
          placeholder="请选择..."
          placeholder="请选择数据..."
          :popper-append-to-body="false"
        >
          <el-option
@@ -48,7 +48,7 @@
        <el-select
          @change="changeValue($event)"
          v-model="menuTopFrom.queryType"
          placeholder="请选择..."
          placeholder="选择范围"
          :popper-append-to-body="false"
        >
          <el-option
src/components/MapView/mapSpaceTop.vue
@@ -3,7 +3,7 @@
    <el-select
      v-model="menuTopFrom.queryLayer"
      @change="menuTreeCheck"
      placeholder="请选择..."
      placeholder="请选择数据..."
      filterable
      ref="selectTree1"
    >
src/components/mapsdk.vue
@@ -78,13 +78,22 @@
              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
@@ -161,6 +170,7 @@
                <el-input
                  style="width: 160px"
                  v-model="comprehensive.name"
                  placeholder="请输入地名...."
                ></el-input>
              </el-form-item>
              <el-form-item>
@@ -738,9 +748,9 @@
        val: 50,
      },
      coordFrom: {
        lon: 116.3911,
        lat: 39.9115,
        height: 100000,
        lon: "",
        lat: "",
        height: "",
      },
      listData: {
        name: null,
@@ -1194,6 +1204,12 @@
    },
    //定位
    setCoordLocal() {
      if (!this.coordFrom.lon) {
        return this.$message('请输入经度');
      }
      if (!this.coordFrom.lat) {
        return this.$message('请输入纬度');
      }
      var lon = parseFloat(this.coordFrom.lon)
      var lat = parseFloat(this.coordFrom.lat)
      var height = parseFloat(this.coordFrom.height) == NaN ? parseFloat(this.coordFrom.height) : 100;
@@ -1201,7 +1217,7 @@
      var position = {
        X: lon,
        Y: lat,
        Altitude: 2000,
        Altitude: height,
      };
      if (this.imagePoint != null) {
        sgworld.Creator.DeleteObject(this.imagePoint);
src/views/Tools/LayerTree.vue
@@ -115,7 +115,7 @@
      <div
        class="edit"
        @click="pellucidity()"
        v-if="showlocal"
        v-if="showopaque"
      >
        <i class="el-icon-tickets"></i>&nbsp;&nbsp;透明度
      </div>
@@ -227,6 +227,7 @@
    return {
      shwoHistogram: false,
      showlocal: false,
      showopaque: false,
      eleId: "",
      isShow: false,
      currentData: "",
@@ -321,12 +322,18 @@
      }
      this.currentData = object;
      this.currentNode = Node;
      this.menuVisible = true;
      this.$store.state.propertiesName = this.currentData;
      if (this.currentData.serveType == "Tileset" || this.currentData.serveType == "3DML") {
      this.showModelAttach = false;
      this.shwoTitle = false;
      this.menuVisible = true;
      if (this.currentData.serveType == 'TMS') {
        this.shwoTitle = true
      } else if (this.currentData.serveType == "Tileset" || this.currentData.serveType == "3DML") {
        this.showModelAttach = true;
      } else {
        this.showModelAttach = false;
      } else if (this.currentData.serveType == "DEM" || this.currentData.serveType == "DOM" || this.currentData.serveType == "MPT") {
        this.menuVisible = false;
      }
      if (this.currentData.enName == "s_explorationpoint") {
        this.shwoHistogram = true;
@@ -341,16 +348,13 @@
      }
      if (Node.data.children == null && Node.data.serveType == "Tileset" || Node.data.serveType == "3DML") {
        this.showlocal = true;
      } else if (Node.data.children == null && Node.data.serveType != "Tileset" || Node.data.serveType == "3DML") {
        this.showopaque = true;
      } else if (Node.data.children == null && Node.data.serveType == "TMS") {
        this.showlocal = true;
        this.showopaque = false;
      } else if (Node.data.children == null && Node.data.serveType != "Tileset") {
        this.showlocal = false;
      }
      if (Node.data.serveType == "DEM") {
        this.firstLevel = true;
        this.menuVisible = false
        this.showopaque = false;
      }
@@ -492,13 +496,23 @@
    //模型定位
    positioning() {
    async positioning() {
      this.menuVisible = false
      for (var i in Viewer.scene.primitives._primitives) {
        if (
          Viewer.scene.primitives._primitives[i].id == this.currentData.cnName
        ) {
          Viewer.flyTo(Viewer.scene.primitives._primitives[i]);
      if (this.currentData.serveType == 'Tileset' || this.currentData.serveType == '3DML') {
        for (var i in Viewer.scene.primitives._primitives) {
          if (
            Viewer.scene.primitives._primitives[i].id == this.currentData.cnName
          ) {
            Viewer.flyTo(Viewer.scene.primitives._primitives[i]);
          }
        }
      } else if (this.currentData.serveType == 'TMS' && this.currentData.pubid) {
        const data = await comprehensive_selectPubById({ id: this.currentData.pubid })
        if (data.result.geom) {
          var wkt = this.$wkt.parse(data.result.geom);
          Viewer.camera.flyTo({
            destination: Cesium.Cartesian3.fromDegrees(wkt.coordinates[1], wkt.coordinates[0], 2000),
          });
        }
      }
    },
@@ -1043,10 +1057,10 @@
        layer.name = res.cnName;
        if (data.result.geom) {
          var wkt = this.$wkt.parse(data.result.geom);
          Viewer.camera.flyTo({
            destination: Cesium.Cartesian3.fromDegrees(wkt.coordinates[1], wkt.coordinates[0], 2000),
          });
          // var wkt = this.$wkt.parse(data.result.geom);
          // Viewer.camera.flyTo({
          //   destination: Cesium.Cartesian3.fromDegrees(wkt.coordinates[1], wkt.coordinates[0], 2000),
          // });
        }
        this.setChangeWMS();
      }