l
<template>
    <div class="pd10">
        <el-tabs v-if="flag" v-model.trim="activeName" @tab-click="handleClick" type="border-card">
            <el-tab-pane label="报告模板配置" name="first" :style="'height:' + vh + ';'">
                <MonitoringPoint @send="takeOver" @flag="flag = false" v-if="activeName == 'first'" />
            </el-tab-pane>
            <!-- <el-tab-pane
            label="区域报告"
            name="second"
            :style="'height:' + vh + ';'"
          >
          <Region  @flag="flag=false" v-if="activeName=='second'"/>
          </el-tab-pane> -->
        </el-tabs>
        <Administration v-else @flag="flag = true" :type="type"></Administration>
    </div>
</template>
<script>
import MonitoringPoint from '../components/ReportTemplateCild/MonitoringPoint.vue'
import Region from '../components/ReportTemplateCild/region.vue'
import Administration from '../components/ReportTemplateCild/Administration.vue'
export default {
    name: 'reportingmanager',
    components: { MonitoringPoint, Region, Administration },
    data() {
        return {
            flag: true,
            vh: undefined,
            activeName: 'first',
            device: '',
            type: ''
        }
    },
    created() {},
    mounted() {
        this.setHeight()
        window.addEventListener('resize', this.setHeight)
    },
    beforeDestroy() {
        window.removeEventListener('resize', this.setHeight)
    },
    methods: {
        setHeight() {
            this.device = window.devicePixelRatio
            this.vh = window.sessionStorage.getItem('appheight') - 70 + 'px'
        },
        handleClick(tab, event) {
            // console.log(tab, event);
        },
        takeOver(data) {
            // console.log(data);
            this.type = data
        }
    }
}
</script>
<style lang="less" scoped>
@import url('../../../styles/comStyle.less');
::v-deep .el-table .cell {
    text-align: center;
}
::v-deep .el-tabs--border-card > .el-tabs__content {
    padding: 10px;
}
.block {
    position: absolute;
    right: 10px;

    bottom: 10px;
}
::v-deep ::-webkit-scrollbar {
    width: 8px !important;
    height: 14px;
}
</style>
