<template>
  <div>
    <!-- 文物清单表格 -->
    <TablePage :data="crList.records" :tableTitle="crTabletitle">
      <template v-slot:status="data">
        <el-switch
          slot="reference"
          :value="Boolean(Number(data.scope.status))"
        ></el-switch>
      </template>
      <template v-slot:faceImagePressUrl="data">
        <img
          :src="$getFullUrl(data.scope.faceImagePressUrl)"
          alt="暂无图片"
          style="
            cursor: pointer;
            width: 80px;
            height: 80px;
            object-fit: contain;
          "
          @click="handelPreviewImages(data.scope.faceImagePressUrl)"
        />
      </template>
    </TablePage>
    <!-- <el-pagination
      background
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="Number(crList.current)"
      :page-sizes="[10, 20, 40, 50]"
      :page-size="Number(crList.size)"
      layout="total, sizes, prev, pager, next, jumper"
      :total="Number(crList.total)"
      class="pagination"
    >
    </el-pagination> -->
  </div>
</template>

<script>
import TablePage from "@/components/Table/TablePage.vue";
import { crTabletitle } from "../../config";
export default {
  components: {
    TablePage,
  },
  props: {
    crList: {
      type: Object,
      default: () => ({}),
    },
  },
  data() {
    return {
      crTabletitle,
    };
  },
  methods: {
    // 改变页容量
    handleSizeChange(value) {
      this.list.size = value;
      this.loadData();
    },

    // 改变当前显示页
    handleCurrentChange(value) {
      this.list.current = value;
      this.loadData();
    },
  },
};
</script>

<style></style>
