<!-- 证书监控 -->
<script lang="ts" setup name="CertificationMonitor">
import type { TableColumn } from '@/components/NormalTable/table_interface'

const props = defineProps({
  // 样品id
  sampleId: {
    type: String,
    required: true,
  },
  // 委托单id
  orderId: {
    type: String,
    required: true,
  },
})

// 查询条件
const searchQuery = ref({
  sampleId: '',
  orderId: '',
})

// 表格表头
const columns = ref<TableColumn[]>([
  { text: '证书编号', value: 'certificationReportCode', align: 'center' },
  { text: '证书名称', value: 'certificationReportName', align: 'center' },
  { text: '证书类型', value: 'certificationReportCategoryName', align: 'center' },
  { text: '证书状态', value: 'certificationState', align: 'center' },
  { text: '初次提交审核时间', value: 'text', align: 'center' },
  { text: '完成时间', value: 'text', align: 'center' },
  { text: '退回次数', value: 'text', align: 'center' },
  { text: '制作人', value: 'text', align: 'center' },
])

// 应出具证书数
const requireCertifications = ref(0)
// 当前证书数
const currentCertifications = ref(0)
// 证书列表
const list = ref([])
const total = ref(0)
// 加载状态
const loading = ref(false)
// 查找证书状态及列表
function fetchData() {
  loading.value = true
  list.value = [
    { certificationReportCode: '1231231212', certificationReportName: '校准证书', certificationReportCategoryName: '样品内部检校证书', certificationState: '未完成', text: '' },
  ]
  loading.value = false
}
fetchData()
</script>

<template>
  <div>
    <normal-table
      :data="list" :total="total" :columns="columns"
      :list-loading="loading"
      :pagination="false"
    />
  </div>
</template>
