<template>
  <a-card v-show="visible" :title="modalTitle">
    <a slot="extra" @click="handleCancel()">返回</a>
    <div>
      <div style="margin:0; padding:15px 30px; background:#EFEFFB;font-size:16px; color: #1890ff"><b>基本信息</b></div>
      <a-descriptions bordered :column="3">
        <a-descriptions-item label="编码">{{ model.no }}</a-descriptions-item>
        <a-descriptions-item label="名称">{{ model.name }}</a-descriptions-item>
        <a-descriptions-item label="排序">{{ model.sort }}</a-descriptions-item>
        <a-descriptions-item label="备注">{{ model.remark }}</a-descriptions-item>
        <a-descriptions-item label="创建人">{{ model.createdUserName }}</a-descriptions-item>
        <a-descriptions-item label="是否删除"><badge :status="DictCache.COLOR.DELFLAG[model.delFlag]" :text="delFlagMap[model.delFlag]"></badge></a-descriptions-item>
        <a-descriptions-item label="更新日期">{{ model.updateTime }}</a-descriptions-item>
      </a-descriptions>
    </div>
  </a-card>
</template>

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

export default {
  name: 'SbGuigeDetail',
  components: {
    DetailList,
    DetailListItem
  },
  data () {
    return {
      confirmLoading: false,
      mdl: {},
      modalTitle: null,
      visible: false,
      model: {
        'no': null,
        'name': null,
        'sort': null,
        'delFlag': null,
        'remark': null,
        'createdUserId': null,
        'updateTime': null,
        'createdUserName': null
      },
      delFlagMap: {}
    }
  },
  created () {
    this.delFlagMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.DELFLAG)
  },
  methods: {
    base (record) {
      this.visible = true
      this.modalTitle = '详情'
      this.model = record
    },
    handleCancel () {
      this.visible = false
      this.confirmLoading = false
      this.$emit("ok")
    }

  }
}
</script>
<style scoped>

</style>
