校园-江西科技师范大学-前端
shuishen
2023-12-14 e733164e1c779b3aef7245936b9daf7875bf791e
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
<template>
    <div ref="mobile-mapContentContent-fixed" v-show="!MobileWindowsHideFixed" id="mobile-map_content_content-fixed">
        <div class="mobiletitle-close-fixed" @click="close">
            <i class="el-icon-circle-close icon"></i>
        </div>
        <div class="mobiletitle-fixed">{{ title || "暂无数据" }}</div>
        <div class="mobile-popup-imgs-heard-fixed">
            <img :src="url" alt />
            <el-image style="width: 100px; height: 100px" :src="url" id="mobileBigImgsFixed" v-show="false"
                :preview-src-list="srcList"></el-image>
            <!-- <div>{{ query.query }}</div> -->
            <div v-for="(item, index) in center" :key="index" class="mobileBig-center-fiexd">
                <div class="m-c-f-title">{{ item.name }}:</div>
                <div class="m-c-f-center">{{ item.value }}</div>
            </div>
        </div>
        <div class="mobile-popup-control-fixed">
            <div v-for="(item, index) in seebut" :key="index" class="m-p-c-f-once">
                <el-link icon="el-icon-map-location" class="mobilePopupOurOnce_r_d_in" @click="openOnce(item.name)">{{
                    item.name }}</el-link>
                <el-divider direction="vertical" class="mobilePopupOurOnce_r_d_in mobilePopupOurOnce_r_d_in-gan"
                    v-if="index != seebut.length - 1"></el-divider>
            </div>
        </div>
    </div>
</template>
 
<script>
import { mapGetters } from 'vuex'
export default {
    name: 'mobileWindowFixed',
    computed: {
        ...mapGetters([
            'MobileWindowsHideFixed',
            'query',
            'MobileWindowChangeDataFixed'
        ])
    },
    watch: {
        MobileWindowChangeDataFixed () {
            console.log(this.query)
            if (!this.MobileWindowsHideFixed) {
                this.center = []
                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 (const k in this.seebut) {
                        if (this.seebut[k].name == '定位') {
                            this.seebut.splice(k, k + 1)
                        }
                    }
                    this.seebut.push({
                        name: '去这'
                    })
                }
                for (const k in this.query.query) {
                    if (k == 'websiteurl') {
                        this.center.push({
                            name: '网址',
                            value: this.query.query[k]
                        })
                    }
                }
            }
        }
    },
    data () {
        return {
            title: '',
            fullscreenLoading: false,
            url: '/changjing/img/job/one.jpg',
            positions: '',
            srcList: [],
            seebut: [],
            center: [
                {
                    name: '网址',
                    value: '123'
                }
            ]
        }
    },
    methods: {
        close () {
            if (!this.MobileWindowsHideFixed) {
                this.$store.dispatch('CLOSE_WIDOWFIXED') // 关闭固定弹窗
            }
        },
        openOnce (val) {
            const that = this
            // console.log(val, this.onceData);
            if (val == '去这') {
                // 定位
            } else if (val == '实景') {
                this.$store.commit('MSET_OPENMOBILEPANORAMA', true)
            } else if (val == '图集') {
                const imgsDom = document.getElementById('mobileBigImgsFixed')
                imgsDom.click()
            }
        }
    }
}
</script>
 
<style lang="scss" scoped></style>