<template>
  <a-drawer
    title="文件详情"
    width="640"
    placement="right"
    :visible="visible"
    @close="onClose">
    <a-descriptions :column="1">
      <a-descriptions-item label="附件ID">{{ model.id }}</a-descriptions-item>
      <a-descriptions-item label="来源ID">{{ model.sourceId }}</a-descriptions-item>
      <a-descriptions-item label="附件名称">{{ model.fileName }}</a-descriptions-item>
      <a-descriptions-item label="附件新名称">{{ model.newName }}</a-descriptions-item>
      <a-descriptions-item label="附件类型">{{ model.fileType }}</a-descriptions-item>
      <a-descriptions-item label="附件存放地址">{{ model.realPath }}</a-descriptions-item>
      <a-descriptions-item label="URL地址">{{ model.url }}</a-descriptions-item>
      <a-descriptions-item label="创建时间">{{ model.createTime | moment('YYYY-MM-DD HH:mm:ss') }}</a-descriptions-item>
      <a-descriptions-item label="最近修改">{{ model.updateTime | moment('YYYY-MM-DD HH:mm:ss') }}</a-descriptions-item>
    </a-descriptions>
  </a-drawer>
</template>

<script>

export default {
  data () {
    return {
      model: {},
      visible: false
    }
  },
  methods: {
    show (obj) {
      this.visible = true
      this.model = obj
    },
    onClose () {
      this.model = {}
      this.visible = false
    }
  }
}
</script>
