<template>
  <div id="unit" class="flex-row" >
    <div class="basic-main" :style="{width:width}">
      <life-day-report-list @getdata="getdata" @close="close" @show="show" :style="style" v-ref:list ></life-day-report-list>
    </div>
    <div class="binary-right" v-if="summaryshow" style="width:15%">
      <ul class="nav nav-tabs">
        <li class="active"><a href="#">数据汇总</a></li>
      </ul>
      <life-day-report-summary :sumsmodel="sumsmodel"  v-ref:gas></life-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 = '85%'
        this.summaryshow = true
        this.style='col-sm-3'
      },
      close(){
        this.width = '100%'
        this.summaryshow = false
        this.style='col-sm-2'
      }
    }
  }
</script>

<style>
</style>

