<template>
    <LayoutTable :toggleRowSelection="toggleRowSelection" ref="LayoutTable" :data="tableData" :config="tableConfig" @selection-change="handleSelectionChange">
        <div slot="table-head-left"><div>请选择窗口</div></div>
        <div slot="table-head-center"></div>
    </LayoutTable>
</template>
<script>
import table from "@/assets/mixins/table";
export default {
    props:['hallId','checkId'],
    mixins: [table],
    methods:{
        handleSelectionChange(v){
            this.$emit("selection-change",v)
        },
        beforeFecth(){
            this.pageInfo.list = '/window/owner/subWindowList'
        },
    },
    created(){
        this.config.search[0].enumData = this.hallId
        // setTimeout(()=>{
        //     this.toggleRowSelection = [this.tableData.data[0]]
        // },2000)
    },
    data(){
        return {
            toggleRowSelection:[],
            config: {
                downloadUrl:"",
                isshowTabPane: false,
                search: [
                    {
                        name: "hallId",
                        type: "select",
                        label: "大厅",
                        enumData:{}
                    },
                    {
                        name: "deptName",
                        type: "text",
                        label: "窗口名称",
                        fuzzy: true,
                    },
                ],
                columns: [
                    { type: "selection", width: 60 },
                    // { type: "index", label: "序号", width: 50 },

                    { label: "窗口名称", prop: "name" },

                    { label: "编号", prop: "fromnum" },

                    { label: "所属楼栋", prop: "building" },

                    { label: "所属楼层", prop: "level" },
                    // {
                    //     label: "操作",
                    //     width: 240,
                    //     formatter: (row) => {
                    //     return (
                    //         <table-buttons
                    //         noAdd
                    //         row={row}
                    //         onEdit={this.toEdit}
                    //         onView={this.toView}
                    //         onDel={this.toDel}
                    //         />
                    //     );
                    //     },
                    // },
                ],
            },
        }
    },
}
</script>