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

const detailSchema = ref<DescriptionsSchema[]>([
  {
    field: 'rulecode',
    label: '规则编码'
  },
  {
    field: 'ruledesc',
    label: '规则描述'
  },
  {
    field: 'ruletype',
    label: '规则类型'
  },
  {
    field: 'rulesql',
    label: '规则sql'
  },
  {
    field: 'ruledomain',
    label: '是否有阈值'
  },
  {
    field: 'status',
    label: '状态是否可用'
  }
])

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

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