<template>
    <div class="col-sm-12">
        <supply-select :style="{height: topheight}" v-ref:personquery></supply-select>
        <add-supply v-if="showfoot"></add-supply>
        <update-supply v-if="showupdate" :upperson="selectData"></update-supply>
    </div>
</template>
<script>
export default {
  title: '供气量采集录入',
  data () {
    return {
      topheight: '100%',
      selectData: '',
      showfoot: false,
      showupdate: false,
      selectData: ''
    }
  },
  events: {
    'addInfo' () {
      this.topheight = '40%'
      this.showfoot = true
      this.showupdate = false
    },
    'close' () {
      this.showfoot = false
      this.showupdate = false
      this.topheight = '100%'
      this.$refs.personquery.$refs.cp.$refs.cri.search()
    },
    'hiddenpaged' () {
      this.$refs.personquery.$refs.cp.pager = false
    },
    'showupdate' (val) {
      this.topheight = '40%'
      this.selectData = val
      this.showfoot = false
      this.showupdate = true
    }
  }
}
</script>
