<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 ></abnormaldataalarm>
      </el-tab-pane>
      <el-tab-pane label="暂态事件列表" name="second">
        <transienteventlist ></transienteventlist>
      </el-tab-pane>
      <el-tab-pane label="稳态指标超标明细" name="fourth">
        <exceedancedetails ></exceedancedetails>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>
<script>
import jquery from "jquery";
import abnormaldataalarm from "@/views/cgy-components/abnormaldataalarm";
import exceedancedetails from "@/views/cgy-harmonic-boot/detailed/exceedancedetails";
import transienteventlist from "@/views/cgy-harmonic-boot/area/transienteventlist";
import api1 from "@/api/pollution/pollution";
export default {
  components: {
    exceedancedetails,
    transienteventlist,
    abnormaldataalarm,
  },
  data() {
    return {
      activeName: "first",
    };
  },
  created() {
      if (process.env.VUE_APP_MODE === 'cgyqr') {
          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>
