<template>
  <a-modal
    :title="modalTitle"
    :width="850"
    :visible="visible"
    :confirmLoading="confirmLoading"
    @cancel="handleCancel"
  >
    <detail-list title="" :col="2">
      <detail-list-item term="名称">{{ model.name }}</detail-list-item>
      <detail-list-item term="类型 ">{{ model.type }}</detail-list-item>
      <detail-list-item term="文件地址">{{ model.url }}</detail-list-item>
      <detail-list-item term="html地址">{{ model.htmlUrl }}</detail-list-item>
      <detail-list-item term="条件">{{ model.condition }}</detail-list-item>
      <detail-list-item term="修改时间">{{ model.updateTime }}</detail-list-item>
      <detail-list-item term="创建人">{{ model.createdUserId }}</detail-list-item>
      <detail-list-item term="最后修改人">{{ model.updateUserId }}</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: 'SysExcelImportDetail',
  components: {
    DetailList,
    DetailListItem
  },
  data () {
    return {
      confirmLoading: false,
      mdl: {},
      modalTitle: null,
      visible: false,
      model: {
        'name': null,
        'type': null,
        'url': null,
        'htmlUrl': null,
        'condition': null,
        'updateTime': null,
        'createdUserId': null,
        'updateUserId': null,
        'updateUserName': null
      }
    }
  },
  methods: {
    base (record) {
      this.visible = true
      this.modalTitle = '详情'
      this.model = record
    },
    handleCancel () {
      this.visible = false
      this.confirmLoading = false
    }

  }
}
</script>
