<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="设备id">{{ model.sbId }}</detail-list-item>
      <detail-list-item term="设备名称">{{ model.sbName }}</detail-list-item>
      <detail-list-item term="点位">{{ model.positionNum }}</detail-list-item>
      <detail-list-item term="类型">
        {{ BaseTool.Object.getField(map,model.type) }}</detail-list-item>
      <detail-list-item term="描述">{{ model.description }}</detail-list-item>
      <detail-list-item term="实时数值">{{ model.result }}</detail-list-item>
      <detail-list-item term="系数">{{ model.ratio }}</detail-list-item>
      <detail-list-item term="单位">{{ model.unit }}</detail-list-item>
      <detail-list-item term="备注">{{ model.remark }}</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.updateTime }}</detail-list-item>
    </detail-list>
  </a-card>
</template>

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

const DetailListItem = DetailList.Item

export default {
  name: 'RemoteDegreeDetail',
  components: {
    DetailList,
    DetailListItem
  },
  data () {
    return {
      confirmLoading: false,
      mdl: {},
      modalTitle: null,
      map: {},
      visible: false,
      // 下拉框map
      model: {
        'sbId': null,
        'sbName': null,
        'positionNum': null,
        'type': null,
        'description': null,
        'result': null,
        'ratio': null,
        'unit': null,
        'remark': null,
        'createdUserId': null,
        'updateUserId': null,
        'updateTime': null
      }
    }
  },
  created () {
    // 下拉框map

    this.map = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REMOTE_DEGREE)
  },
  methods: {
    base (record) {
      this.visible = true
      this.modalTitle = '详情'
      this.model = record
    },
    handleCancel () {
      this.visible = false
      this.confirmLoading = false
    }
  }
}
</script>
