<template>
  <a-card :bordered='false' v-show='visible' class='card' :title='modalTitle'>
    <a-row :gutter='48' slot='extra'>
      <a-col :md='48' :sm='48'>
              <span class='table-page-search-submitButtons' style='float: right'>
                <a-button style='margin-left: 8px' type='default' @click='handleCancel()'>返回</a-button>
              </span>
      </a-col>
    </a-row>
    <detail-list title='' :col='2'>
      <detail-list-item term='设备'>{{ model.sbName }}</detail-list-item>
      <detail-list-item term='更改内容'>{{ model.content }}</detail-list-item>
      <detail-list-item term='位号'>{{ model.sbNoId }}</detail-list-item>
      <detail-list-item term='记录时间'>{{ model.createdTime }}</detail-list-item>
      <detail-list-item term='记录人'>{{ model.createdUserName }}</detail-list-item>
      <detail-list-item term='开始时间'>{{ model.startTime }}</detail-list-item>
      <detail-list-item term='结束时间'>{{ model.endTime }}</detail-list-item>
    </detail-list>
  </a-card>
</template>

<script>
import DetailList from '@/components/tools/DetailList'

const DetailListItem = DetailList.Item

export default {
  name: 'SbChangeRecordDetail',
  components: {
    DetailList,
    DetailListItem
  },
  data() {
    return {
      confirmLoading: false,
      mdl: {},
      modalTitle: null,
      visible: false,
      // 下拉框map
      model: {
        'createdUserId': null,
        'updateUserId': null,
        'createdUserName': null,
        'sbId': null,
        'content': null,
        'oldPositionId': null,
        'positionId': null,
        'sbNoId': null,
        'oldParentId': null,
        'parentId': null,
        'updateTime': null,
        'startTime': null,
        'endTime': null,
        'changeType': null,
        'sbName': null
      }
    }
  },
  created() {
    // 下拉框map

  },
  methods: {
    base(record) {
      this.visible = true
      this.modalTitle = '详情'
      this.model = record
    },
    handleCancel() {
      this.visible = false
      this.confirmLoading = false
      this.$emit('ok')
    }
  }
}
</script>
