l
<template>
    <div>
        <el-row>
            <el-col>
                <el-tabs v-model.trim="activeName" @tab-click="handleClick">
                    <el-tab-pane label="单位终端消缺统计" name="first" :style="'height:' + vh + ';'">
                        <Company v-if="activeName == 'first'"></Company>
                    </el-tab-pane>

                    <el-tab-pane label="厂家终端消缺统计" name="second" :style="'height:' + vh + ';'">
                        <Manufactor v-if="activeName == 'second'"></Manufactor>
                    </el-tab-pane>

                    <!--          <el-tab-pane-->
                    <!--            label="类型终端消缺统计"-->
                    <!--            name="third"-->
                    <!--            :style="'height:' + vh + ';'"-->
                    <!--          >-->
                    <!--            <Faulttype v-if="activeName == 'third'"></Faulttype>-->
                    <!--          </el-tab-pane>-->

                    <!--          <el-tab-pane-->
                    <!--            label="终端消缺详情"-->
                    <!--            name="fourth"-->
                    <!--            :style="'height:' + vh + ';'"-->
                    <!--          >-->
                    <!--            <Details v-if="activeName == 'fourth'"></Details>-->
                    <!--          </el-tab-pane>-->
                </el-tabs>
            </el-col>
        </el-row>
    </div>
</template>
<script>
import Company from './statistics/Company.vue'
import Manufactor from './statistics/Manufactor.vue'
import Faulttype from './statistics/Faulttype.vue'
import Details from './statistics/Details.vue'
export default {
    components: { Company, Manufactor, Faulttype },
    data() {
        return {
            vh: '',
            activeName: 'first',
            device: ''
        }
    },
    created() {},
    mounted() {
        this.setHeight()
        window.addEventListener('resize', this.setHeight)
    },
    beforeDestroy() {
        window.removeEventListener('resize', this.setHeight)
    },
    methods: {
        setHeight() {
            this.device = window.devicePixelRatio
            this.vh = window.sessionStorage.getItem('appheight') - 150 + 'px'
        },
        handleClick(tab, event) {
            // console.log(tab, event);
        }
    },
    components: { Company, Manufactor, Faulttype, Details }
}
</script>
<style lang="less" scoped>
@import url('../../../../styles/comStyle.less');
::v-deep .el-table .cell {
    text-align: center;
}
::v-deep .el-tabs--border-card > .el-tabs__content {
    padding: 10px;
}
.block {
    position: absolute;
    right: 10px;
    bottom: 10px;
}
</style>
