<script setup lang="tsx">
import { PropType, ref } from 'vue'
import { TableData } from '@/api/reporting/RepTemplate/RepTemplate/types'
import { Descriptions, DescriptionsSchema } from '@/components/Descriptions'

const detailSchema = ref<DescriptionsSchema[]>([
  {
    field: 'tName',
    label: '名称'
  },
  {
    field: 'tCategory',
    label: '报告分类'
  },
  {
    field: 'createUser',
    label: '编写人'
  },
  {
    field: 'uploadUser',
    label: '上传人'
  },
  {
    field: 'tStatus',
    label: '状态'
  },
  {
    field: 'tVersion',
    label: '版本'
  },
  {
    field: 'createTime',
    label: '上传时间'
  },
  {
    field: 'updateTime',
    label: '修改时间'
  },
  {
    field: 'tDescription',
    label: '描述'
  },
  {
    field: 'organCode',
    label: '所属机构'
  }
])

defineProps({
  currentRow: {
    type: Object as PropType<TableData>,
    default: () => {}
  }
})
</script>

<template>
  <Descriptions :schema="detailSchema" :data="currentRow || {}" />
</template>
