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

const detailSchema = ref<DescriptionsSchema[]>([
  {
    field: 'pId',
    label: '系统编号',
    width:1,
  },
  {
    field: 'jId',
    label: '作业编号',
  },
  {
    field: 'id',
    label: '任务ID'
  },
  {
    field: 'name',
    label: '任务名称'
  },
  {
    field: 'tBtid',
    label: '批次id'
  },
  {
    field: 'createUser',
    label: '创建者'
  },
  {
    field: 'organId',
    label: '机构编号'
  },
  {
    field: 'createTime',
    label: '创建时间'
  },
  {
    field: 'startTime',
    label: '开始时间'
  },
  {
    field: 'endTime',
    label: '结束时间'
  },
  {
    field: 'state',
    label: '状态',
  },
  {
    field: 'tFailNum',
    label: '失败尝试次数'
  },
  {
    field: 'tFailInterval',
    label: '尝试间隔时间(秒)'
  },
  {
    field: '',
    label: ''
  },
  {
    field: 'paramJson',
    label: '报文',
    span:2,
    width:1,
  }
])

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

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