<template>
  <basic-container>
    <div class="app-container">
      <el-tabs v-model="activeCapital" @tab-click="handleCapitalClick">
        <el-tab-pane label="广州越秀融资租赁有限公司" name="广州越秀融资租赁有限公司"></el-tab-pane>
        <el-tab-pane label="华融金融租赁股份有限公司" name="华融金融租赁股份有限公司"></el-tab-pane>
        <el-tab-pane label="广西贵港赣辉新能源有限公司" name="广西贵港赣辉新能源有限公司"></el-tab-pane>
      </el-tabs>
      <div class="query-box" ref="queryBox">
        <div class="btn-box">
          <el-tabs v-model="activeName" @tab-click="handleClick">
            <el-tab-pane label="周低效电站" name="1"></el-tab-pane>
            <el-tab-pane label="待确认低效" name="2"></el-tab-pane>
            <el-tab-pane label="历史记录" name="3"></el-tab-pane>
            <el-tab-pane label="运维记录" name="4"></el-tab-pane>
          </el-tabs>
        </div>
      </div>
      <!--总览-->
      <InefficientLastWeek :activeCapital="activeCapital" v-if="activeName == '1'" v-loading="loading" />
      <!--总览-->
      <InefficientWaitConfirm :activeCapital="activeCapital" v-if="activeName == '2'" v-loading="loading" />
      <!--设备信息-->
      <InefficientHistory :activeCapital="activeCapital" v-if="activeName == '3'" v-loading="loading" />

      <InefficientYWHistory :activeCapital="activeCapital" v-if="activeName == '4'" v-loading="loading" />
    </div>
  </basic-container>
</template>

<script>
import InefficientLastWeek from '@/views/nh/components/InefficientLastWeek.vue'
import InefficientWaitConfirm from '@/views/nh/components/InefficientWaitConfirm.vue'
import InefficientHistory from '@/views/nh/components/InefficientHistory.vue'
import InefficientYWHistory from '@/views/nh/components/InefficientYWHistory.vue'


export default {
  name: "StationDetail",
  components: { InefficientWaitConfirm,InefficientLastWeek, InefficientHistory,InefficientYWHistory },
  data() {
    return {
      activeName: '1',
      activeCapital:"广州越秀融资租赁有限公司",
      loading: false
    };
  },
  created() {
    var power_station_detail_id = JSON.parse(localStorage.getItem('power_station_detail_id'));
    console.log(power_station_detail_id)
  },
  methods: {
    handleClick(e) {
      this.loading = true;
      setTimeout(() => {
        this.loading = false;
      }, 500);
    },
    handleCapitalClick(e){
      console.log(e)
    }
  }
}
</script>
