rightFunc.vue 5.69 KB
<template>
    <div class="container">
        <div>
            <div class="func-ico" :class="[isReturn?'selected':'']" @click="handleReturn()">
                <img src="../assets/一张图/icon_复位.png" alt="">
            </div>
            <div class="func-ico" :class="[enlarge?'selected':'']" @click="handleEnlarge()">
                <img src="../assets/一张图/icon_放大.png" alt="">
            </div>
            <div class="func-ico" :class="[narrow?'selected':'']" @click="handleNarrow()">
                <img src="../assets/一张图/icon_缩小.png" alt="">
            </div>
            <div class="func-ico" :class="[coordinate?'selected':'']" @click="handleCoordinate()">
                <img src="../assets/一张图/icon_坐标.png" alt="">
            </div>
            <div class="func-ico" :class="[distance?'selected':'']" @click="handleDistance()">
                <img src="../assets/一张图/icon_距离.png" alt="">
            </div>

            <div class="func-ico" :class="[area?'selected':'']" @click="handleArea()">
                <img src="../assets/一张图/icon_面积.png" alt="">
            </div>
            <div class="func-ico" :class="[marker?'selected':'']" @click="handleMarker()">
                <img src="../assets/一张图/icon_标注.png" alt="">
            </div>
            <div class="func-ico" :class="[rollerShutter?'selected':'']" @click="handleRollerShutter()">
                <img src="../assets/一张图/icon_卷帘.png" alt="">
            </div>
            <div class="func-ico" :class="[splitScreen?'selected':'']" @click="handleSplitScreen()">
                <img src="../assets/一张图/icon_分屏.png" alt="">
            </div>
            <div class="func-ico" :class="[toNorth?'selected':'']" @click="handleToNorth()">
                <img src="../assets/一张图/icon_指北.png" alt="">
            </div>

            <div class="func-ico" :class="[topSee?'selected':'']" @click="handleTopSee()">
                <img src="../assets/一张图/icon_顶视.png" alt="">
            </div>
            <div class="func-ico" :class="[roundSee?'selected':'']" @click="handleRoundSee()">
                <img src="../assets/一张图/icon_环视.png" alt="">
            </div>
            <div class="func-ico" :class="[horizon?'selected':'']" @click="handleHorizon()">
                <img src="../assets/一张图/icon_视域.png" alt="">
            </div>

            <div class="func-ico" :class="[allSee?'selected':'']" @click="handleAllSee()">
                <img src="../assets/一张图/icon_通视.png" alt="">
            </div>

            <!-- <div class="func-ico" :class="[is2D?'selected':'']" @click="handleIs2D()">
                <img src="../assets/toolbar_icon_ 展开.png" alt="">
            </div> -->

        </div>
    </div>
</template>

<script>
    export default {
        name: 'rightFunc',
        components: {},
        data() {
            return {
                isReturn: false, // 复位
                enlarge: false, // 放大
                narrow: false, // 缩小
                coordinate: false, // 坐标
                distance: false, // 距离

                area: false, // 面积
                marker: false, // 标记
                rollerShutter: false, // 卷帘
                splitScreen: false, // 分屏
                toNorth: false, // 指北

                topSee: false, // 顶视
                roundSee: false, // 环视
                horizon: false, // 视域
                allSee: false, // 通视
            }
        },
        mounted() {},
        methods: {
            handleReturn() {
                this.$emit('isReturn', this.isReturn);
            },
            handleEnlarge() {
                this.$emit('enlarge', this.enlarge);
            },
            handleNarrow() {
                this.$emit('narrow', this.narrow);
            },
            handleCoordinate() {
                this.$emit('coordinate', this.coordinate);
            },
            handleDistance() {
                this.$emit('distance', this.distance);
            },

            handleArea() {
                this.$emit('area', this.area);
            },
            handleMarker() {
                this.$emit('marker', this.marker);
            },
            handleRollerShutter() {
                this.$emit('rollerShutter', this.rollerShutter);
            },
            handleSplitScreen() {
                this.$emit('splitScreen', this.splitScreen);
            },
            handleToNorth() {
                this.$emit('toNorth', this.toNorth);
            },

            handleTopSee() {
                this.$emit('topSee', this.topSee);
            },
            handleRoundSee() {
                this.$emit('roundSee', this.roundSee);
            },
            handleHorizon() {
                this.$emit('horizon', this.horizon);
            },
            handleAllSee() {
                this.$emit('allSee', this.allSee);
            },
        }
    }
</script>

<style scoped>
    .func-ico {
        width: 40px;
        height: 40px;
        position: relative;
        /* margin-left: 10px; */
        cursor: pointer;
        background: rgba(4, 10, 10, 0.57);
        box-shadow: 0 2px 9px 0 rgba(0, 0, 0, 0.50);
        border-top: 1px solid rgba(255, 255, 255, .2);
    }

    .func-ico:nth-of-type(1) {
        border-top: 0px solid rgba(255, 255, 255, .2);
    }

    .selected {
        background-image: url('../assets/一张图/bg_2d3d 2.png');
        background-size: 100% 100%;
        background-repeat: no-repeat;
    }

    img {
        /* width: 100%;
        height: 100%; */
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
</style>