liuyg
2021-12-21 81773ab04fd259e893c2d7f08dbdc9be772d01c4
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<template>
  <div
    ref="mobile-mapContentContent"
    v-show="!MobileWindowsHide"
    id="mobile-map_content_content"
  >
    <div class="mobiletitle">{{ title }}</div>
    <div class="mobilelabel-content">
      <div class="mobile-popup-imgs-heard">
        <div class="mobile-popup-imgs-h-close">
          <i class="el-icon-circle-close icon" @click="closeWindow"></i>
        </div>
        <img :src="url" alt="" />
        <el-image
          style="width: 100px; height: 100px"
          :src="url"
          id="mobileBigImgs"
          v-show="false"
          :preview-src-list="srcList"
        >
        </el-image>
        <!-- <div>{{ query.query }}</div> -->
        <div class="mobileBig-center-our">
          <div
            v-for="(item, index) in center"
            :key="index"
            class="mobileBig-center"
          >
            <div class="m-c-title">{{ item.name }}:</div>
            <span class="m-c-center">{{ item.value }}</span>
          </div>
        </div>
      </div>
      <div class="mobile-popup-control">
        <div v-for="(item, index) in seebut" :key="index">
          <el-link
            :icon="
              item.name == '实景'
                ? 'el-icon-place'
                : item.name == '图集'
                ? 'el-icon-data-board'
                : item.name == '去这'
                ? 'el-icon-finished'
                : ''
            "
            class="mobilePopupOurOnce_r_d_in"
            @click="openOnce(item.name)"
            >{{ item.name }}</el-link
          >
          <el-divider
            direction="vertical"
            class="mobilePopupOurOnce_r_d_in"
            v-if="index != seebut.length - 1"
          ></el-divider>
        </div>
      </div>
    </div>
  </div>
</template>
 
<script>
import { mapGetters } from "vuex";
export default {
  name: "mobileWindow",
  computed: {
    ...mapGetters(["MobileWindowsHide", "query", "MobileWindowChangeData"]),
  },
  watch: {
    MobileWindowChangeData() {
      //   this.fullscreenLoading = true;
      if (!this.MobileWindowsHide) {
        // console.log("地图点击弹窗数据请求参数", this.query);
        this.title = this.query.query.name;
        if (this.query.query.bgImg) {
          this.srcList = this.query.query.bgImg.split(",");
          this.url = this.srcList[0];
        }
        if (this.query.query.seebut) {
          this.seebut = this.query.query.seebut;
          for (let k in this.seebut) {
            if (this.seebut[k].name == "定位") {
              this.seebut.splice(k, k + 1);
            }
          }
          this.seebut.push({
            name: "去这",
          });
        } else {
          this.seebut = [
            {
              name: "实景",
            },
            {
              name: "图集",
            },
            {
              name: "去这",
            },
          ];
        }
        this.center = [];
        for (let k in this.query.query) {
          for (let n in this.getCenter) {
            if (k == this.getCenter[n].name && this.query.query[k]) {
              this.center.push({
                name: this.getCenter[n].value,
                value: this.query.query[k] ? this.query.query[k] : "暂无",
              });
            }
          }
        }
      }
    },
  },
  data() {
    return {
      getCenter: [
        {
          name: "websiteUrl",
          value: "网址",
        },
        {
          name: "telePhone",
          value: "电话",
        },
        {
          name: "address",
          value: "地址",
        },
        {
          name: "introduce",
          value: "详情",
        },
      ],
      title: "",
      fullscreenLoading: false,
      url: "/img/job/one.jpg",
      positions: "",
      srcList: [],
      seebut: [],
      center: [],
    };
  },
  methods: {
    openOnce(val) {
      let that = this;
      // console.log(val, this.onceData);
      if (val == "去这") {
        //定位
      } else if (val == "实景") {
        this.$store.commit(
          "MSET_OPENMOBILEPANORAMA",
          "https://www.kuleiman.com/110487/index.html?m=1"
        );
      } else if (val == "图集") {
        let imgsDom = document.getElementById("mobileBigImgs");
        imgsDom.click();
      }
    },
    closeWindow() {
      if (!this.MobileWindowsHide) {
        this.$store.dispatch("closeMobileWindowsDom"); //关闭随地图弹窗
      }
    },
  },
};
</script>
 
<style>
</style>