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

const detailSchema = ref<DescriptionsSchema[]>([
  {
    field: 'pkid',
    label: '等级编码'
  },
  {
    field: 'levelkey',
    label: '等级'
  },
  {
    field: 'levelname',
    label: '等级名称'
  },
  {
    field: 'levelmax',
    label: '最高分'
  },
  {
    field: 'levelmin',
    label: '最低分'
  },
  {
    field: 'nextDate',
    label: '下次评级日期（天）'
  },
  {
    field: 'orderby',
    label: '下轮重评日期（天）'
  }
])

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

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