<template>
    <div>
        <p class="info">公司总览</p>
        <el-table ref="multipleTable" :data="tableData" tooltip-effect="dark" 
            :header-cell-style="{ textAlign: 'center' }" :cell-style="{ textAlign: 'center' }" style="width: 98%"
            @selection-change="handleSelectionChange">
            <el-table-column type="selection" width="50">
            </el-table-column>
            <el-table-column prop="corporation_name" label="公司名称">
            </el-table-column>
            <el-table-column prop="Sccode" label="社会信用代码">
            </el-table-column>
            <el-table-column prop="legal_person" label="公司法人">
            </el-table-column>
            <el-table-column prop="contact_person" label="联系人">
            </el-table-column>
            <el-table-column prop="contact_phone" label="联系电话">
            </el-table-column>
            <el-table-column prop="operation" label="操作">
                <el-button size="mini" type="text">查看</el-button>
                <el-button size="mini" type="text">编辑</el-button>
                <el-button size="mini" type="text">删除</el-button>
            </el-table-column>
        </el-table>
        <div class="bottom">
            <div class="bottom_button">
                <el-button class="delete" type="text">批量删除</el-button>
            </div>
            <page class="page" :paginationData="paginationData"></page>
        </div>
    </div>
</template>

<script>
import checkbox from '@/components/Checkbox/index'
import page from '@/components/pagination/index'
export default {
    components: { checkbox, page },
    data() {
        return {
            tableData: [{
                corporation_name: '中讯邮电咨询设计院有限公司',
                Sccode: '4032',
                legal_person: '张三',
                contact_person: '张三',
                contact_phone: '12345678901',
            }, {
                corporation_name: '北京电信规划院有限公司',
                Sccode: '9416',
                legal_person: '李四',
                contact_person: '李四',
                contact_phone: '12345678901',
            }, {
                corporation_name: '北京电信规划院有限公司',
                Sccode: '9416',
                legal_person: '李四',
                contact_person: '李四',
                contact_phone: '12345678901',
            }],
            multipleSelection: [],
            show: true,
            currentPageSize: 10,
            currentPage: 1,
            paginationData: {
                pageSize: 10,
                pagerCount: 5,
                currentPage: 1,
                pageSizes: [5, 10, 20, 30],
                total: 30,
                currentChange: (val) => {
                    this.getTableData(val);
                },
                handleSizeChange: (val) => {
                    this.handleSizeChange(val);
                },
            },
        }
    },
    methods: {
        handleClick() {
            //
        },
        handleSelectionChange(){
            //
        }
    }
}
</script>
<style lang="less" scoped>
.info {
    text-align: left;
    padding: 25px;
    font-size: 25px;
}

.el-table {
    position: absolute;
    top: 60px;
    left: 0;
    margin-left: 1%;
    height: 400px;
    border: 1px solid #f0f2f2;
    margin-top: 10px;
    font-size: 0.95rem;
    font-family: PingFang SC;
    font-weight: 500;
    color: #b2b2b2;
    background: rgba(255, 255, 255, 0.8);

    /deep/th {
        background: #f7fbff;
    }

    /deep/.el-checkbox {
        color: #b2b2b2;

        .el-checkbox__input.is-checked+.el-checkbox__label {
            color: #2ea8e6;
        }

        .el-checkbox__input.is-checked .el-checkbox__inner::after {
            width: 70%;
            height: 70%;
            background: #2ea8e6;
            border-radius: 0;
            transform: rotate(0deg) scaleY(1);
            position: static;
            // border: 1px solid #8DD9FF;
        }

        .el-checkbox__inner {
            border: 1px solid #8dd9ff;
            background: rgba(0, 170, 255, 0);
            display: flex;
            align-items: center;
            justify-content: center;
            position: static;

            &::after {
                transition: 0ms;
            }
        }

        .el-checkbox__label {
            padding-left: 0;
            font-size: 15px;
            position: absolute;
            top: 1px;
            left: 25px;
        }
    }
}
.bottom {
    position: absolute;
    bottom: 10px;
    left: 50px;
    height: 50px;
    width: 95%;
    line-height: 20px;
    background-color: rgba(255, 255, 255, 1);
    text-align: center;

    .bottom_button {
        position: absolute;
        left: 20px;
        margin-top: 15px;

        .delete {
            font-size: 14px;
            text-align: center;
            padding: 1px;
        }

        .disabled {
            font-size: 14px;
            text-align: center;
            padding: 1px;
        }

        .export {
            font-size: 14px;
            text-align: center;
            padding: 1px;
        }
    }
}
</style>