<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 + ';'">
                        <Mainnetwork v-if="activeName == 'first'"></Mainnetwork>
                    </el-tab-pane>
                    <el-tab-pane label="配网运行指标统计" name="second" :style="'height:' + vh + ';'">
                        <Distributionnetwork v-if="activeName == 'second'"></Distributionnetwork>
                    </el-tab-pane>
                </el-tabs>
            </el-col>
        </el-row>
    </div>
</template>
<script>
// import { tableheight } from "@/assets/commjs/common";
// import { getWholeNetworkData ,getPlatformAreaData } from "@/api/evaluate";
import Distributionnetwork from './components/operationIndex/Distributionnetwork.vue'
import Mainnetwork from './components/operationIndex/Mainnetwork.vue'
export default {
    name: 'yxzhgl',
    components: { Distributionnetwork, Mainnetwork },
    data() {
        return {
            vh: '',
            activeName: 'first',
            device: ''
        }
    },
    created() {},
    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) {
            //  console.log(tab, event);
        }
    }
}
</script>
<style lang="less" scoped>
@import url('../../styles/comStyle.less');
</style>
