<template>
<!--  <div v-if="listpage">-->
    <tab-button v-ref:list :active="-1">
      <tabs header="用户统计查询" v-if="permission('用户统计查询')">
        <user-tongji-query v-if="show == '用户统计查询'" @deal-msg="dealMsg" :data="data"></user-tongji-query>
      </tabs>

<!--      <tabs header="资源操作记录查询" v-if="permission('资源操作记录查询')">-->
<!--        <resource-operating-query v-if="show == '资源操作记录查询'" @deal-msg="dealMsg" :data="data"></resource-operating-query>-->
<!--      </tabs>-->
    </tab-button>
<!--  </div>-->
<!--  <div v-if="!listpage">-->
<!--    <meter-info-manage :row="rowData" :f_start_date="f_start_date" :f_end_date="f_end_date"></meter-info-manage>-->
<!--  </div>-->
</template>

<script>
  import TabButton from '../common/TabButton'
  import Tabs from '../common/Tabs'
  import ChargeQuery from './ChargeQuery'

  export default {
    name: "BusinessQuery",
    title: '统计查询',
    data() {
      return {// 页面开关
        f_start_date:'',
        f_end_date:'',
        listpage: true,
        width: {
          left: '100%',
          right: '0%'
        },
        // searchNumber:'',
        rowData: {},
        show: '',
        data:{
          startDate:this.$login.toStandardDateString() + ' 00:00:00',
          endDate:this.$login.toStandardDateString() + ' 23:59:59'
        }

      }
    },
    components: {Tabs, TabButton,ChargeQuery },
    ready(){
      console.log(this.$refs.list)
      console.log('业务查询')
    },
    methods: {
      permission (name) {
        if (this.$login.r.find(value => value == '综合查询')) {
          if (!this.$login.r.find(value => value == name)) {
            return false
          }
        }
        return true
      },
      cancel (obj) {
        this.listpage = true
      },
      dealMsg(obj) {
        this.rowData = obj
        this.listpage = false
        this.f_start_date = obj.model.startDate
        this.f_end_date = obj.model.endDate
      }
    }
  }
</script>

<style scoped>

</style>
