<!-- 检定证书列表 --> <script lang="ts" setup name="CertificationRecords"> import type { TableColumn } from '@/components/NormalTable/table_interface' const props = defineProps({ // 样品id sampleId: { type: String, required: true, }, }) // 证书列表 interface SimpleCertification { certificationCode: string // 证书编号 certificationName: string // 证书形成 certificationType: string // 证书类型 effectiveDate: string // 证书出具日期 expirationDate: string // 证书有效期 } // 查询条件 const searchQuery = ref({ sampleId: '', orderId: '', }) // 表格表头 const columns = ref<TableColumn[]>([ { text: '证书编号', value: 'certificationCode' }, { text: '证书名称', value: 'certificationName' }, { text: '证书类型', value: 'certificationType' }, { text: '证书出具日期', value: 'effectiveDate' }, { text: '证书有效期', value: 'expirationDate' }, ]) // 证书列表 const list = ref<SimpleCertification[]>([]) const total = ref(0) // 加载状态 const loading = ref(false) // 查找证书状态及列表 function fetchData() { loading.value = true list.value = [ { certificationCode: '1231231212', expirationDate: '2022-01-02', certificationName: '校准证书', certificationType: '自检', effectiveDate: '2022-01-02' }, ] loading.value = false } fetchData() </script> <template> <div> <normal-table :data="list" :total="total" :columns="columns" :list-loading="loading" :pagination="false" /> </div> </template>