<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="Typical" :style="'height:' + vh + ';'">
                <Typical :flag="1" v-if="activeName == 'Typical'"></Typical>
            </el-tab-pane>
            <el-tab-pane label="主网用户台账统计" name="statistics" :style="'height:' + vh + ';'">
                <statistics v-if="activeName == 'statistics'"></statistics>
            </el-tab-pane>

        </el-tabs>
      </el-col>
    </el-row>
  </div>
</template>
<script>

import statistics from '@/views/Account-management/components/uploadGw/statistics'
import Typical from '@/views/Account-management/components/uploadGw/Monitoringpoint'


export default {
  name: 'uploadGw',
  components: {
      Typical,
      statistics
  },
  data() {
    return {
      vh: '',
      activeName: 'Typical',
      device: ''
    }
  },
  created() {},
  mounted() {
    this.setHeight()
    window.addEventListener('resize', this.setHeight)
  },
  computed: {
    //计算表格高度
    // height(){
    //   return '100vh'- this.$refs.form.offsetHeight +259;
    // }
  },
  methods: {
    setHeight() {
      this.device = window.devicePixelRatio
      this.vh = window.sessionStorage.getItem('appheight') - 80 + 'px'
    },
    handleClick(tab, event) {
      // console.log(tab, event);
    }
  },
  beforeDestroy() {
    window.removeEventListener('resize', this.setHeight)
  }
}
</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;
}
</style>
