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

const detailSchema = ref<DescriptionsSchema[]>([
  {
    field: 'subNo',
    label: '风险要素'
  },
  {
    field: 'subCode',
    label: '子项代码'
  },
  {
    field: 'subName',
    label: '子项'
  },
  {
    field: 'custType',
    label: '客户类型'
  },
  {
    field: 'upSubNo',
    label: '上级代码'
  },
  {
    field: 'subWight',
    label: '权重'
  },
  {
    field: 'subDesc',
    label: '说明'
  },
  {
    field: 'treelaye',
    label: '层级'
  },
  {
    field: 'grade',
    label: '分数'
  },
  {
    field: 'isLast',
    label: '是否子节点'
  },
  {
    field: 'isEdit',
    label: '是否可编辑'
  },
  {
    field: 'orderby',
    label: '排序'
  },
  {
    field: 'lawerMan',
    label: '法人代码'
  },
  {
    field: 'lawerOrg',
    label: '法人机构'
  },
  {
    field: 'gathertype',
    label: '采集类型'
  },
  {
    field: 'flag',
    label: '启用标识'
  },
  {
    field: 'topName',
    label: '最上级节点名称'
  },
  {
    field: 'viewOrderby',
    label: '页面排序'
  }
])

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

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