<template>
    <div class="pd10">
        <el-row>
            <el-col>
                <el-tabs v-model.trim="activeName" @tab-click="handleClick" type="border-card">
                    <el-tab-pane label="暂态指标统计报表" name="second" :style="'height:' + vh + ';'">
                        <Transient v-if="activeName == 'second'"></Transient>
                    </el-tab-pane>
                    <el-tab-pane label="稳态指标统计报表" name="first" :style="'height:' + vh + ';'">
                        <!-- v-if="id != '' ? true : false" -->
                        <Steadystate ref="steadyState" :id="id"></Steadystate>
                    </el-tab-pane>
                    <!-- <el-tab-pane
              label="监测点分析报告"
              name="third"
              :style="'height:' + vh + ';'"
            >
            <Analysisreport v-if="activeName=='third'"></Analysisreport>
            </el-tab-pane> -->
                </el-tabs>
            </el-col>
        </el-row>
    </div>
</template>
<script>
import Steadystate from './components/StatisticalReport/Steadystate.vue'
import Transient from './components/StatisticalReport/Transient.vue'
import Analysisreport from './components/StatisticalReport/Analysisreport.vue'
export default {
    name: 'pwtjbb',
    components: { Steadystate, Transient, Analysisreport },
    data() {
        return {
            vh: '',
            activeName: 'second',
            device: '',
            id: ''
        }
    },
    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'
        },
        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;
}
::v-deep .el-form-item--small .el-form-item__content,
.el-form-item--small .el-form-item__label {
    height: 32px;
}
</style>
