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

const detailSchema = ref<DescriptionsSchema[]>([
  {
    field: 'treeId',
    label: '编号'
  },
  {
    field: 'treeName',
    label: '机构树名称'
  },
  {
    field: 'startDate',
    label: '开始日期'
  },
  {
    field: 'endDate',
    label: '结束日期'
  },
  {
    field: 'createUser',
    label: '创建用户'
  }
])

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

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