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

const detailSchema = ref<DescriptionsSchema[]>([
  {
    field: 'serviceId',
    label: '服务标识'
  },
  {
    field: 'serviceName',
    label: '服务名称'
  },
  {
    field: 'serviceType',
    label: '服务类型'
  },
  {
    field: 'serviceVersion',
    label: '服务版本号'
  },
  {
    field: 'requestMethod',
    label: '请求方式'
  },
  {
    field: 'requestDate',
    label: '请求日期'
  },
  {
    field: 'requestTime',
    label: '请求时间'
  },
  {
    field: 'requestReport',
    label: '请求报文'
  },
  {
    field: 'responseDate',
    label: '响应日期'
  },
  {
    field: 'responseTime',
    label: '响应时间'
  },
  {
    field: 'responseStatus',
    label: '响应状态'
  },
  {
    field: 'responseMessage',
    label: '响应消息'
  },
  {
    field: 'usageTime',
    label: '用时'
  },
  {
    field: 'responseReport',
    label: '响应报文'
  },
  {
    field: 'temp1',
    label: '备用1'
  },
  {
    field: 'temp2',
    label: '备用2'
  },
  {
    field: 'temp3',
    label: '备用3'
  },
  {
    field: 'temp4',
    label: '备用4'
  },
  {
    field: 'temp5',
    label: '备用5'
  }
])

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

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