<template>
<!--  <div v-if="listpage">-->
    <tab-button v-ref:list :active="-1">
      <tabs header="卡表抄表分析" v-if="permission('卡表抄表分析')">
        <card-hand-analysis v-if="show.includes('卡表抄表分析')" @deal-msg="dealMsg" :data="data"></card-hand-analysis>
      </tabs>
    </tab-button>

</template>

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

  export default {
    name: 'AnalysisQuery',
    title: '统计分析',
    data () {
      return {// 页面开关
        f_start_date: '',
        f_end_date: '',
        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.f_start_date = obj.model.startDate
        this.f_end_date = obj.model.endDate
      }
    }
  }
</script>

<style scoped>

</style>
