管道基础大数据平台系统开发-【前端】-新系統界面
Surpriseplus
2023-02-06 4e3d77dcbe421a4d6611ebcdd1ac3165cb36ad4b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<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(100% - 960px)"
      top="calc(100% - 470px) "
    >
      <div>
        <div style="width:940px;height:400px;">
 
          <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'" />
        </div>
      </div>
    </Popup>
  </div>
</template>
 
<script>
import Popup from './Popup.vue';
import mapMenuPop from '../../components/MapView/mapMenuPop.vue';
import mapSpacePop from '../../components/MapView/mapSpacePop.vue';
import pipeLineAnaly from './pipeLineAnaly.vue'
export default {
  name: 'queryinfo',
 
  components: {
    Popup,
    mapMenuPop,
    mapSpacePop,
    pipeLineAnaly
  },
  data() {
    return {
      // 弹窗数据
      PopupData: ['queryinfo'],
      left: 'calc(100% - 600px)',
      top: 'calc(100% - 10px)',
    };
  },
  computed: {},
  mounted() {
 
 
 
  },
  methods: {
    // 关闭所有
    closeAll() {
      this.PopupData.forEach((item) => {
        item.close && item.close();
      });
      this.PopupData = [];
    },
    // 关闭弹窗
    close(id) {
      let index = this.PopupData.findIndex((item) => {
        return item.id === id;
      });
      let data = this.PopupData.splice(index, 1)[0];
      data.close && data.close();
    },
    // 打开弹窗
    open(title, value, style = {}) {
      this.PopupData.push({
        id: this.createRandomId(),
        title,
        value,
        ...style,
      });
      let index = this.PopupData.length - 1;
      this.$nextTick(() => {
        this.$refs.pop[index].open();
      });
      return this.PopupData[index];
    },
    // 随机id
    createRandomId() {
      return (
        (Math.random() * 10000000).toString(16).substr(0, 4) +
        '-' +
        new Date().getTime() +
        '-' +
        Math.random().toString().substr(2, 5)
      );
    },
  },
};
</script>