<template>
  <basic-container>
    <avue-crud :option="option"  :data="data" :page="page"

               @size-change="sizeChange" >

    </avue-crud>
  </basic-container>
</template>

<script>
export default {
  props:{
    openDoorRecordList:[],
  },
  data() {
    return {
      form: {},
      query: {},
      loading: true,
      page: {
        pageSize: 10,
        currentPage: 1,
        total: 0
      },

      option: {
        height:'auto',
        calcHeight: 30,
        tip: false,
        searchShow: true,
        searchMenuSpan: 6,
        border: true,
        index: true,
        viewBtn: false,
        menu: false,
        addBtn: false,
        editBtn: false,
        delBtn: false,
        selection: true,
        dialogClickModal: false,
        column: [
          {
            label: "开门时间",
            prop: "openTime",

          },
          {
            label: "门状态",
            prop: "openStatus",
          }
        ]
      },
      data: []
    };
  },
  created(){
    console.log("create")
    this.data = this.openDoorRecordList;
    this.page.total = this.openDoorRecordList.length;
    console.log("data"+JSON.stringify(this.data))
    console.log("size"+this.page.total)
  },
  methods: {




    sizeChange(pageSize){
      this.page.pageSize = pageSize;
    },

  }
};
</script>

<style>
</style>
