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

const detailSchema = ref<DescriptionsSchema[]>([
  {
    field: 'jId',
    label: '作业ID'
  },
  {
    field: 'jName',
    label: '任务名称'
  },
  {
    field: 'jType',
    label: '任务类型'
  },
  {
    field: 'jSystem',
    label: '系统'
  },
  {
    field: 'createUser',
    label: '创建人'
  },
  {
    field: 'createTime',
    label: '创建时间'
  },
  {
    field: 'updateTime',
    label: '更新时间'
  },
  {
    field: 'createOrgan',
    label: '创建机构'
  },
  {
    field: 'jPath',
    label: '下载文件路径'
  },
  {
    field: 'jRely',
    label: '依赖关系'
  },
  {
    field: 'paramJson',
    label: '参数json字符串'
  },
  {
    field: 'repCode',
    label: '相关报表编号'
  },
  {
    field: 'jJobexec',
    label: '执行器,V2'
  },
  {
    field: 'jDescription',
    label: '描述'
  }
])

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

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