<template>
  <div class="pa10">
    <el-tabs
      type="border-card"
      style="height: calc(100vh - 20px)"
      v-model="activeName"
      @tab-click="handleClick"
    >
      <el-tab-pane label="告警数据统计" name="first">
        <abnormaldataalarm v-if="activeName == 'first'"></abnormaldataalarm>
      </el-tab-pane>
      <el-tab-pane label="暂态事件列表" name="second">
        <transienteventlist v-if="activeName == 'second'"></transienteventlist>
      </el-tab-pane>
      <el-tab-pane label="稳态超标占比统计" name="third">
        <steadystate v-if="activeName == 'third'"></steadystate>
      </el-tab-pane>
      <el-tab-pane label="稳态指标超标明细" name="fourth">
        <exceedancedetails v-if="activeName == 'fourth'"></exceedancedetails>
      </el-tab-pane>
      <el-tab-pane label="稳态合格率统计" name="sex">
        <qualifiedRate v-if="activeName == 'sex'"></qualifiedRate>
      </el-tab-pane>
      <!-- <el-tab-pane label="短信告警">  -->
      <!-- <qypowerment></qypowerment> -->
      <!-- </el-tab-pane> -->
      <!-- <el-tab-pane label="电能质量评估"> 
        <qypowerment></qypowerment>
      </el-tab-pane> -->
      <!-- <el-tab-pane label="终端状态统计">
        <terminalonlinerate></terminalonlinerate>
      </el-tab-pane> -->
      <!-- <el-tab-pane label="数据完整性统计">
        <integralitytable></integralitytable>
      </el-tab-pane>
      <el-tab-pane label="终端在线率统计">
        <onlinerate></onlinerate>
      </el-tab-pane> -->

      <!-- <el-tab-pane label="谐波畸变率统计">
        <harmonicdistortionrate></harmonicdistortionrate>
      </el-tab-pane> -->
    </el-tabs>
  </div>
</template>
<script>
import jquery from "jquery";
import abnormaldataalarm from "@/views/components/abnormaldataalarm";
import qypowerment from "@/views/harmonic-boot/area/qypowerment";
import terminalonlinerate from "@/views/harmonic-boot/area/terminalonlinerate";
import integralitytable from "@/views/harmonic-boot/area/integralitytable";
import onlinerate from "@/views/harmonic-boot/area/onlinerate";
import qualifiedRate from "@/views/harmonic-boot/area/qualifiedRate";
import exceedancedetails from "@/views/harmonic-boot/detailed/exceedancedetails";
import steadystate from "@/views/harmonic-boot/area/steadystate";
import harmonicdistortionrate from "@/views/harmonic-boot/area/harmonicdistortionrate";
import transienteventlist from "@/views/harmonic-boot/area/transienteventlist";
import api1 from "@/api/pollution/pollution";
export default {
  components: {
    qypowerment,
    terminalonlinerate,
    integralitytable,
    onlinerate,
    qualifiedRate,
    exceedancedetails,
    steadystate,
    harmonicdistortionrate,
    transienteventlist,
    abnormaldataalarm,
  },
  data() {
    return {
      activeName: "first",
    };
  },
  created() {
   if (process.env.VUE_APP_KEY != 'scqr') {
                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>
