<template>
  <!--选择分类  热源厂、高中调、门站-->
  <tab-button class="foot_tabset" :active="0" >
    <tabs header="三日对比量" v-if="show[0]" :date="date">
      <chart-three-day-contrast></chart-three-day-contrast>
    </tabs>
    <tabs header="24小时压力" v-if="show[1]" :date="date">
    </tabs>
    <tabs header="24小时流量" v-if="show[2]" :date="date">
    </tabs>
  </tab-button>


</template>

<script>


  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";
  import ChartThreeDayContrast from "./ChartThreeDayContrast";

  export default {
    components: {ChartThreeDayContrast, Tabs, TabButton},
    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>
