<template>
    <div class="pd10">
        <el-row>
            <el-col>
                <el-tabs v-model="activeName" @tab-click="handleClick" type="border-card">
                    <!-- 暂态事件统计 -->
                    <el-tab-pane label="暂态事件统计" name="first" :style="'height:' + vh + ';'">
                        <Incident v-if="activeName == 'first'"></Incident>
                    </el-tab-pane>
                    <el-tab-pane label="暂态事件分布统计" name="second" :style="'height:' + vh + ';'">
                        <Distribution v-if="activeName == 'second'"></Distribution>
                    </el-tab-pane>
                    <!-- 暂态事件明细 -->
                    <el-tab-pane label="暂态事件明细" name="third" :style="'height:' + vh + ';'">
                        <Definite v-if="activeName == 'third'"></Definite>
                    </el-tab-pane>
                </el-tabs>
            </el-col>
        </el-row>
    </div>
</template>
<script>
// import { tableheight } from "@/assets/commjs/common";
import Incident from './components/TransientState/Incident.vue'
import Distribution from './components/TransientState/Distribution.vue'
import Definite from './components/TransientState/Definite.vue'
export default {
    name: 'pwztzb',
    components: { Incident, Distribution, Definite },
    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') - 80 + 'px'
        },
        handleClick(tab, event) {
            // if (tab.label == "暂态事件分布统计") {
            //   this.echarts();
            //   this.echarts2();
            //   this.echarts4();
            //   this.iticData();
            //   this.semif();
            //   this.echarts3();
            // }
            // this.onSubmit();
            // console.log(tab,event);
        }
    }
}
</script>
<style lang="less" scoped>
@import url('../../styles/comStyle.less');
</style>
