<template>
    <el-tabs v-model="activeName" type="border-card" class="event-statistics" tab-position="left" :style="height">
        <el-tab-pane lazy label="ITIC曲线分析" name="1">
            <ITICquxianfenxi @viewWave="viewWave"/>
        </el-tab-pane>
        <el-tab-pane lazy label="SEMI F47 分析" name="2">
            <SEMIF47fenxi @viewWave="viewWave"/>
        </el-tab-pane>
        <el-tab-pane lazy label="电压暂降表及密度" name="3">
            <Dianyazanjiangbiaojimidu />
        </el-tab-pane>
        <el-tab-pane lazy label="暂降分布统计" name="4">
            <Zanjiangfenbutongji />
        </el-tab-pane>
        <el-tab-pane lazy label="暂降幅值概率分布" name="5">
            <Zanjiangfuzhigailvfenbu />
        </el-tab-pane>
        <el-tab-pane lazy label="持续时间概率分布" name="6">
            <Chixushijiangailvfenbu />
        </el-tab-pane>
    </el-tabs>
</template>
<script setup lang="ts">
import { ref, onMounted } from 'vue'
import { mainHeight } from '@/utils/layout'
import ITICquxianfenxi from './ITICquxianfenxi/index.vue'
import SEMIF47fenxi from './SEMIF47fenxi/index.vue'
import Dianyazanjiangbiaojimidu from './dianyazanjiangbiaojimidu/index.vue'
import Zanjiangfenbutongji from './zanjiangfenbutongji/index.vue'
import Zanjiangfuzhigailvfenbu from './zanjiangfuzhigailvfenbu/index.vue'
import Chixushijiangailvfenbu from './chixushijiangailvfenbu/index.vue'
const props = defineProps({
    externalHeight: {
        type: Number,
        default: 0
    }
})
const emit = defineEmits(['viewWave'])
const activeName = ref('1')
const height = ref(mainHeight(84 + props.externalHeight))
// onMounted(() => {
//     height.value = mainHeight(84 + props.externalHeight)
//     console.log("🚀 ~ 84 + props.externalHeight:", 84 + props.externalHeight)
// })
const viewWave=(row:any)=>{
    emit('viewWave',row)
}
</script>
<style lang="scss">
.event-statistics {
    .el-tabs__header.is-left {
        margin-right: 0;
    }

    .el-tabs__content {
        height: 100%;

        .el-tab-pane {
            height: 100%;
        }
    }
}
</style>
