normalPage.vue 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <!--正常-->
  2. <template>
  3. <div class="normalPage">
  4. <el-table v-loading="loading" border :data="listData">
  5. <el-table-column label="姓名" align="left" prop="userName" show-overflow-tooltip width="200"/>
  6. <el-table-column label="实验室" align="left" prop="subjectName" show-overflow-tooltip/>
  7. <el-table-column label="签到时间" align="left" prop="signIn" show-overflow-tooltip width="320"/>
  8. <el-table-column label="签退时间" align="left" prop="signOut" show-overflow-tooltip width="320"/>
  9. <el-table-column label="停留时间" align="left" prop="residenceTime" show-overflow-tooltip width="320"/>
  10. </el-table>
  11. <pagination :page-sizes="[5, 10, 15, 20]"
  12. :total="total"
  13. style="margin-top:10px;"
  14. layout="total, prev, pager, next, sizes, jumper"
  15. :page.sync="param.pageNum"
  16. :limit.sync="param.pageSize"
  17. @pagination="getListPlan"
  18. />
  19. </div>
  20. </template>
  21. <script>
  22. import { listStandard } from '@/api/laboratory/patrolRecord'
  23. export default {
  24. name: 'normalPage',
  25. props:{
  26. propsPageData:{},
  27. },
  28. data(){
  29. return{
  30. listData:[],
  31. loading:false,
  32. param:{
  33. pageNum:1,
  34. pageSize:10,
  35. },
  36. total:0,
  37. }
  38. },
  39. created(){
  40. this.getListPlan();
  41. },
  42. mounted(){
  43. },
  44. methods:{
  45. //获取数据
  46. getListPlan(){
  47. this.loading = true;
  48. let obj = {
  49. pageNum:this.param.pageNum,
  50. pageSize:this.param.pageSize,
  51. signIn:this.propsPageData.time,
  52. deptId:this.propsPageData.checkTreeId,
  53. }
  54. listStandard(obj).then(response => {
  55. this.$set(this,'total',response.total);
  56. this.$set(this,'listData',response.rows);
  57. this.loading = false;
  58. })
  59. },
  60. }
  61. }
  62. </script>
  63. <style scoped lang="scss">
  64. .normalPage{
  65. flex:1;
  66. display: flex;
  67. flex-direction: column;
  68. }
  69. </style>