66
<template>
    <div class="pd10">
        <el-row style="overflow-y: hidden">
            <el-col>
                <el-tabs v-model.trim="activeName" type="border-card">
                    <!-- 监测终端统计 -->
                    <el-tab-pane label="终端入网检测" name="first" :style="'height:' + vh + ';'">
                        <el-tabs v-if="activeName == 'first'" v-model="TerminalDetection">
                            <!-- 区域暂态事件统计 -->
                            <el-tab-pane label="列表" name="Ttable">
                                <Ttable v-if="TerminalDetection == 'Ttable'"></Ttable>
                            </el-tab-pane>

                            <!-- 区域暂态指标分类统计表 -->
                            <el-tab-pane label="图表" name="Tchart">
                                <Tchart v-if="TerminalDetection == 'Tchart'"></Tchart>
                            </el-tab-pane>
                        </el-tabs>
                    </el-tab-pane>
                    <!-- 监测点统计 -->
                    <el-tab-pane label="终端周期检测" name="second" :style="'height:' + vh + ';'">
                        <el-tabs v-if="activeName == 'second'" v-model="CycleDetection">
                            <!-- 区域暂态事件统计 -->
                            <el-tab-pane label="列表" name="Ctable">
                                <Ctable v-if="CycleDetection == 'Ctable'"></Ctable>
                            </el-tab-pane>

                            <!-- 区域暂态指标分类统计表 -->
                            <el-tab-pane label="图表" name="Cchart">
                                <Cchart v-if="CycleDetection == 'Cchart'"></Cchart>
                            </el-tab-pane>
                        </el-tabs>
                    </el-tab-pane>
                </el-tabs>
            </el-col>
        </el-row>
    </div>
</template>

<script>
import Ttable from './components/TerminalDetection/table.vue'
import Tchart from './components/TerminalDetection/chart.vue'
import Ctable from './components/CycleDetection/table.vue'
import Cchart from './components/CycleDetection/chart.vue'

export default {
    name: 'zdjcgl',
    components: { Ttable, Tchart, Cchart, Ctable },
    data() {
        return {
            vh: '',
            vh1: '',
            activeName: 'first',
            TerminalDetection: 'Ttable',
            CycleDetection: 'Ctable',
            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') - 80 + 'px'
            this.vh1 = window.sessionStorage.getItem('appheight') - 143 + 'px'
        },
        handleClick(tab, event) {
            // console.log(tab, event);
        }
    }
}
</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>
