<template>
  <!--四性检测-档案详情内-->
  <div class="fourTest-container">
    <el-table :data="tableData">
      <el-table-column prop="admin" label="检测人" min-width="60" />
      <el-table-column prop="createTime" label="检测时间" min-width="180">
        <template slot-scope="scope">
          <div>{{ scope.row.createTime | parseTime }}</div>
        </template>
      </el-table-column>
      <el-table-column prop="truth" label="真实性" align="center">
        <template slot-scope="scope">
          <span v-if="scope.row.truth===1" class="four-icon iconfont icon-zhengque" />
          <span v-else class="four-icon iconfont icon-cuowu" />
        </template>
      </el-table-column>
      <el-table-column prop="integrity" label="完整性" align="center">
        <template slot-scope="scope">
          <span v-if="scope.row.integrity===1" class="four-icon iconfont icon-zhengque" />
          <span v-else class="four-icon iconfont icon-cuowu" />
        </template>
      </el-table-column>
      <el-table-column prop="availability" label="可用性" align="center">
        <template slot-scope="scope">
          <span v-if="scope.row.availability===1" class="four-icon iconfont icon-zhengque" />
          <span v-else class="four-icon iconfont icon-cuowu" />
        </template>
      </el-table-column>
      <el-table-column prop="safety" label="安全性" align="center">
        <template slot-scope="scope">
          <span v-if="scope.row.safety===1" class="four-icon iconfont icon-zhengque" />
          <span v-else class="four-icon iconfont icon-cuowu" />
        </template>
      </el-table-column>
      <el-table-column prop="createDate" label="检测结果" min-width="220">
        <template slot-scope="scope">
          <div>共检测{{ scope.row.totalNum }}项，<span class="testSuccess">通过{{ scope.row.successNum }}条</span>，<span class="testError">未通过{{ scope.row.errorNum }}条</span></div>
        </template>
      </el-table-column>
    </el-table>
    <!--分页组件-->
    <el-pagination
      :current-page="page.page"
      :total="page.total"
      :page-size="page.size"
      :pager-count="5"
      layout="total, prev, pager, next, sizes"
      @size-change="handleSizeChange"
      @current-change="handleCurrentPage"
    />
  </div>
</template>

<script>
const data = [
  {
    'id': '005E76FEC5A2AAB368CA1F',
    'admin': 'admin',
    'archive_no': 'YXK-2022-JJ-001 ',
    'maintitle': '文书档案001',
    'createTime': 1660706815000,
    'truth': 0,
    'integrity': 1,
    'availability': 0,
    'safety': 0,
    'totalNum': 5,
    'successNum': 1,
    'errorNum': 0
  },
  {
    'id': '005E76FEC5A2AAB368CA1F2',
    'admin': 'admin',
    'archive_no': 'YXK-2022-JJ-002 ',
    'maintitle': '文书档案001',
    'createTime': 1660706815000,
    'truth': 0,
    'integrity': 1,
    'availability': 1,
    'safety': 0,
    'totalNum': 5,
    'successNum': 1,
    'errorNum': 0
  }
]
export default {
  name: 'FourTestInfo',
  components: { },
  mixins: [],
  data() {
    return {
      tableData: [{}, {}],
      page: {
        page: 1,
        size: 10,
        total: 0
      }
    }
  },
  created() {

  },
  mounted() {
    this.tableData = data
  },
  methods: {
    handleSizeChange(size) {
      this.page.size = size
      this.page.page = 1
    },
    handleCurrentPage(val) {
      this.page.page = val
    }
  }
}
</script>

<style lang='scss' scoped>
@import "~@/assets/styles/collect-reorganizi.scss";
</style>
