<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="first" :style="'height:' + vh + ';'">
                        <Networklevel v-if="activeName == 'first'"></Networklevel>
                    </el-tab-pane>
                    <el-tab-pane label="各渗透率光伏台区基准水平" name="second" :style="'height:' + vh + ';'">
                        <Arealevel v-if="activeName == 'second'"></Arealevel>
                    </el-tab-pane>
                </el-tabs>
            </el-col>
        </el-row>
    </div>
</template>
<script>
import Networklevel from './components/BaselineLevelAssessment/Networklevel.vue'
import Arealevel from './components/BaselineLevelAssessment/Arealevel.vue'
export default {
    name: 'pwjzsppg',
    components: { Networklevel, Arealevel },
    data() {
        return {
            vh: '',
            activeName: 'first',
            device: ''
        }
    },
    created() {},
    mounted() {
        this.setHeight()
        window.addEventListener('resize', this.setHeight)
    },
    computed: {
        //计算表格高度
        // height(){
        //   return '100vh'- this.$refs.form.offsetHeight +259;
        // }
    },
    beforeDestroy() {
        window.removeEventListener('resize', this.setHeight)
    },
    methods: {
        setHeight() {
            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');
</style>
