<template>
  <a-modal
    :title="modalTitle"
    :width="850"
    :visible="visible"
    :confirmLoading="confirmLoading"
    @cancel="handleCancel"
  >
    <detail-list title="" :col="2">
      <detail-list-item term="年份">{{ model.year }}</detail-list-item>
      <detail-list-item term="月份">{{ model.month }}</detail-list-item>
      <detail-list-item term="完好数">{{ model.intactNum }}</detail-list-item>
      <detail-list-item term="待修数">{{ model.repairNum }}</detail-list-item>
      <detail-list-item term="事故数">{{ model.accidentNum }}</detail-list-item>
      <detail-list-item term="总数">{{ model.sumNum }}</detail-list-item>
      <detail-list-item term="添加人ID">{{ model.createdUserId }}</detail-list-item>
      <detail-list-item term="最后修改用户ID">{{ model.updateUserId }}</detail-list-item>
      <detail-list-item term="最后修改时间">{{ model.updateTime }}</detail-list-item>
      <detail-list-item term="修改人名称">{{ model.updateUserName }}</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: 'MonthlySbThreeRateDetail',
  components: {
    DetailList,
    DetailListItem
  },
  data () {
    return {
      confirmLoading: false,
      mdl: {},
      modalTitle: null,
      visible: false,
      // 下拉框map
      model: {
        'year': null,
        'month': null,
        'intactNum': null,
        'repairNum': null,
        'accidentNum': null,
        'sumNum': null,
        'createdUserId': null,
        'updateUserId': null,
        'updateTime': null,
        'updateUserName': null
      }
    }
  },
  created () {
    // 下拉框map
  },
  methods: {
    base (record) {
      this.visible = true
      this.modalTitle = '详情'
      this.model = record
    },
    handleCancel () {
      this.visible = false
      this.confirmLoading = false
    }

  }
}
</script>
