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

const detailSchema = ref<DescriptionsSchema[]>([
  {
    field: 'pkid',
    label: '主键'
  },
  {
    field: 'sourceSystemCode',
    label: '源系统编码'
  },
  {
    field: 'targetSystemCode',
    label: '目标系统编码'
  },
  {
    field: 'systemGroupName',
    label: '系统组'
  },
  {
    field: 'checkVersion',
    label: '校验版本号'
  },
  {
    field: 'ruleMakingOrgan',
    label: '规则编制机构'
  },
  {
    field: 'riskLevel',
    label: '风险等级'
  },
  {
    field: 'attentionDegree',
    label: '官方关注度'
  },
  {
    field: 'businessType',
    label: '业务类型'
  },
  {
    field: 'frequency',
    label: '执行频度'
  },
  {
    field: 'comparator',
    label: '比较符'
  },
  {
    field: 'faultTolerance',
    label: '容差范围'
  },
  {
    field: 'ruleDesc',
    label: '规则描述'
  },
  {
    field: 'isEnable',
    label: '是否启用'
  },
  {
    field: 'isEnforcement',
    label: '是否强制执行'
  }
])

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

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