管道基础大数据平台系统开发-【前端】-新系統界面
Surpriseplus
2023-02-20 b04816ec6bffbdc84dfe44aff256ec38f49e4dcf
src/views/Tools/LayerTree.vue
@@ -70,6 +70,12 @@
      >
        <i class="el-icon-edit"></i>&nbsp;&nbsp;修改节点
      </div>
      <div
        class="edit"
        @click="showLayerAttribute()"
      >
        <i class="el-icon-edit"></i>&nbsp;&nbsp;属性
      </div>
      <!-- <div
        class="edit"
        @click="menuMoveF( 'up')"
@@ -137,6 +143,7 @@
        >确 定</el-button>
      </span>
    </el-dialog>
     <queryinfo ref="queryinfo" />
  </div>
</template>
@@ -146,7 +153,7 @@
import Image from 'ol/layer/Image';
import GeoJSON from 'ol/format/GeoJSON.js';
import Map from 'ol/Map.js';
import queryinfo from './queryinfo.vue';
import { Vector as VectorSource } from "ol/source";
import { Vector as VectorLayer, } from "ol/layer";
@@ -155,6 +162,7 @@
import { perms_selectLayers } from '../../api/api.js'
export default {
  name: 'tree',
    components: {  queryinfo },
  data() {
    return {
      eleId: '',
@@ -332,7 +340,29 @@
      this.$refs.tree.remove(this.currentNode);
    },
    //属性显示
    showLayerAttribute(data) {
      this.foo();
      this.currentData = data ? data : this.currentData;
      var layer = this.currentData.layer.replaceAll('_', "");
      this.$store.state.mapSpaceQueryLayer = layer;
      // this.$store.state.mapPopBoolean = true;
      this.$store.state.mapPopBoxFlag = '2';
      this.$refs && this.$refs.queryinfo && this.$refs.queryinfo.close();
      this.$refs && this.$refs.queryinfo && this.$refs.queryinfo.open("属性", null, {
        close: () => {
          if (this.$store.state.primitLayer != null) {
            sgworld.Creator.DeleteObject(this.$store.state.primitLayer);
            this.$store.state.primitLayer = null;
          }
          if (window.Viewer.scene.primitives.length != 0) {
            window.Viewer.scene.primitives.removeAll()
          }
        }
      });
    },
    // 编辑节点
    editNode(data) {
@@ -536,6 +566,7 @@
        return this.$message.error("图层列表查询失败");
      }
      this.newData = data.result;
      this.oriData = data.result;
      var std = [];
@@ -553,6 +584,7 @@
        } else if (data.result[i].type == 2) {
          if (data.result[i].url != null) {
            var layer_entity = {
              id: data.result[i].id,
              pid: data.result[i].pid,
@@ -560,6 +592,7 @@
              resource: data.result[i].url,
              type: data.result[i].type,
              isEdit: false,
              layer: data.result[i].enName,
              layerType: data.result[i].serveType
            }
            layer_list.push(layer_entity)