管道基础大数据平台系统开发-【前端】-新系統界面
Surpriseplus
2023-02-23 ff2afbce0f31c6f75f4930ba8db7ccb7a99556a4
src/views/Tools/maplayer.vue
@@ -5,35 +5,28 @@
      v-for="(data, index) in PopupData"
      :key="data.id"
      title="图层管理"
      :maxHeight="data.maxHeight || '500px'"
      :maxHeight="data.maxHeight || '400px'"
      @close="close(data.id)"
      :left="data.left || left"
      :top="data.top || top + index * 42 + 'px'"
    >
      <div class="treeContainer">
        <el-tree
          ref="tree"
          :data="treeData"
          show-checkbox
          node-key="id"
          draggable
          :expand-on-click-node="false"
          :auto-expand-parent="false"
          :default-expanded-keys="defaultExpanded"
          :default-checked-keys="defaultCheck"
        >
        </el-tree>
      </div>
   <div  >
    <layer-tree />
   </div>
    </Popup>
  </div>
</template>
<script>
import Popup from './Popup.vue';
import LayerTree from './LayerTree.vue'
export default {
  name: 'maplayer',
  components: {
    Popup,
    LayerTree
  },
  data() {
    return {
@@ -41,27 +34,10 @@
      PopupData: ['maplayer'],
      left: 'calc(100% - 330px)',
      top: 10,
      treeData: [],
      defaultCheck: [],
      defaultExpanded: [],
      selectNode: undefined,
      rightClickMenuDisplay: false,
      rightClickMenuStyle: {},
      isClickParent: false,
      isNewFold: false,
      newFoldName: undefined,
      mergeNode: false,
    };
  },
  computed: {},
  mounted() {
    this.treeData([
      { id: '82A0C3DE', name: '影像', children: [] },
      { id: '82C3DE', name: '地形', children: [] },
      { id: '4FE10400', name: '模型', children: [] },
      { id: '0A51CF71', name: '矢量', children: [] },
    ]);
  },
  mounted() {},
  methods: {
    // 关闭所有
    closeAll() {
@@ -72,11 +48,15 @@
    },
    // 关闭弹窗
    close(id) {
      this.$bus.$emit("treeDataCopy","true");
      let index = this.PopupData.findIndex((item) => {
        return item.id === id;
      });
      let data = this.PopupData.splice(index, 1)[0];
      data.close && data.close();
      this.$store.state.layerMnage = false;
    },
    // 打开弹窗
    open(title, value, style = {}) {
@@ -107,8 +87,3 @@
</script>
<style scoped lang="less">
.text {
  margin-left: 15px;
  margin-right: 15px;
}
</style>