<template>
  <div class="plate-box" >
    <h2 class="DetailsTit"><span>{{ title }}</span></h2>
    <div style="width:100%;overflow:hildden;overflow-x:auto;">
    <table  class="table" style="">
      <tr>
        <th  v-if="isShow('监测时间')"  width="124px">时间</th>
        <th v-if="isShow('体温')" width="72px">体温(℃)</th>
        <th v-if="isShow('血压')" width="72px">血压(mmhg)</th>
        <th v-if="isShow('脉搏')" width="80px">脉搏(次/分)</th>
        <th v-if="isShow('呼吸频率')" width="110px">呼吸频率(次/分)</th>
        <th width="76px">静脉压/动脉压(mmhg)</th>
        <th v-if="isShow('血流量')" width="92px">血流量(ml/min)</th>
        <th v-if="isShow('跨膜压')" width="76px">跨膜压(mmhg)</th>
        <th v-if="isShow('超滤量')" width="76px">超滤量(L)</th>
        <th v-if="isShow('钠浓度')" width="92px">钠浓度(mmol/L)</th>
        <th v-if="isShow('透析液温度')" width="92px">透析液温度(℃)</th>
        <th v-if="isShow('置换率')" width="92px">置换率(L/h)</th>
        <th v-if="isShow('置换量')" width="92px">置换量(L)</th>
        <th v-if="isShow('电导度')" width="92px">电导度(mS/m)</th>
        <th v-if="isShow('置换液流量')"  width="92px">置换液流量(ml/h)</th>
        <th v-if="isShow('病情变化')" width="92px">病情变化</th>
        <th v-if="isShow('处理')"  width="92px">处理</th>
        <th v-if="isShow('结果')" width="92px">结果</th>
      </tr>
      <tr v-for="(monitor, index) in monitores" :key="index">
        <td  v-if="isShow('监测时间')">{{ parseTime(monitor.operate_time, "{y}-{m}-{d} {h}:{i}") }}</td>
        <td v-if="isShow('体温')">{{ monitor.temperature?monitor.temperature:'' }}</td>
        <td v-if="isShow('血压')">{{ monitor.systolic_blood_pressure?monitor.systolic_blood_pressure:'' }}/{{ monitor.diastolic_blood_pressure?monitor.diastolic_blood_pressure:'' }}</td>
        <td v-if="isShow('脉搏')">{{ monitor.pulse_frequency?monitor.pulse_frequency:'' }}</td>
        <td v-if="isShow('呼吸频率')">{{ monitor.breathing_rate?monitor.breathing_rate:'' }}</td>
        <td>{{ monitor.venous_pressure?monitor.venous_pressure:'' }} /{{ monitor.arterial_pressure?monitor.arterial_pressure:'' }} </td>
        <td v-if="isShow('血流量')">{{ monitor.blood_flow_volume?monitor.blood_flow_volume:'' }}</td>
        <td v-if="isShow('跨膜压')">{{ monitor.transmembrane_pressure?monitor.transmembrane_pressure:'' }}</td>
        <td v-if="isShow('超滤量')">{{ monitor.ultrafiltration_volume?monitor.ultrafiltration_volume:'' }}</td>
        <td v-if="isShow('钠浓度')">{{ monitor.sodium_concentration?monitor.sodium_concentration:'' }}</td>
        <td v-if="isShow('透析液温度')">{{ monitor.dialysate_temperature?monitor.dialysate_temperature:'' }}</td>
        <td v-if="isShow('置换率')">{{ monitor.replacement_rate?monitor.replacement_rate:'' }}</td>
        <td v-if="isShow('置换量')">{{ monitor.displacement_quantity?monitor.displacement_quantity:'' }}</td>
        <td v-if="isShow('电导度')">{{ monitor.conductivity?monitor.conductivity:'' }}</td>
        <th v-if="isShow('置换液流量')" >{{monitor.displacement_flow_quantity?monitor.displacement_flow_quantity:''}}</th>
        <td v-if="isShow('病情变化')">{{ monitor.symptom }}</td>
        <td v-if="isShow('处理')">{{ monitor.dispose }}</td>
        <td v-if="isShow('结果')">{{ monitor.result }}</td>
      </tr>
      </table>
     </div>
    <div class="middleLine"></div>
  </div>
</template>

<script>
  import store from '@/store'

import { parseTime } from '@/utils'

export default {
  name: 'statOrder',
  data() {
      return {
        title: '透析监测 '
      }
  },
  props: {
      monitores: {
        type: Array
      }
  },
  methods: {
      parseTime(time, layout) {
        return parseTime(time, layout)
      }, isShow(name) {
        var filedList = store.getters.xt_user.fileds
        for (let i = 0; i < filedList.length; i++) {
          if (filedList[i].module == 4 && filedList[i].filed_name_cn == name && filedList[i].is_show == 1) {
            return true
          }
        }
        return false
      }
  }
}
</script>

<style rel="stylesheet/scss" lang="scss" scoped>

.table {
  width: 1500px;
  overflow: auto;
  font-size: 14px;
  text-align: center;
  border: $border-color;
  padding-bottom: 2px;
  tr {
    padding: 0;
    margin: 0;
    padding: 10px 0;
    th {
      background: $main-color;
      border: none;
      color: #fff;
      padding: 0;
      margin: 0;
      height: 44px;
      font-weight: normal;
      padding: 18px 0;
    }
    td {
      background: #f0f5fa;
      border: none;
      padding: 18px 0;
    }
  }
}
</style>



