<template>
    <div class="col-sm-12" >
      <div class="col-sm-6" style="height: auto;width: 40%">
        <tabset v-ref:tabs :close="false">
          <new-watch-msg :watchmsg="row" :height1="height1"  @cancel-main="cancel"></new-watch-msg>
        </tabset>
      </div>
      <div class="col-sm-6" style="padding-right:25px;padding-left: 20px;width: 60%" id="div1">
        <tabset v-ref:tabs :close="false">
          <tab header="流水查询">
            <meter-record-query  :searchdata="row"></meter-record-query>
          </tab>
          <tab header="指令查看" v-if="row.f_meter_type.includes('物联网表')">
            <query-instruct :searchobj="row"  @select="selected"></query-instruct>
          </tab>
          <tab header="异常报警" v-if="row.f_meter_type.includes('物联网表')">
            <watch-warning :searchobj="row"></watch-warning>
          </tab>
          <tab header="表具采集" v-if="row.f_meter_type.includes('物联网表')">
            <watch-collection :searchobj="row" ></watch-collection>
          </tab>
          <tab header="抄表结算" v-if="!row.f_meter_type.includes('卡表')">
            <meter-hand-query :searchdata="row"></meter-hand-query>
          </tab>
          <tab header="收费查询">
            <meter-charge-query  :searchdata="row"></meter-charge-query>
          </tab>
          <tab header="补气查询">
            <meter-fill-gas-query :searchdata="row"></meter-fill-gas-query>
          </tab>
          <tab header="补卡查询" v-if="row.f_meter_type.includes('卡表')">
            <meter-fill-card-query :searchdata="row"></meter-fill-card-query>
          </tab>
          <tab header="换表查询">
            <meter-change-meter-query :searchdata="row"></meter-change-meter-query>
          </tab>
          <tab header="其他收费">
            <meter-other-charge-query :searchdata="row"></meter-other-charge-query>
          </tab>
          <tab header="过户查询">
            <meter-transfer-query :searchdata="row"></meter-transfer-query>
          </tab>
        </tabset>
      </div>
    </div>
</template>

<script>
  import WatchWaring from './WatchWarning'

  export default {
    components: {WatchWaring},
    title: '物联网表',
    name: 'NewWatchDeal',
    props: {
        row: ''
    },
    data () {
      return {
        height1:''
      }
    },
    ready(){
      this.height1=document.getElementById('div1').offsetHeight+'px'
      console.log('this.height1=============',this.height1)
    },
    methods: {
      cancel(val) {
        this.$emit('cancel-main', val)
      }
    }
  }
</script>
