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

const detailSchema = ref<DescriptionsSchema[]>([
  {
    field: 'jPid',
    label: '项目编号'
  },
  {
    field: 'jName',
    label: '作业名称'
  },
  {
    field: 'jType',
    label: '作业类型'
  },
  {
    field: 'paramJson',
    label: '自定义参数'
  },
  {
    field: 'jDescription',
    label: '作业中文名称'
  },
  {
    field: 'jBeforeJob',
    label: '前置作业名称'
  },
  {
    field: 'jobGroup',
    label: '作业分组'
  },
  {
    field: 'jobRetryTimes',
    label: '失败重试次数(整数）'
  },
  {
    field: 'jobRetryPeriod',
    label: '失败重试间隔（单位：分钟）'
  },
  {
    field: 'jobPriority',
    label: '作业优先级'
  }
])

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

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