<template>
  <div id="unit" class="flex-row" >
    <div class="basic-main" :style="{width:width}">
      <day-report-list @getdata="getdata" @close="close" @show="show" :style="style" v-ref:list ></day-report-list>
    </div>
    <div class="binary-right" v-if="summaryshow">
      <ul class="nav nav-tabs">
        <li class="active"><a href="#">数据汇总</a></li>
      </ul>
      <day-report-summary :sumsmodel="sumsmodel"  v-ref:gas></day-report-summary>
    </div>
  </div>
</template>

<script>

  export default {
    title:'日清单',
    name: "DayReport",
    data () {
      return {
        width:'100%',
        summaryshow:false,
        style:'col-sm-2'
      }
    },
    ready(){
    },
    methods:{
      getdata(val){
        console.log(val)
        this.sumsmodel = val
      },
      show(){
        this.width = '58%'
        this.summaryshow = true
        this.style='col-sm-3'
      },
      close(){
        this.width = '100%'
        this.summaryshow = false
        this.style='col-sm-2'
      }
    }
  }
</script>

<style>
</style>

