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

const detailSchema = ref<DescriptionsSchema[]>([
  {
    field: 'pkid',
    label: '序号'
  },
  {
    field: 'productCode',
    label: '产品号'
  },
  {
    field: 'productName',
    label: '产品名称'
  },
  {
    field: 'organCode',
    label: '所属机构号'
  },
  {
    field: 'organName',
    label: '所属机构名称'
  },
  {
    field: 'isman',
    label: '是否人工发起'
  },
  {
    field: 'manDate',
    label: '人工发起日期'
  },
  {
    field: 'manRiskReason',
    label: '评估原因'
  },
  {
    field: 'gatherDate',
    label: '采集日期'
  },
  {
    field: 'gatherScore',
    label: '采集分数'
  },
  {
    field: 'lastRiskDate',
    label: '上次评级日期'
  },
  {
    field: 'lastRiskScore',
    label: '上一轮评级分数'
  },
  {
    field: 'riskInitialDate',
    label: '初评日期'
  },
  {
    field: 'riskInitialLevel',
    label: '初评结果'
  },
  {
    field: 'riskRepeatDate',
    label: '复评日期'
  },
  {
    field: 'riskRepeatLevel',
    label: '复评结果'
  },
  {
    field: 'riskRepeatUser',
    label: '复评人'
  },
  {
    field: 'riskInitialUser',
    label: '初评人'
  },
  {
    field: 'statusNo',
    label: '任务状态'
  },
  {
    field: 'nextDate',
    label: '下次评级日期'
  },
  {
    field: 'riskScore',
    label: '当前评级分数'
  },
  {
    field: 'riskLevel',
    label: '风险等级'
  },
  {
    field: 'lastRiskLevel',
    label: '上次评级结果'
  },
  {
    field: 'gatherLevel',
    label: '采集等级'
  },
  {
    field: 'riskInitialScore',
    label: '初评分数'
  },
  {
    field: 'riskRepeatScore',
    label: '复评分数'
  },
  {
    field: 'riskReason',
    label: '评级原因'
  },
  {
    field: 'repeatReason',
    label: '复评退回原因'
  },
  {
    field: 'launchDate',
    label: '产品推出日期'
  }
])

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

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