校园-江西科技师范大学-前端
shuishen
2023-12-04 90d2818e8140e05855e3ad596a6a0982cdd4b807
校区切换,弹窗显隐逻辑处理
1 files modified
28 ■■■■■ changed files
src/components/map/index.vue 28 ●●●●● patch | view | raw | blame | history
src/components/map/index.vue
@@ -59,7 +59,8 @@
        fullExtent: [
            112.51302281804038, -0.17416638494176828, 112.76131189483516,
            0.000004509395743004334,
        ]
        ],
        polygonUrl: 'https://fkxt.jxstnu.edu.cn/changjing/lkarcgisapp'
    },
    {
        key: 2,
@@ -73,7 +74,8 @@
        ],
        fullExtent: [
            115.76861782444642, 28.63584422760626, 115.82432471553928, 28.663308794331794,
        ]
        ],
        polygonUrl: ''
    }
]
@@ -159,10 +161,17 @@
                this.campusCut(newData)
                this.$nextTick(() => {
                    this.$refs.leftNav.initialize(newData)
                    this.$store.commit('SET_DETAILSPOPUP', false)
                    this.$store.commit('SET_MONITORPOPUP', false)
                    this.$store.commit('SET_PANORAMAPOPUP', false)
                    this.$store.commit('SET_ARCNAVBARFLAG', false)
                    this.$store.commit('SET_SEARCHPOPUPFLAG', false)
                    this.$store.commit('SET_SEARCHPOPUPFLAG', false)
                    this.$refs.leftNav.initialize(newData)
                    this.createdLayers(newData)
                })
            }
        }
@@ -203,10 +212,6 @@
        const that = this
        this.map2D.setTarget('viewer-container')
        this.$nextTick(() => {
            this.$refs.leftNav.initialize()
            this.createdLayers()
            that.map2D.on('pointermove', that.mouseMoveEvent)
            this.map2D.on("singleclick", function (event) {
@@ -228,8 +233,13 @@
        })
    },
    methods: {
        createdLayers () {
        createdLayers (campusKey) {
            const that = this
            let curCampus = campusLayers.find(item => item.key == campusKey)
            if (architecturePolygon) {
                this.map2D.removeLayer(architecturePolygon)
            }
            architecturePolygon = new VectorLayer({
                // 图标图层
@@ -240,7 +250,7 @@
            axios
                .get(
                    'https://fkxt.jxstnu.edu.cn/changjing/lkarcgisapp?where=1%3D1&text=&objectIds=&time=&geometry=&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelIntersects&relationParam=&outFields=*&returnGeometry=true&maxAllowableOffset=&geometryPrecision=&outSR=&returnIdsOnly=false&returnCountOnly=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=&returnZ=false&returnM=false&gdbVersion=&returnDistinctValues=false&returnTrueCurves=false&resultOffset=&resultRecordCount=&f=pjson'
                    curCampus.polygonUrl + '?where=1%3D1&text=&objectIds=&time=&geometry=&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelIntersects&relationParam=&outFields=*&returnGeometry=true&maxAllowableOffset=&geometryPrecision=&outSR=&returnIdsOnly=false&returnCountOnly=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=&returnZ=false&returnM=false&gdbVersion=&returnDistinctValues=false&returnTrueCurves=false&resultOffset=&resultRecordCount=&f=pjson'
                )
                .then((resultData) => {
                    resultData.data.features.forEach((item) => {