<template>
    <!-- 接收数据详情 -->
    <el-dialog title="查看统计结果" :visible.sync="visible" v-dialogDrag width="50%" :before-close="cancel">
      <el-table border :data="viewData" max-height="500px">
        <el-table-column type="index" width="100" label="序号" align="center">
        </el-table-column>
        <el-table-column prop="className"  label="门类名称" align="center">
        </el-table-column>
        <el-table-column prop="pdfPageNum"  label="页数" align="center">
        </el-table-column>
      </el-table>
      <!-- <el-pagination
        @current-change="handleCurrentChange"
        @size-change="handleSizeChange"
        layout="total, prev, pager, next, sizes"
        :page-size="pagination.pageSize"
        :page-sizes="[10, 20, 30, 50]"
        :current-page="pagination.pageNum"
        :total="pagination.total"
      >
    </el-pagination> -->
    </el-dialog>
  </template>
  
  <script>
  import { message } from "@/utils/common";
  import {viewData} from "@/api/archives-management/statistics.js";
  export default {
    props: {
      visible: {
        type: Boolean,
        default: () => false,
      },
      tableRow:{
        type:Object,
        default:()=>{}
      }
    },
    data() {
      return {
        viewData:[],
        pagination: {
          pageSize: 10,
          pageNum: 1,
          total: 0,
        },
      };
    },
    methods: {
        // 查看数据接口
        getViewData(){
          viewData({statisticsPdfId:this.tableRow.id}).then((res)=>{
            if(res.code == 100){
              this.viewData = [];
              this.viewData = res.body.list;
            }
          })
        },
        handleCurrentChange(val){
          this.pagination.pageNum = val;
          this.getViewData()
        },
        handleSizeChange(val){
          this.pagination.pageSize = val;
          this.pagination.pageNum = 1;
          this.getViewData();
        },
        cancel() {
          this.$emit("clickCancel");
        },
    },
    
  };
  </script>
  
  <style></style>
  