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

const detailSchema = ref<DescriptionsSchema[]>([
  {
    field: 'indexsetCode',
    label: '指标集编码'
  },
  {
    field: 'beginDate',
    label: '开始日期'
  },
  {
    field: 'endDate',
    label: '结束日期'
  },
  {
    field: 'indexsetName',
    label: '指标集名称'
  },
  {
    field: 'organCode',
    label: '机构编码'
  },
  {
    field: 'frequency',
    label: '频度'
  },
  {
    field: 'description',
    label: '描述'
  },
  {
    field: 'indexsetType',
    label: '指标集类型'
  },
  {
    field: 'modelCode',
    label: '数据模型编码'
  },
  {
    field: 'createOrgan',
    label: '创建机构'
  },
  {
    field: 'createUser',
    label: '创建用户'
  }
])

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

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