<template>
    <div class="form">
        <div class="header">
            <p style="text-align: left;margin-top: 10px;margin-left: 20px;">历史记录</p><span><i
                    class="el-icon-close"></i></span>
        </div>
        <el-tag>{{ label }}</el-tag>
        <div class="content">
            <div style="display: flex; color:#c5c4c4; padding: 10px;">
                <p style="margin-left: 20px;">{{ time }}</p>
            </div>
            <el-table border :data="tableData" tooltip-effect="dark" 
                :header-cell-style="{ textAlign: 'center' }" :cell-style="{ textAlign: 'center' }" style="width: 100%">
                <el-table-column type="index" width="50" label="序号">
                </el-table-column>
                <el-table-column prop="name" label="姓名">
                </el-table-column>
                <el-table-column prop="job_number" label="工号">
                </el-table-column>
                <el-table-column prop="phone_number" label="联系方式">
                </el-table-column>
                <el-table-column prop="territory" label="负责区域">
                </el-table-column>
                <el-table-column prop="photo" label="照片">
                    <template slot-scope="scope">
                        <el-image :src="scope.row.photo" style="width: 40px; height: 40px;" :preview-src-list="[scope.row.photo]"></el-image>
                    </template>
                </el-table-column>
                <el-table-column prop="status" label="状态">
                </el-table-column>
            </el-table>
        </div>
    </div>
</template>

<script>
export default {
    data() {
        return {
            label: "前台人员",
            time: '2022年9月8日 18：00',
            tableData:[{
                name:'张三',
                job_number:'01111',
                phone_number:'12345678901',
                territory:'九层前台',
                photo:'https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png',
                status:'正常'
            },
            {
                name:'张三',
                job_number:'01111',
                phone_number:'12345678901',
                territory:'九层前台',
                photo:'https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png',
                status:'休假'
            },
            {
                name:'张三',
                job_number:'01111',
                phone_number:'12345678901',
                territory:'九层前台',
                photo:'https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png',
                status:'正常'
            }
            ]
        }
    }

}
</script>
<style lang="less" scoped>
.form {
    position: absolute;
    left: 500px;
    width: 700px;
    top: 200px;
    height: 700px;
    box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.15);
}


.header {
    position: absolute;
    top: 0;
    width: 700px;
    height: 40px;
    box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.15);

    .el-icon-close {
        position: absolute;
        top: 10px;
        right: 10px;
    }
}

.el-tag {
    position: absolute;
    background-color: transparent;
    border-color: transparent;
    font-size: 25px;
    color: #000;
    top: 50px;
    left: 20px;
}

.content {
    margin-top: 82px;
    .el-table{
        width: 90% !important;
        margin-left:5%;
    }
}
</style>