<template>
  <div class="pa10">
    <el-tabs type="border-card" v-model="activeName" @tab-click="handleClick" style="height: calc(100vh - 20px)">
      <el-tab-pane name="first" label="谐波专项统计">
        <harmonictj v-if="activeName=='first'" ></harmonictj>
      </el-tab-pane>
      <el-tab-pane name="second" label="电能质量综合评估">
        <qypowerpollution v-if="activeName=='second'" ></qypowerpollution>
      </el-tab-pane>
    
      <el-tab-pane label="告警变电站统计" name="third">
        <alarmstation  v-if="activeName=='third'"></alarmstation>
      </el-tab-pane>
      <!-- <el-tab-pane label="稳态指标超标明细">
        <exceedancedetails name="tabl3"></exceedancedetails>
      </el-tab-pane> -->
      <el-tab-pane label="区域稳态超标统计" name="fourth">
        <regionalsteadystate v-if="activeName=='fourth'"></regionalsteadystate>
      </el-tab-pane>
      <el-tab-pane label="统计报表" name="sex">
       <CustomReport v-if="activeName=='sex'"></CustomReport>
      </el-tab-pane>
      <!-- <el-tab-pane label="谐波报表">
        <excel></excel>
      </el-tab-pane> -->
    </el-tabs>
  </div>
</template>
<script>
import qypowerpollution from "@/views/harmonic-boot/detailed/qypowerpollution";
import harmonictj from "@/views/harmonic-boot/detailed/harmonictj";
import alarmstation from "@/views/harmonic-boot/detailed/alarmstation";
import exceedancedetails from "@/views/harmonic-boot/detailed/exceedancedetails";
import regionalsteadystate from "@/views/harmonic-boot/detailed/regionalsteadystate";
import CustomReport from "@/views/harmonic-boot/staeyreport/CustomReport";
import excel from "@/views/harmonic-boot/staeyreport/excel";
import api1 from '@/api/pollution/pollution'
export default {
  components: {
    qypowerpollution,
    harmonictj,
    alarmstation,
    exceedancedetails,
    regionalsteadystate,
    excel,
    CustomReport
  },
  data() {
    return {
      activeName:'first'
    };
  },
  created() {
    this.guanzhou()
  },
  mounted() {

  },
  methods: {
    guanzhou(){
        var data ={
           token:this.$route.query.token
        } 
        api1.guanzhou(data).then(res=>{
            if(res.code=='A0000'){
               return
              }else{
                this.$router.push('/error/massege/403')
              } 
        })
      },
      handleClick(tab, event) {
       // console.log(tab, event);
        this.activeName = tab.name
      }
  },
};
</script>
<style lang="less" scoped>
.pa10 {
  padding: 10px;
}
::v-deep .el-tabs--border-card > .el-tabs__content {
  padding: 10px;
}
</style>
