mayisheng
2022-08-06 55a073e6dba5d3c7cd72f3699593cb547f7e9cf8
src/components/arcNavBar/index.vue
@@ -60,7 +60,8 @@
            // 全景地址
            'panoramaUrl',
            'arcNavBarTitle',
            'arcNavBarCode'
            'arcNavBarCode',
            'twoOrThree'
        ])
    },
    created () {
@@ -127,24 +128,16 @@
        mapPopup (param) {
            getChildNavDetail({ id: param.id }).then((res) => {
                var result = res.data.data[0].list
                this.$store.commit('CLEAR_ALL', null)
                var imgArr = result.tpurl.split(',')
                const position = this.coordinate(result.x)
                console.log(position)
                this.$store.commit('SET_POPUPBGURL', imgArr[0])
                this.$store.commit('SET_POPUPQRURL', result.codeurl)
                this.$store.commit('SET_POINTPOSITION', [
                    Number(position.lng),
                    Number(position.lat),
                    Number(result.gd),
                    Number(result.heading),
                    Number(result.pitch),
                    Number(result.roll)
                ])
                this.$store.commit('SET_STATENAME', result.mechanismname)
                this.$store.commit('SET_SITENAME', result.address)
                this.$store.commit('SET_TELEPHONE', result.telephone)
@@ -169,26 +162,75 @@
                }
                this.newPopup(result, position)
                global.viewer.flyToPosition(
                    new global.DC.Position(
                if (this.twoOrThree == '三 维') {
                    this.$store.commit('SET_POINTPOSITION', [
                        Number(position.lng),
                        Number(position.lat),
                        300,
                        Number(result.gd),
                        Number(result.heading),
                        Number(result.pitch),
                        Number(result.roll)
                    ),
                    function () { },
                    3
                )
                    ])
                    global.viewer.flyToPosition(
                        new global.DC.Position(
                            Number(position.lng),
                            Number(position.lat),
                            300,
                            Number(result.heading),
                            Number(result.pitch),
                            Number(result.roll)
                        ),
                        function () { },
                        3
                    )
                } else {
                    this.$store.commit('SET_POINTPOSITION', [
                        Number(result.jd),
                        Number(result.wd),
                        Number(result.gd),
                        Number(result.heading),
                        Number(result.pitch),
                        Number(result.roll)
                    ])
                    global.viewer.flyToPosition(
                        new global.DC.Position(
                            Number(result.jd),
                            Number(result.wd),
                            300,
                            Number(result.heading),
                            Number(result.pitch),
                            Number(result.roll)
                        ),
                        function () { },
                        3
                    )
                }
            })
        },
        newPopup (item, positionArr) {
            const position = global.DC.Transform.transformWGS84ToCartesian(
                new global.DC.Position(Number(positionArr.lng),
                    Number(positionArr.lat), Number(item.gd))
            )
            let position
            if (this.twoOrThree == '三 维') {
                position = global.DC.Transform.transformWGS84ToCartesian(
                    new global.DC.Position(
                        Number(positionArr.lng),
                        Number(positionArr.lat),
                        Number(item.alt)
                    )
                )
            } else {
                position = global.DC.Transform.transformWGS84ToCartesian(
                    new global.DC.Position(
                        Number(item.jd),
                        Number(item.wd),
                        Number(50)
                    )
                )
            }
            // eslint-disable-next-line no-unused-vars
            var popup = new global.DC.DivForms(global.viewer, {
                domId: 'divFormsDomBox',