shuishen
2023-03-07 d7bbfe6156fa57f9ce5b1771a9c09498faaf91a9
视角开关锁定
2 files modified
48 ■■■■ changed files
src/components/map/index.vue 27 ●●●●● patch | view | raw | blame | history
src/styles/media/index.scss 21 ●●●● patch | view | raw | blame | history
src/components/map/index.vue
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2022-08-18 17:00:30
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2023-03-07 10:56:33
 * @LastEditTime: 2023-03-07 11:18:45
 * @FilePath: \srs-police-affairs\src\components\map\index.vue
 * @Description: 公用地图组件
 * 
@@ -54,6 +54,9 @@
                            <span :class="{ on: tilesetLayerType == 'high' }">高精</span>
                        </div>
                    </div>
                </div>
                <div class="angle-btn">
                    是否锁定视角:<el-checkbox v-model="angleCheck" @change="angleChange"></el-checkbox>
                </div>
            </div>
        </div>
@@ -206,7 +209,8 @@
            carTotal: 0,
            showImgBtn: false,
            imgtype: 0,
            tilesetLayerType: ''
            tilesetLayerType: '',
            angleCheck: true
        }
    },
@@ -525,6 +529,25 @@
    },
    methods: {
        angleChange (e) {
            if (e) {
                global.viewer.camera.flyTo({
                    destination: global.viewer.camera.position,
                    orientation: {
                        heading: global.viewer.camera.heading,
                        pitch: -45,
                        roll: global.viewer.camera.roll
                    },
                    duration: 0.0
                })
                global.viewer.setPitchRange(-90, -45)
            } else {
                global.viewer.setPitchRange(-90, 0)
            }
            this.showImgBtn = false
        },
        /**
         * @description: 高精度模型和轻量模型切换
         * @param {*} type
src/styles/media/index.scss
@@ -2509,10 +2509,25 @@
                        }
                    }
                    .layer-change-box:last-child {
                        margin-bottom: countSizeVw(8, 1920);
                    }
                    .angle-btn {
                        padding: 0 countSizeVw(8, 1920);
                        height: countSizeVh(32);
                        text-align: left;
                        display: flex;
                        align-items: center;
                        .el-checkbox {
                            width: countSizeVh(20);
                            height: countSizeVh(20);
                            .el-checkbox__input {
                                width: countSizeVh(20);
                                height: countSizeVh(20);
                            }
                        }
                    }
                }
                .equiment-details-box {