<!--正常-->
<template>
  <div class="normalPage">
    <el-table class="table-box" v-loading="loading" border :data="listData">
      <el-table-column  label="姓名" align="left" prop="userName" show-overflow-tooltip width="200"/>
      <el-table-column label="实验室" align="left" prop="subName" show-overflow-tooltip/>
      <el-table-column label="签到时间" align="left" prop="signIn" show-overflow-tooltip width="320"/>
      <el-table-column label="签退时间" align="left" prop="signOut" show-overflow-tooltip width="320"/>
      <el-table-column label="停留时间" align="left" prop="residenceTime" show-overflow-tooltip width="320"/>
    </el-table>
    <pagination :page-sizes="[5, 10, 15, 20]"
                :total="total"
                style="margin-top:10px;"
                layout="total, prev, pager, next, sizes, jumper"
                :page.sync="param.page"
                :limit.sync="param.pageSize"
                @pagination="getListPlan"
    />
  </div>
</template>

<script>
  import { listStandard } from '@/api/integratedManagement/index'
  export default {
    name: 'normalPage',
    props:{
      propsPageData:{},
    },
    data(){
      return{
        listData:[],
        loading:false,
        param:{
          page:1,
          pageSize:10,
        },
        total:0,
      }
    },
    created(){
      this.getListPlan();
    },
    mounted(){

    },
    methods:{
      //获取数据
      getListPlan(){
        this.loading = true;
        let obj = {
          page:this.param.page,
          pageSize:this.param.pageSize,
          signIn:this.propsPageData.time,
          deptId:this.propsPageData.checkTreeId,
        }
        listStandard(obj).then(response => {
          this.$set(this,'total',response.data.total);
          this.$set(this,'listData',response.data.records);
          this.loading = false;
        })
      },
    }
  }
</script>

<style scoped lang="scss">
  .normalPage{
    flex:1;
    display: flex;
    flex-direction: column;
  }
</style>
