<template>
  <a-modal
    :title="modalTitle"
    :width="850"
    :visible="visible"
    :confirmLoading="confirmLoading"
    class="ant-modal2"
    @cancel="handleCancel"
  >
    <detail-list title="" :col="2">
      <detail-list-item term="请求类型">{{ model.type }}</detail-list-item>
      <detail-list-item term="请求参数名">{{ model.name }}</detail-list-item>
      <detail-list-item term="请求地址">{{ model.url }}</detail-list-item>
      <detail-list-item term="请求方法">{{ model.method }}</detail-list-item>
      <detail-list-item term="响应code">{{ model.code }}</detail-list-item>
      <detail-list-item term="响应消息">{{ model.message }}</detail-list-item>
      <detail-list-item term="请求唯一标识">{{ model.requestId }}</detail-list-item>
      <detail-list-item term="请求参数json">{{ model.params }}</detail-list-item>
      <detail-list-item term="请求结果json">{{ model.result }}</detail-list-item>
      <detail-list-item term="备注">{{ model.remark }}</detail-list-item>
      <detail-list-item term="更新人">{{ model.updateUserId }}</detail-list-item>
      <detail-list-item term="更新人名称">{{ model.updateUserName }}</detail-list-item>
      <detail-list-item term="创建人">{{ model.createdUserId }}</detail-list-item>
      <detail-list-item term="更新日期">{{ model.updateTime }}</detail-list-item>
    </detail-list>

    <template slot="footer">
      <a-button :loading="confirmLoading" type="primary" @click="handleCancel()">返回</a-button>
    </template>
  </a-modal>
</template>

<script>
import DetailList from '@/components/tools/DetailList'
const DetailListItem = DetailList.Item

export default {
  name: 'SysRequestLogDetail',
  components: {
    DetailList,
    DetailListItem
  },
  data () {
    return {
      confirmLoading: false,
      mdl: {},
      modalTitle: null,
      visible: false,
      // 下拉框map
      model: {
        'type': null,
        'name': null,
        'url': null,
        'method': null,
        'code': null,
        'message': null,
        'requestId': null,
        'params': null,
        'result': null,
        'remark': null,
        'updateUserId': null,
        'updateUserName': null,
        'createdUserId': null,
        'updateTime': null
      }
    }
  },
  created () {
    // 下拉框map
  },
  methods: {
    base (record) {
      this.visible = true
      this.modalTitle = '详情'
      this.model = record
    },
    handleCancel () {
      this.visible = false
      this.confirmLoading = false
    }

  }
}
</script>
