<template>
  <div>
    <Modal v-model="showDetailModal" v-drag title="常规环境检测详情" class="modal-footer-none">
      <div class="maxHeight">
        <table class="tableClass">
          <tbody>
            <tr>
              <th>类型</th>
              <td>{{ type }}</td>
            </tr>
            <tr>
              <th>位置</th>
              <td>{{ obj.location }}</td>
            </tr>
            <tr>
              <th>相对湿度(%)</th>
              <td>{{ obj.humidity }}</td>
            </tr>
            <tr>
              <th>温度(℃)</th>
              <td>{{ obj.temperature }}</td>
            </tr>
            <tr>
              <th>监测日期</th>
              <td>
                {{ obj.monitorFormat?$dateformat(obj.monitorDate,obj.monitorFormat):obj.monitorDate?$dateformat(obj.monitorDate,'yyyy-mm-dd'):'' }}
              </td>
            </tr>
            <tr>
              <th>记录人</th>
              <td>{{ obj.recorderName }}</td>
            </tr>
          </tbody>
        </table>
      </div>
    </Modal>
  </div>
</template>
<script>
/**
 * 常规环境检测详情
 */

export default {
  data() {
    return {
      obj: {},
      showDetailModal: false,
      type: '',
      date: {
        monitorDate: ''
      }
    }
  },
  methods: {
    _open(obj) {
      this.showDetailModal = true
      this.obj = obj
      if (this.obj.type === 0) {
        this.type = '常规'
      } else if (this.obj.type === 1) {
        this.type = '微生物'
      }
      // this.date.monitorDate = obj.monitorDate ? this.$dateformat(obj.monitorDate, "yyyy-mm-dd") : '';
    }
  }
}
</script>
