管道基础大数据平台系统开发-【前端】-新系統界面
1
13693261870
2023-05-22 616d916965c528861d495b3a24c22877e7c10312
src/views/Tools/queryinfo.vue
@@ -1,20 +1,16 @@
<template>
  <div class="InfoPopup">
    <Popup
      ref="pop"
      v-for="(data, index) in PopupData"
      :key="data.id"
      :title="data.title || '提示'"
      maxHeight="400"
      @close="close(data.id)"
      left="calc(90% - 900px)"
      top="calc(100% - 470px) "
    >
    <Popup ref="pop"
           v-for="(data, index) in PopupData"
           :key="data.id"
           :title="data.title || '提示'"
           maxHeight="400"
           @close="close(data.id)"
           left="calc(90% - 900px)"
           top="calc(100% - 470px) ">
      <div>
        <div
          style="width:940px;height:400px;"
          v-drag
        >
        <div style="width:940px;height:400px;"
             v-drag>
          <map-menu-pop v-if="$store.state.mapPopBoxFlag == '1'" />
          <map-space-pop v-if="$store.state.mapPopBoxFlag == '2'" />
          <pipe-line-analy v-if="$store.state.mapPopBoxFlag == '3'" />
@@ -41,7 +37,7 @@
    pipeLineAnaly,
    mapPickUpPop
  },
  data() {
  data () {
    return {
      // 弹窗数据
      PopupData: ['queryinfo'],
@@ -50,11 +46,7 @@
    };
  },
  computed: {},
  mounted() {
  },
  mounted () { },
  directives: {
    drag: {
      inserted: function (el) {
@@ -65,7 +57,8 @@
          const disX = e.clientX;
          const w = dragDom.clientWidth;
          const minW = 500;
          const maxW = 940;
          const maxW = 1024;
          var nw;
          document.onmousemove = function (e) {
            // 通过事件委托,计算移动的距离
@@ -87,14 +80,14 @@
  },
  methods: {
    // 关闭所有
    closeAll() {
    closeAll () {
      this.PopupData.forEach((item) => {
        item.close && item.close();
      });
      this.PopupData = [];
    },
    // 关闭弹窗
    close(id) {
    close (id) {
      let index = this.PopupData.findIndex((item) => {
        console.log(item);
        return item.id === id;
@@ -105,7 +98,6 @@
        for (var i in this.$store.state.pipelineEntity) {
          sgworld.Viewer.entities.remove(this.$store.state.pipelineEntity[i]);
        }
      }
      if (this.$store.state.primitLayer != null) {
        sgworld.Viewer.entities.remove(this.$store.state.primitLayer);
@@ -133,7 +125,7 @@
      this.$store.state.histLenged = false;
    },
    // 打开弹窗
    open(title, value, style = {}) {
    open (title, value, style = {}) {
      this.PopupData.push({
        id: this.createRandomId(),
        title,
@@ -147,7 +139,7 @@
      return this.PopupData[index];
    },
    // 随机id
    createRandomId() {
    createRandomId () {
      return (
        (Math.random() * 10000000).toString(16).substr(0, 4) +
        '-' +
@@ -156,12 +148,10 @@
        Math.random().toString().substr(2, 5)
      );
    },
    mouseDown(event) {
    mouseDown (event) {
      // document.addEventListener("mousemove", this.mouseMove);
      // this.lastX = event.screenX;
    },
  },
};
</script>
</script>