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

const detailSchema = ref<DescriptionsSchema[]>([
  {
    field: 'pId',
    label: '系统'
  },
  {
    field: 'sId',
    label: '任务ID'
  },
  {
    field: 'jId',
    label: '作业ID'
  },
  {
    field: 'sName',
    label: '任务名称'
  },
  {
    field: 'sType',
    label: '任务类型'
  },
  {
    field: 'sSystem',
    label: '系统'
  },
  {
    field: 'sCron',
    label: 'cron表达式'
  },
  {
    field: 'sStatus',
    label: '状态,0:启用,1:停止'
  },
  {
    field: 'createUser',
    label: '创建人'
  },
  {
    field: 'createTime',
    label: '创建时间'
  },
  {
    field: 'updateTime',
    label: '更新时间'
  },
  {
    field: 'createOrgan',
    label: '创建机构'
  },
  {
    field: 'dataDate',
    label: '业务日期'
  },
  {
    field: 'sDescription',
    label: '任务描述'
  }
])

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

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