<template>
    <el-container class="flex-column">
        <div class="table-search">
            <optionBtn @success="handleSuccess" :dataSelect="dataSelect" :dataSelectFull="dataSelectFull"></optionBtn>
        </div>
        <el-main class="nopadding">
            <div class="table-container">
                <tablePage ref="tablePage" @success="tableHandle" @successFull="tableHandleFull"></tablePage>
            </div>
        </el-main>
    </el-container>  
</template>

<script>
import optionBtn from './components/option';
import tablePage from './components/table';
export default {
    components: {
        optionBtn,tablePage
    },
    data(){
        return {
            activeName:"1",
            isLoading:false,
            searchKey:{
                status:7
            },
            dataSelect:[],
            dataSelectFull:[],
        }
    },
    methods: {
        tabClick(event){
            this.activeName = event;
            this.$refs.tablePage.upData({type:event})
        },
        tableHandle(data){
            this.dataSelect = data;
        },
        tableHandleFull(data){
            this.dataSelectFull = data;
        },
        handleSuccess(data){
            this.$refs.tablePage.upData(data)
        },
        handleClick(name){
            this.searchKey.type = name;
            this.$refs.tablePage.upData(this.searchKey)
        }
    }
}
</script>