<template>
  <tab-button class="foot_tabset" :active="0" v-ref:list>
    <tabs header="热源厂">
      <on-time-pressure-heat-plant v-if="show[0]" :date="date"></on-time-pressure-heat-plant>
    </tabs>
    <tabs header="高中调" >
      <on-time-pressure-regulator-station v-if="show[1]" :date="date"></on-time-pressure-regulator-station>
    </tabs>

  </tab-button>
</template>

<script>
import OnTimePressureHeatPlant from "./OnTimePressureHeatPlant";
import OnTimePressureRegulatorStation from "./OnTimePressureRegulatorStation";
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 {
  name: "OnTimePressureManage",
  components: {Tabs,TabButton,OnTimePressureRegulatorStation, OnTimePressureHeatPlant},
  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';
    }
  }

}
</script>

<style scoped>

</style>
