<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="first"
            :style="'height:' + vh + ';'"
          >
           <Undocumentednonlinear v-if="activeName == 'first'"></Undocumentednonlinear>
          </el-tab-pane>

          <el-tab-pane
            label="入网评估报告审核"
            name="second"
            :style="'height:' + vh + ';'"
          >
          <Reportreview v-if="activeName == 'second'" ref="reportreviewRef" ></Reportreview>
          </el-tab-pane>

          <el-tab-pane
            label="干扰源用户常态化管理"
            name="third"
            :style="'height:' + vh + ';'"
          >
          <Normalizedmanagement v-if="activeName == 'third'"></Normalizedmanagement>
          </el-tab-pane>

          <el-tab-pane
            label="实测报告审核"
            name="fourth"
            :style="'height:' + vh + ';'"
          >
            <Measurementreport v-if="activeName == 'fourth'"></Measurementreport>
          </el-tab-pane>
        </el-tabs>
      </el-col>
    </el-row>
  </div>
</template>
<script>
import Undocumentednonlinear from './components/interferencemanagement/Undocumentednonlinear.vue';
import Reportreview from './components/interferencemanagement/Reportreview.vue';
import Normalizedmanagement from './components/interferencemanagement/Normalizedmanagement.vue';
import Measurementreport from './components/interferencemanagement/Measurementreport.vue';
export default {
  name:'gryyhgl',
    components: { Undocumentednonlinear, Reportreview, Normalizedmanagement, Measurementreport },
    data() {
        return {
            vh: "",
            activeName: "first",
            device: "",
        };
    },
    created() {
      let data = this.$route.query
      if(data && data!=null){
        if(this.$route.query.flowType){
          if(this.$route.query.flowType === 1){
            //审核
            this.activeName = 'second'
          }
        }
      }

    },
    mounted() {

        this.setHeight()
        window.addEventListener('resize', this.setHeight)

      let data = this.$route.query
      if(data && data!=null){
        if(this.$route.query.flowType){
          if(this.$route.query.flowType === 1){
            //审核
            let planId = this.$route.query.formAssId
            setTimeout(()=>{
              this.$refs.reportreviewRef.planReviewFn(planId)
            },10)
          }

        }
      }
    },
    beforeDestroy() {
        window.removeEventListener('resize', this.setHeight)
    },
    methods: {
        setHeight() {
          this.device = window.devicePixelRatio;
          this.vh = window.sessionStorage.getItem('appheight') - 80;
        },

        handleClick(tab, event) {
            // console.log(tab, event);
        },
    },
};
</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;
}
</style>
