guanqb
2022-12-08 f7b1a0f74ba4251c0c000eeca098a1fdf6800e32
Merge branch 'master' of http://192.168.0.105:10010/r/srs-police-affairs
3 files modified
1 files added
117 ■■■■ changed files
src/components/map/index.vue 42 ●●●●● patch | view | raw | blame | history
src/styles/media/index.scss 43 ●●●●● patch | view | raw | blame | history
src/views/house/1.js 14 ●●●●● patch | view | raw | blame | history
src/views/house/index.vue 18 ●●●●● 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: 2022-12-08 10:02:24
 * @LastEditTime: 2022-12-08 11:22:32
 * @FilePath: \srs-police-affairs\src\components\map\index.vue
 * @Description: 公用地图组件
 * 
@@ -194,22 +194,34 @@
            // )
            // 设置地图初始位置,角度等
            global.viewer.camera.setView({
                // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州
                // fromDegrees()方法,将经纬度和高程转换为世界坐标
                destination: global.DC.Namespace.Cesium.Cartesian3.fromDegrees(
                    116.112550, 28.196631, 50000
                ),
                orientation: {
                    // 指向
                    heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0),
                    // 视角
                    pitch: global.DC.Namespace.Cesium.Math.toRadians(-45),
                    roll: 0.0
                }
            // global.viewer.camera.setView({
            //     // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州
            //     // fromDegrees()方法,将经纬度和高程转换为世界坐标
            //     destination: global.DC.Namespace.Cesium.Cartesian3.fromDegrees(
            //         116.112550, 28.196631, 50000
            //     ),
            //     orientation: {
            //         // 指向
            //         heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0),
            //         // 视角
            //         pitch: global.DC.Namespace.Cesium.Math.toRadians(-45),
            //         roll: 0.0
            //     }
            // })
            let sqTitleLayer = new global.DC.TilesetLayer('sqTitleLayer')
            global.viewer.addLayer(sqTitleLayer)
            let sqTileset = new global.DC.Tileset(
                'http://192.168.0.112:18080/sf3d/361102/model/wanda/tileset.json'
            )
            sqTileset.setHeight(0)
            sqTitleLayer.addOverlay(sqTileset)
            sqTileset.on(global.DC.MouseEventType.CLICK, (e) => {
                console.log(e)
            })
            global.viewer.flyTo(sqTileset)
            global.viewer.use(new global.DC.Measure())
src/styles/media/index.scss
@@ -230,6 +230,49 @@
                                            border: countSizeVh(1) solid #fff;
                                        }
                                    }
                                    &>.floor-content {
                                        .build-info {
                                            height: countSizeVh(100);
                                        }
                                        .nextBtn {
                                            left: countSizeVw(1, 1920);
                                            width: countSizeVw(20, 1920);
                                            height: countSizeVh(60);
                                            padding-top: countSizeVh(12);
                                            i {
                                                font-size: countSizeVh(30);
                                                margin-left: countSizeVw(-5, 1920);
                                            }
                                        }
                                        .rightBtn {
                                            left: countSizeVw(369, 1920);
                                        }
                                        .build-outBox {
                                            left: countSizeVw(18, 1920);
                                            width: countSizeVw(356, 1920);
                                            height: countSizeVh(100);
                                            .build-box {
                                                .ridgepole-list {
                                                    width: countSizeVw(356, 1920);
                                                    &>div {
                                                        margin: countSizeVh(6) countSizeVw(8, 1920);
                                                        width: countSizeVw(54, 1920);
                                                        height: countSizeVh(36);
                                                        border: countSizeVh(1) solid #ccc;
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
src/views/house/1.js
New file
@@ -0,0 +1,14 @@
/*
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2022-12-08 15:39:19
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2022-12-08 15:40:42
 * @FilePath: \srs-police-affairs\src\views\house\1.js
 * @Description:
 *
 * Copyright (c) 2022 by shuishen 1109946754@qq.com, All Rights Reserved.
 */
var geom = "{\"type\":\"Polygon\",\"coordinates\":[[[117.951611255,28.447352784,0],[117.951600551,28.447344222,0],[117.951547986,28.447195694,0],[117.951644553,28.447167745,0],[117.951618108,28.447086296,0],[117.951840968,28.447039435,0],[117.95185813,28.447096389,0],[117.951957911,28.447097034,0],[117.95196294,28.447315995,0],[117.951611255,28.447352784,0]]]}"
console.log(JSON.parse(geom).coordinates)
src/views/house/index.vue
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2022-08-18 16:18:17
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2022-12-07 14:53:21
 * @LastEditTime: 2022-12-08 15:28:47
 * @FilePath: \srs-police-affairs\src\views\house\index.vue
 * @Description: 小区-栋-层-房屋
 * 
@@ -89,9 +89,9 @@
                            <div class="nextBtn" @click="lastBtn" v-show="lastBtnShow == true">
                                <i class="el-icon-caret-left"></i>
                            </div>
                            <div class="build-outBox">
                            <div class="build-outBox" ref="BuildOutBox">
                                <div class="build-box" style="left: 0px;"
                                    :style="{ width: Math.ceil(villageHousesList.length / 10) * 356 + 'px' }">
                                    :style="{ width: `calc(${Math.ceil(villageHousesList.length / 10)} * (356 / 1920) * 100vw` }">
                                    <div class="ridgepole-list"
                                        v-for="index of Math.ceil(villageHousesList.length / 10)" :key="index">
                                        <div v-for="(item, index) in villageHousesList.slice((index - 1) * 10, index * 10)"
@@ -669,17 +669,21 @@
        },
        nextBtn () {
            if (parseInt(document.querySelector(".build-box").offsetWidth) > Math.abs(parseInt(document.querySelector(".build-box").style.left)) + 356) {
                document.querySelector(".build-box").style.left = parseInt(document.querySelector(".build-box").style.left) - 356 + 'px'
            const boxWidth = parseInt(this.$refs.BuildOutBox.offsetWidth)
            if (parseInt(document.querySelector(".build-box").offsetWidth) > Math.abs(parseInt(document.querySelector(".build-box").style.left)) + boxWidth) {
                document.querySelector(".build-box").style.left = parseInt(document.querySelector(".build-box").style.left) - boxWidth + 'px'
                this.lastBtnShow = true
                if (parseInt(document.querySelector(".build-box").offsetWidth) == Math.abs(parseInt(document.querySelector(".build-box").style.left)) + 356) {
                if (parseInt(document.querySelector(".build-box").offsetWidth) == Math.abs(parseInt(document.querySelector(".build-box").style.left)) + boxWidth) {
                    this.nextBtnShow = false
                }
            }
        },
        lastBtn () {
            document.querySelector(".build-box").style.left = parseInt(document.querySelector(".build-box").style.left) + 356 + 'px'
            const boxWidth = parseInt(this.$refs.BuildOutBox.offsetWidth)
            document.querySelector(".build-box").style.left = parseInt(document.querySelector(".build-box").style.left) + boxWidth + 'px'
            this.nextBtnShow = true
            if (Math.abs(parseInt(document.querySelector(".build-box").style.left)) == 0) {
                this.lastBtnShow = false