<template>
    <div>
        <el-table ref="multipleTable" border :data="tableData" tooltip-effect="dark"
            :header-cell-style="{ textAlign: 'center' }" :cell-style="{ textAlign: 'center' }" style="width: 100%"
            @selection-change="handleSelectionChange">
            <el-table-column type="selection" width="50">
            </el-table-column>
            <el-table-column prop="username" label="用户名">
            </el-table-column>
            <el-table-column prop="phone_num" label="手机号">
            </el-table-column>
            <el-table-column prop="e_mail" label="邮箱">
            </el-table-column>
            <el-table-column prop="role" label="角色">
            </el-table-column>
            <el-table-column prop="permission" label="权限">
            </el-table-column>
            <el-table-column prop="working_address" label="单位">
            </el-table-column>
            <el-table-column prop="registed_time" label="注册时间">
            </el-table-column>
            <el-table-column prop="status" label="状态">
                <template slot-scope="scope">
                    <el-tag :color="scope.row.status == true ? '#06f77e' : '#757776'"></el-tag>
                </template>
            </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>
                <checkbox class="checkbox" :total="total"></checkbox>
                <el-button class="check-cancel" size="mini" type="text" @click="cancleChecked">取消</el-button>
            </div>
            <div class="bottom_button" v-show="show">
                <el-button class="delete" type="text">批量删除</el-button>
                <el-divider direction="vertical"></el-divider>
                <el-button class="disabled" type="text">批量激活</el-button>
                <el-divider direction="vertical"></el-divider>
                <el-button class="export" type="text">导出数据</el-button>
            </div>
            <page></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: [{
                username: 'admin',
                phone_num: '12345678901',
                e_mail: 'admin@xxxx.com',
                role: '管理员',
                permission: '1级',
                working_address: '北京电信规划设计院',
                registed_time: '2022-08-09  19:00',
                status: true
            }, {
                username: 'admin',
                phone_num: '12345678901',
                e_mail: 'admin@xxxx.com',
                role: '管理员',
                permission: '1级',
                working_address: '北京电信规划设计院',
                registed_time: '2022-08-09  19:00',
                status: false
            }, {
                username: 'admin',
                phone_num: '12345678901',
                e_mail: 'admin@xxxx.com',
                role: '管理员',
                permission: '1级',
                working_address: '北京电信规划设计院',
                registed_time: '2022-08-09  19:00',
                status: true
            }, {
                username: 'admin',
                phone_num: '12345678901',
                e_mail: 'admin@xxxx.com',
                role: '管理员',
                permission: '1级',
                working_address: '北京电信规划设计院',
                registed_time: '2022-08-09  19:00',
                status: false
            },],
            multipleSelection: [],
            show: true,
            total:0
        }
    },
    methods: {
        cancleChecked() {
            //
        },
        handleSelectionChange(){

        },
        handleClick() {
            //
        }
    }
}
</script>
<style lang="less" scoped>
.el-tag {
    width: 12px;
    height: 12px;
    border-radius: 100px;
    padding: 0;
}

.bottom {
    position: absolute;
    left: 20px;
    right: 16px;
    bottom: 20px;
    height: 50px;
    line-height: 20px;
    background-color: rgba(255, 255, 255, 1);
    text-align: center;

    .checkbox {
        position: absolute;
        left: 29px;
        top: 15px;
        font-size: 14px;
    }

    .check-cancel {
        position: absolute;
        // line-height: 20px;
        font-size: 14px;
        text-align: center;
        left: 140px;
        top: 10px;
    }

    .bottom_button {
        position: absolute;
        left: 200px;
        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>