<template>
  <a-card :bordered="false">
    <source-statistics ref="sourceStatistics"  v-if="show" @to_source_list="toSourceList"/>
    <source-list ref="sourceList" v-if="!show" @to_statistics="toStatistics"/>
  </a-card>
</template>

<script>
  import '@/assets/less/TableExpand.less'
  import SourceStatistics from './SourceStatistics'
  import SourceList from './SourceList'

  export default {
    name: 'SourceCom',
    components: {
      SourceStatistics,SourceList
    },
    data () {
      return {
        description: '来源数据管理管理页面',
        show:true,
      }
    },
    created() {
      this.show=true;
    },
    computed: {
    },
    methods: {
      toStatistics(){
        this.show=true;
      },
      toSourceList(record){
        this.show=false;
        this.$nextTick(() => {
          this.$refs.sourceList.getData(record.name);
        })
      }
    }
  }
</script>
<style scoped>
  @import '~@assets/less/common.less';
</style>