shuishen
2022-03-18 bf58722dfd03ea1513f3acc7331d4d4403fca76e
src/components/orgNavBar/index.vue
@@ -3,15 +3,15 @@
        <template slot="public-box-header">
            <div class="title">
                <img class="icon deblurring" src="/img/icon/jg.png" alt />
                <span>{{orgNavBarTitle}}</span>
                <span>{{ orgNavBarTitle }}</span>
            </div>
            <img class="close" src="/img/navicon/close.png" alt @click="closeModel" />
            <img class="close deblurring" src="/img/navicon/close.png" alt @click="closeModel" />
        </template>
        <template slot="public-box-content">
            <ul>
                <li v-for="(item, index) in orgNavBarList" :key="index" @click="mapPopup(item)">
                    <img :src="item.icon" alt />
                    <span>{{item.navTitle}}</span>
                    <span>{{ item.navTitle }}</span>
                </li>
            </ul>
        </template>
@@ -25,15 +25,12 @@
    name: 'OrgNavBar',
    data () {
        return {
            DC: null
        }
    },
    created () {
        this.DC = global.DC
    },
    computed: {
        ...mapGetters([
            'viewer',
            'popupBgUrl',
            'pupupQRUrl',
            // 点信息
@@ -55,10 +52,17 @@
            this.$store.commit('CLEAR_ALL', null)
            var imgArr = item.bgImg.split(',')
            this.$store.commit('SET_POPUPBGURL', imgArr[0])
            this.$store.commit('SET_POPUPQRURL', item.QRImg)
            this.$store.commit('SET_POINTPOSITION', [Number(item.longitude), Number(item.latitude), Number(item.alt), Number(item.heading), Number(item.pitch), Number(item.roll)])
            this.$store.commit('SET_POINTPOSITION', [
                Number(item.longitude),
                Number(item.latitude),
                Number(item.alt),
                Number(item.heading),
                Number(item.pitch),
                Number(item.roll)
            ])
            this.$store.commit('SET_STATENAME', item.navTitle)
            this.$store.commit('SET_SITENAME', item.address)
            this.$store.commit('SET_TELEPHONE', item.telephone)
@@ -69,22 +73,32 @@
            }
            this.newPopup(item)
            this.viewer.flyToPosition(
                new this.DC.Position(Number(item.longitude), Number(item.latitude), 300, Number(item.heading), Number(item.pitch), Number(item.roll)),
                function () {
                },
            global.viewer.flyToPosition(
                new global.DC.Position(
                    Number(item.longitude),
                    Number(item.latitude),
                    300,
                    Number(item.heading),
                    Number(item.pitch),
                    Number(item.roll)
                ),
                function () { },
                3
            )
        },
        newPopup (item) {
            const position = this.DC.Transform.transformWGS84ToCartesian(new this.DC.Position(Number(item.longitude), Number(item.latitude), Number(item.alt)))
            const position = global.DC.Transform.transformWGS84ToCartesian(
                new global.DC.Position(
                    Number(item.longitude),
                    Number(item.latitude),
                    Number(item.alt)
                )
            )
            // eslint-disable-next-line no-unused-vars
            var popup = new this.DC.DivForms(this.viewer, {
            var popup = new global.DC.DivForms(global.viewer, {
                domId: 'divFormsDomBox',
                position: [
                    position
                ]
                position: [position]
            })
            this.$store.commit('SET_PANORAMAPOPUP', false)
@@ -100,14 +114,15 @@
            }
            this.$store.commit('SET_ORGNAVBARTITLE', '')
            this.$store.commit('SET_ORGNAVBARFLAG', false)
            this.$store.commit('SET_ORGNAVBARLIST', [])
            this.$store.commit('SET_DETAILSPOPUP', false)
            this.$store.commit('SET_PANORAMAPOPUP', false)
            this.$store.commit('SET_MONITORPOPUP', false)
        }
    }
}
</script>
<style scoped lang='scss'>
</style>
<style scoped lang="scss"></style>