校园-江西科技师范大学-前端
shuishen
2023-12-14 e733164e1c779b3aef7245936b9daf7875bf791e
解决屏幕缩放导致鼠标位置不准确的问题,右侧,切换校区后的显示BUG
5 files modified
48 ■■■■■ changed files
src/components/leftNav/index.vue 8 ●●●● patch | view | raw | blame | history
src/components/map/index.vue 18 ●●●●● patch | view | raw | blame | history
src/components/mobileLeftNav/index.vue 8 ●●●●● patch | view | raw | blame | history
src/components/mobilemap/index.vue 3 ●●●● patch | view | raw | blame | history
src/pcLayout/index.vue 11 ●●●● patch | view | raw | blame | history
src/components/leftNav/index.vue
@@ -269,10 +269,16 @@
        },
        initialize (campus) {
            var that = this
            that.$nextTick(() => {
                this.leftNavData = this.leftNavData.map(item => {
                    return {
                        ...item,
                        flag: false,
                        img: item.normal
                    }
                })
                this.leftNavData[0].flag = true
                this.leftNavData[0].img = this.leftNavData[0].checked
src/components/map/index.vue
@@ -40,7 +40,6 @@
import { Icon, Style, Fill, Text, Stroke, Circle } from 'ol/style.js'
import TilegridTileGrid from "ol/tilegrid/TileGrid"
let architecturePolygon = null
let select = null
@@ -216,8 +215,9 @@
    mounted () {
        const that = this
        this.map2D.setTarget('viewer-container')
        this.$nextTick(() => {
            this.map2D.setTarget('viewer-container')
            that.map2D.on('pointermove', that.mouseMoveEvent)
            this.map2D.on("singleclick", function (event) {
@@ -226,7 +226,7 @@
                let flag = true
                that.map2D.forEachFeatureAtPixel(
                    event.pixel,
                    [event.originalEvent.offsetX, event.originalEvent.offsetY],
                    (feature) => {
                        if (flag == false) {
                            return
@@ -305,7 +305,7 @@
            select = null
            that.map2D.forEachFeatureAtPixel(
                event.pixel,
                [event.originalEvent.offsetX, event.originalEvent.offsetY],
                (feature) => {
                    if (flag == false) {
                        return
@@ -363,15 +363,17 @@
                if (JSON.stringify(res.data.data) == '{}') return
                let result = res.data.data
                let curLngLat = this.map2D.getCoordinateFromPixel([event.event.originalEvent.offsetX, event.event.originalEvent.offsetY])
                this.$store.dispatch('setOurDataInPoput', {
                    item: result,
                    lng: event.event.coordinate[0],
                    lat: event.event.coordinate[1]
                    lng: curLngLat[0],
                    lat: curLngLat[1]
                })
                this.openPopups({
                    lng: Number(event.event.coordinate[0]),
                    lat: Number(event.event.coordinate[1]),
                    lng: Number(curLngLat[0]),
                    lat: Number(curLngLat[1]),
                    item: result,
                    event
                })
src/components/mobileLeftNav/index.vue
@@ -274,6 +274,14 @@
        initialize (campus) {
            var that = this
            this.leftNavData = this.leftNavData.map(item => {
                return {
                    ...item,
                    flag: false,
                    img: item.normal
                }
            })
            this.leftNavData[0].flag = true
            this.leftNavData[0].img = this.leftNavData[0].checked
            this.leftNavData[4].flag = true
src/components/mobilemap/index.vue
@@ -34,7 +34,7 @@
        <!-- 控制↑ -->
        <!-- 控制大弹窗的弹窗 -->
        <!-- v-if="mBigPopupAfter" -->
        <mobilePopupOurAfter></mobilePopupOurAfter>
        <mobilePopupOurAfter ref="MobilePopupOurAfter"></mobilePopupOurAfter>
        <!-- 大弹窗 -->
        <mobilePopupOur :style="[bigPopup]" v-if="mBigPopup"></mobilePopupOur>
        <!-- 测试-跳转位置 -->
@@ -438,6 +438,7 @@
        },
        handleCommand (command) {
            this.$refs.MobilePopupOurAfter.closeBigPopupAfter()
            this.setCampusValue(command.dictKey)
        },
src/pcLayout/index.vue
@@ -63,11 +63,12 @@
                            <el-menu-item index="/pcLayout/default/service/alleyway">出入口</el-menu-item>
                        </el-submenu>
                        <!-- <el-menu-item index="/pcLayout/default/campusnav"> <i class='custom-icon menu-xydl'></i> 校园导览</el-menu-item> -->
                        <!-- <el-menu-item index="/pcLayout/default/campusnav"> <i class='custom-icon menu-xydl'></i>
                            校园导览</el-menu-item> -->
                        <!-- <el-menu-item index="/pcLayout/default/campusnavi">
                        <el-menu-item index="/pcLayout/default/campusnavi">
                            <i class="custom-icon menu-xydh"></i> 校园导航
                        </el-menu-item> -->
                        </el-menu-item>
                        <!-- <el-submenu index="specialmap">
                            <template slot="title">
@@ -77,7 +78,7 @@
                            <el-menu-item index="/pcLayout/default/specialmap/welcome?name=校园迎新">校园迎新</el-menu-item>
                        </el-submenu> -->
                        <!-- <el-submenu index="tool">
                        <el-submenu index="tool">
                            <template slot="title">
                                <i class="custom-icon menu-tool"></i> 工具
                            </template>
@@ -86,7 +87,7 @@
                            <el-menu-item index="/pcLayout/default/tool/ranging">地图测距</el-menu-item>
                            <el-menu-item index="/pcLayout/default/tool/area">地图测面</el-menu-item>
                            <el-menu-item index="/pcLayout/default/tool/layer-manage">图层管理</el-menu-item>
                        </el-submenu> -->
                        </el-submenu>
                        <!-- <el-submenu index="technique">
                        <template slot="title">