<template>
    <div  style="width: 100vw;height: 100%vh;background: rgb(247, 247, 247);">
        <div class="entrance">
            <div class="entrance-l">
                <div class="entrance-l-t">
                    <div class="ent-l ent">
                        <span>人员出入</span>
                        <div class="ent-div"></div>
                        <div class="ent-ruchang">
                            <div class="ent-ru-in">
                                <div class="ru-in-l">
                                    <img src="../../assets/img/Shape.png" alt="">
                                </div>
                                <div class="ru-in-r">
                                    <span>入场</span>
                                    <div style="color: #0fb980;">{{importCount?importCount:0}}</div>
                                </div>
                            </div>
                            <div class="ent-ru-in">
                                <div class="ru-in-l">
                                    <img src="../../assets/img/11.png" alt="">
                                </div>
                                <div class="ru-in-r">
                                    <span>出场</span>
                                    <div style="color: #f95f5f;">{{exportCount?exportCount:0}}</div>
                                </div>
                            </div>
                            <div class="ent-ru-in">
                                <div class="ru-in-l">
                                    <img src="../../assets/img/user.png" alt="">
                                </div>
                                <div class="ru-in-r">
                                    <span>在场</span>
                                    <div style="color: #3a65ed">{{stayInCount?stayInCount:0}}</div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="ent-l ent">
                        <span>车辆出入</span>
                        <div class="ent-div"></div>
                        <div class="ent-ruchang">
                            <div class="ent-ru-in">
                                <div class="ru-in-l">
                                    <img src="../../assets/img/Group 1.png" alt="">
                                </div>
                                <div class="ru-in-r">
                                    <span>入场</span>
                                    <div style="color: #0fb980;">0</div>
                                </div>
                            </div>
                            <div class="ent-ru-in">
                                <div class="ru-in-l">
                                    <img src="../../assets/img/Gr.png" alt="">
                                </div>
                                <div class="ru-in-r">
                                    <span>出场</span>
                                    <div style="color: #f95f5f;">0</div>
                                </div>
                            </div>
                            <div class="ent-ru-in">
                                <div class="ru-in-l">
                                    <img src="../../assets/img/Group.png" alt="">
                                </div>
                                <div class="ru-in-r">
                                    <span>在场</span>
                                    <div style="color: #3a65ed">0</div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <!-- <div class="ent-r ent">
                        <span>车辆出入</span>
                        <div class="ent-div"></div>
                        <div class="ent-r-car">
                            <div class="r-car-in">
                                <img src="../../assets/img/Group 1.png" alt="">
                                <div>车辆进场</div>
                                <p style="color: #07b9b9;">0</p>
                            </div>
                            <div class="r-car-in">
                                <img src="../../assets/img/Gr.png" alt="">
                                <div>车辆进场</div>
                                <p style="color: rgb(250 81 81);">0</p>
                            </div>
                            <div class="r-car-in">
                                <img src="../../assets/img/Group.png" alt="">
                                <div>车辆进场</div>
                                <p style="color: rgb(54 98 236);">0</p>
                            </div>
                        </div>
                    </div> -->
                </div>

                <div class="entrance-l-a">
                    <div class="ent-b-car1">
                        <span>人员入场</span>
                        <div class="ent-div"></div>
                        <div class="ent-b-in">
                            <div class="a-in1">
                                <img src="../../assets/img/biguser.png" alt="">
                            </div>
                            <div class="a-in2">
                                <div>人员姓名：<span>{{lastImportData?lastImportData.personName:"-"}}</span> </div>
                                <div>员工ID：<span>{{lastImportData?lastImportData.personNum:"-"}}</span> </div>
                                <div>入场时间：<span>{{lastImportData?lastImportData.actionTime:"-"}}</span> </div>
                            </div>
                        </div>
                    </div>
                    <div class="ent-b-car1">
                        <div class="a-car-out">
                            <div>人员出场</div>
                            <div style="color: #c5c6c7;font-size: 14px;">出入记录</div>
                        </div>
                        <div class="ent-div"></div>
                        <div class="ent-b-in">
                            <div class="a-in1">
                                <img src="../../assets/img/biguser.png" alt="">
                            </div>
                            <div class="a-in2">
                                <div>人员姓名：<span>{{lastExportData?lastExportData.personName:"-"}}</span> </div>
                                <div>员工ID：<span>{{lastExportData?lastExportData.personNum:"-"}}</span> </div>
                                <div>出场时间：<span>{{lastExportData?lastExportData.actionTime:"-"}}</span> </div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="entrance-l-b">
                    <div class="ent-b-car1">
                        <span>车辆入场</span>
                        <div class="ent-div"></div>
                        <div class="ent-b-in">
                            <img src="../../assets/img/car.png" alt="">
                            <div>车辆类型：<span></span> </div>
                            <div>车辆号牌：<span></span> </div>
                            <div>入场时间：<span></span> </div>
                        </div>
                    </div>
                    <div class="ent-b-car1">
                        <div class="a-car-out">
                            <div>车辆出场</div>
                            <div style="color: #c5c6c7;font-size: 14px;">出入记录</div>
                        </div>
                        <div class="ent-div"></div>
                        <div class="ent-b-in">
                            <img src="../../assets/img/car.png" alt="">
                            <div>车辆类型：<span></span> </div>
                            <div>车辆号牌：<span></span> </div>
                            <div>入场时间：<span></span> </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="entrance-r">
                <span>园区内车辆</span>
                <div class="ent-div"></div>
                <div class="ent-yuanqu">
                    <el-table
                    :data="tableData"
                    style="width: 100%">
                    <el-table-column
                        prop="date"
                        label="车牌号"
                        width="170">
                    </el-table-column>
                    <el-table-column
                        prop="name"
                        label="类型">
                    </el-table-column>
                    <el-table-column
                        prop="address"
                        label="入场时间"
                        width="200">
                    </el-table-column>
                    </el-table>
                    <!-- <el-pagination
                        layout="prev, pager, next"
                        :total="1000">
                    </el-pagination> -->
                </div>
            </div>

        </div>
    </div>

  </template>

  <script>
    import { getEntranceGuardPersonInfo } from "@/api/entranceguard/entranceguardPerson"
  export default {
    name: "",
    data() {
        return {
          tableData: [
            // { date: '冀A66666',name: '小轿车',address: '2022-10-15 12:00:00'},
            // { date: '冀A66666',name: '小轿车',address: '2022-10-15 12:00:00'},
            // { date: '冀A66666',name: '小轿车',address: '2022-10-15 12:00:00'},
            // { date: '冀A66666',name: '小轿车',address: '2022-10-15 12:00:00'},
            // { date: '冀A66666',name: '小轿车',address: '2022-10-15 12:00:00'},
            // { date: '冀A66666',name: '小轿车',address: '2022-10-15 12:00:00'},
            // { date: '冀A66666',name: '小轿车',address: '2022-10-15 12:00:00'},
            // { date: '冀A66666',name: '小轿车',address: '2022-10-15 12:00:00'},
            // { date: '冀A66666',name: '小轿车',address: '2022-10-15 12:00:00'},
            // { date: '冀A66666',name: '小轿车',address: '2022-10-15 12:00:00'},
            // { date: '冀A66666',name: '小轿车',address: '2022-10-15 12:00:00'},
            // { date: '冀A66666',name: '小轿车',address: '2022-10-15 12:00:00'},
            // { date: '冀A66666',name: '小轿车',address: '2022-10-15 12:00:00'},
            // { date: '冀A66666',name: '小轿车',address: '2022-10-15 12:00:00'},
            // { date: '冀A66666',name: '小轿车',address: '2022-10-15 12:00:00'},
            // { date: '冀A66666',name: '小轿车',address: '2022-10-15 12:00:00'},
        ],
          //入场人数
          exportCount:"",
          //出场人数
          importCount:"",
          //在场人数
          stayInCount:"",
          //最新入场信息
          lastImportData:{},
          //最新出场信息
          lastExportData:{}
        }
      },
    created(){
      this.initPersonData();
    },
    methods:{
      initPersonData(){
        getEntranceGuardPersonInfo().then(res =>{
          //入场人数
          this.importCount = res.data.importCount;
          //出场人数
          this.exportCount = res.data.exportCount;
          //在场人数
          this.stayInCount = res.data.stayInCount;
          //最新入场信息
          this.lastImportData = res.data.lastImportData;
          //最新出场信息
          this.lastExportData = res.data.lastExportData;
        })
      }
    }
  };
  </script>
  <style lang="scss" scoped>
    .entrance{
        width: 85%;
        height: calc(100vh - 50px);
        padding: 30px;
        display: flex;
        justify-content: space-between;
        .entrance-l{
            width: 60%;
            height: 100%;
            /* padding: 20px; */
            .entrance-l-t{
                width: 100%;
                height: 20%;
                display: flex;
                justify-content: space-between;
                .ent{
                    width: 48%;
                    height: 100%;
                    border-radius: 7px;
                    background: #fff;
                    padding: 20px;
                }
                .ent-l{
                    .ent-ruchang{
                        width: 100%;
                        height: 100%;
                        padding-top: 10px;
                        display: flex;
                        justify-content: space-between;

                        .ent-ru-in{
                            width: 100%;
                            height: 30%;
                            display: flex;
                            margin-top: 4%;
                            .ru-in-l{
                                width: 50px;
                                height: 50px;
                                border-radius: 50px;
                                background: rgb(247, 247, 247);
                                line-height: 55px;
                                text-align: center;
                                margin-top: 10px;
                                img{
                                    width: 35%;
                                }
                            }
                            .ru-in-r{
                                padding: 7px 0 0 10px;
                                span{
                                    font-size: 15px;
                                }
                                div{
                                    font-size: 25px;
                                    margin-top: 7px;
                                }
                            }
                        }
                    }
                }
                .ent-r{
                    .ent-r-car{
                        width: 100%;
                        height: 95%;
                        display: flex;
                        justify-content: space-around;
                        .r-car-in{
                            width: 25%;
                            height: 60%;
                            margin-top: 20%;
                            background-color: rgb(247, 247, 247);
                            border-radius: 15px;
                            text-align: center;
                            img{
                                margin-top: 40%;
                            }
                            p{
                                margin-top: 40%;
                                font-size: 30px;
                            }
                        }
                    }
                }
            }
            .entrance-l-a{
                width: 100%;
                height: 27%;
                margin-top: 2%;
                border-radius: 7px;
                background: #fff;
                display: flex;
                justify-content: space-between;
                .ent-b-car1{
                    width: 47%;
                    height: 90%;
                    padding: 20px;
                    .a-car-out{
                        width: 100%;
                        display: flex;
                        justify-content: space-between;
                    }
                    .ent-b-in{
                        padding: 7% 20px 20px 20px;
                        display: flex;
                        justify-content: space-between;
                        width: 100%;
                        height: 100%;
                        .a-in1{
                            width: 30%;
                            height: 100%;
                            img{
                                width: 100%;
                            }
                        }
                        .a-in2{
                            width: 65%;
                            height: 90%;
                            display: flex;
                            flex-direction:column;
                            align-content: flex-end;
                            div{
                                font-size: 15px;
                                span{
                                    color: #a39e9e;
                                }
                            }
                            div:nth-child(2){
                                margin-top: 35px;
                            }
                            div:last-child{
                                margin-top: 35px;
                            }

                        }

                    }
                }
            }
            .entrance-l-b{
                width: 100%;
                height: 49%;
                margin-top: 2%;
                border-radius: 7px;
                background: #fff;
                display: flex;
                justify-content: space-between;
                .ent-b-car1{
                    width: 47%;
                    height: 90%;
                    padding: 20px;
                    .a-car-out{
                        width: 100%;
                        display: flex;
                        justify-content: space-between;
                    }
                    .ent-b-in{
                        padding: 30px 20px;
                        img{
                            width: 100%;
                        }
                        div{
                            margin-top: 20px;
                            span{
                                color: #a39e9e;
                            }
                        }
                    }
                }
            }
        }
        .entrance-r{
            width: 38%;
            height: 100%;
            background: #fff;
            border-radius: 7px;
            padding: 20px;
            .ent-yuanqu{
                width: 100%;
                height: 95%;
                padding: 10px;
                text-align: center;
            }
        }
    }

.ent-div{
   width: 100%;
   height: 1px;
   background-color: rgb(205, 207, 209);
   margin-top: 7px;
}
::v-deep .el-table th > .cell {
    text-align: center;
}
::v-deep .el-table tr td .cell {
    text-align: center;
}
  </style>
