<template>
  <div>
    <el-tabs type="border-card"
             v-model="activeName"
             @tab-click="handleClick">
      <el-tab-pane label="水库水位站"
                   name="first">
        <resWaterChildren v-if="this.activeName=='first'"></resWaterChildren>
      </el-tab-pane>
      <el-tab-pane label="河道水位站"
                   name="second">
        <riverWaterChildren v-if="this.activeName=='second'"></riverWaterChildren>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>
<script>
import resWaterChildren from './components/resWaterChildren.vue'
import riverWaterChildren from './components/riverWaterChildren.vue'
export default {
  name: 'alertConfigur',
  components: {
    resWaterChildren,
    riverWaterChildren
  },
  data () {
    return {
      activeName: 'first',
    }
  },
  created () {
    this.handlecdpage();
  },
  methods: {
    handleClick (val) {
      console.log(val)
    },
    handlecdpage () {
      let page = window.sessionStorage.getItem("pages");
      if (page != "" && page != null && page != undefined) {
        this.activeName = page;
        window.sessionStorage.removeItem("pages")
      } else {
        this.activeName = "first";
      }

    }
  },
}
</script>

<style lang="scss" scoped>
html,
body {
  width: 100% !important;
  height: 100% !important;
}
.el-tabs .el-tabs--top {
  width: 100% !important;
  height: 100% !important;
}
.el-tabs,
.el-tab-pane,
.bbsl-table-content {
  width: 100% !important;
  height: 100% !important;
}
</style>
