<template>
  <!--选择分类  热源厂、高中调、门站-->
  <tab-button class="foot_tabset" :active="0">
    <tabs header="热源厂">
      <instantaneous-flow-heat-plant v-if="show[0]" :date="date"></instantaneous-flow-heat-plant>
    </tabs>
    <tabs header="高中调" >
      <instantaneous-flow-regulator-station v-if="show[1]" :date="date"></instantaneous-flow-regulator-station>
    </tabs>
    <tabs header="门站">
      <instantaneous-flow-station v-if="show[2]" :date="date"></instantaneous-flow-station>
    </tabs>
  </tab-button>
</template>

<script>
  import InstantaneousFlowHeatPlant from "./InstantaneousFlowHeatPlant";
  import InstantaneousFlowRegulatorStation from "./InstantaneousFlowRegulatorStation";
  import InstantaneousFlowStation from "./InstantaneousFlowStation";
  import TabButton from "sale-client/src/components/revenue/comprehen/common/TabButton";
  import Tabs from "sale-client/src/components/revenue/comprehen/common/Tabs";
  import {addDate, toStandardDateString} from "../../../Util";


  export default {
    components: {
      InstantaneousFlowStation,TabButton,Tabs,
      InstantaneousFlowRegulatorStation, InstantaneousFlowHeatPlant},
    title: '瞬时流量',
    data() {
      return {
        show:[true],
        date:{
          today:"",
          yesterday:""
        }
      }
    },

    created() {
      this.initVariable();
    },
    methods:{
      initVariable(){
        //获取今天昨天的日期
        this.date.today = toStandardDateString();
        this.date.yesterday = addDate(this.date.today,-1).slice(0,10);
        this.date.today = this.date.today+' 08:00:00';
        this.date.yesterday = this.date.yesterday+' 09:00:00';
      },
    },
    computed:{

    }
  }

</script>
