<template>
    <div>
        <el-row>
            <el-col>
                <el-tabs v-model="activeName" @tab-click="handleClick">
                    <!-- 区域暂态事件统计 -->
                    <el-tab-pane label="区域超标统计" name="first">
                        <Exceedance v-if="activeName == 'first'"></Exceedance>
                    </el-tab-pane>

                    <!-- 区域暂态指标分类统计 -->
                    <el-tab-pane label="区域超标分类统计" name="third">
                        <classification v-if="activeName == 'third'"></classification>
                    </el-tab-pane>
                    <!-- 暂态事件明细 -->
                    <el-tab-pane label="稳态指标超标明细" name="detailed">
                        <detailed v-if="activeName == 'detailed'"></detailed>
                    </el-tab-pane>
                    <el-tab-pane label="变电站（换流站）稳态指标超标分类统计表" name="fifth">
                        <SubstationStatistics v-if="activeName == 'fifth'"></SubstationStatistics>
                    </el-tab-pane>
                </el-tabs>
            </el-col>
        </el-row>
    </div>
</template>
<script>
import Exceedance from './Total/Exceedance.vue'
import classification from './Total/classification.vue'
import detailed from './Total/detailed.vue'
import SubstationStatistics from './Total/SubstationStatistics.vue'

export default {
    components: { Exceedance, classification, detailed, SubstationStatistics },
    data() {
        return {
            vh: undefined,
            date: '',
            input: '',
            height: null,
            activeName: 'first' //区分是那个节点
        }
    },
    mounted() {
        this.setHeight()
        window.addEventListener('resize', this.setHeight)
    },
    beforeDestroy() {
        window.removeEventListener('resize', this.setHeight)
    },
    methods: {
        setHeight() {
            this.vh = window.sessionStorage.getItem('appheight') - 130 + 'px'
        },

        handleClick(tab, event) {
            // if (tab.label == "暂态事件分布统计") {
            //   this.echarts();
            //   this.echarts2();
            //   this.echarts4();
            //   this.iticData();
            //   this.semif();
            //   this.echarts3();
            // }
            // this.onSubmit();
        }
    }
}
</script>
<style lang="less" scoped>
@import url('../../../../styles/comStyle.less');
</style>
