<template>
  <div class="plate-box">
    <h2 class="title">
      <span class="line"></span>
      <p>{{ title }}</p>
      <span class="line"></span>
    </h2>
    <div class="plate ">
      <ul>
        <li>
          <label>透后称重 : </label>
          <span class="content">{{ weight_after }}</span>
          <span class="unit">kg</span>
        </li>
        <li>
          <label>收缩压 : </label>
          <span class="content">{{ systolic_blood_pressure }}</span>
          <span class="unit">mmHg</span>
        </li>
        <li>
          <label>实际超滤量: </label>
          <span class="content">{{ actual_ultrafiltration }}</span>
          <span class="unit">L</span>
        </li>
        <li>
          <label>疑血 : </label>
          <span class="content">{{ cruor }}</span>
        </li>
        <li style="height: 0.6rem;">
          <label></label>
        </li>
      </ul>
      <ul>
        <li>
          <label>体重减少 : </label>
          <span class="content">{{ weight_loss }}</span>
          <span class="unit">kg</span>
        </li>
        <li>
          <label>舒张压 : </label>
          <span class="content">{{ diastolic_blood_pressure }}</span>
          <span class="unit">mmHg</span>
        </li>
        <li>
          <label>实际置换量 : </label>
          <span class="content">{{ actual_displacement }}</span>
          <span class="unit">ml</span>
        </li>
        <li>
          <label>透后症状 : </label>
          <span class="content">{{ symptom_after_dialysis }}</span>
        </li>
        <li>
          <label>导管 : </label>
          <span class="content">{{ catheter }}</span>
        </li>
      </ul>
      <ul>
        <li>
          <label>体温 : </label>
          <span class="content">{{ temperature }}</span>
          <span class="unit">℃</span>
        </li>
        <li>
          <label>心率 : </label>
          <span class="content">{{ pulse_frequency }}</span>
          <span class="unit">次/分</span>
        </li>
        <li>
          <label>实际治疗时长 : </label>
          <span class="content"
            >{{ actual_treatment_hour }}时{{ actual_treatment_minute }}分</span
          >
        </li>
        <li>
          <label>透析中入量: </label>
          <span class="content">{{ dialysis_intakes_feed }}</span>
        </li>
        <li>
          <label>并发症: </label>
          <span class="content">{{ complication }}</span>
        </li>
      </ul>
    </div>
    <div class="note">
      备注 : <span>{{ remark }}</span>
    </div>
    <!-- <div class="note">处方医生 : {{doctor}}</div> -->
  </div>
</template>

<script>
export default {
  name: "DialysisPrescription",
  data() {
    return {
      title: "透后评估 ",
      note: "无明显异常",
      doctor: "刘小军  医生",
      info1: [
        { value: "1", label: "透后称重 : ", content: "55", unit: "kg" },
        { value: "2", label: "收缩压 : ", content: "174", unit: "mmHg" },
        { value: "3", label: "实际超滤量: ", content: "20", unit: "ml" },
        { value: "4", label: "疑血 : ", content: "无震颤", unit: "" },
        { value: "5", label: "", content: "", unit: "" }
      ],
      info2: [
        { value: "1", label: "体重减少 : ", content: "3", unit: "kg" },
        { value: "2", label: "舒张压 : ", content: "200", unit: "mmHg" },
        { value: "3", label: "实际置换量 : ", content: "20", unit: "ml" },
        { value: "3", label: "透后症状 : ", content: "无症状", unit: "" },
        { value: "4", label: "导管 : ", content: "导管堵塞", unit: "" }
      ],
      info3: [
        { value: "1", label: "体温 : ", content: "14", unit: "℃" },
        { value: "2", label: "心率 : ", content: "2", unit: "次/分" },
        { value: "3", label: "实际治疗时长 : ", content: "4时4分", unit: "" },
        { value: "4", label: "透析中入量: ", content: "一般", unit: "" },
        { value: "4", label: "并发症: ", content: "痔疮出血", unit: "" }
      ]
    };
  },
  props: {
    record: {
      type: Object
    }
  },
  computed: {
    weight_after: function() {
      if (this.record == null || this.record.id == "") {
        return "";
      }
      return this.record.weight_after;
    },
    systolic_blood_pressure: function() {
      if (this.record == null || this.record.id == "") {
        return "";
      }
      return this.record.systolic_blood_pressure;
    },
    actual_ultrafiltration: function() {
      if (this.record == null || this.record.id == "") {
        return "";
      }
      return this.record.actual_ultrafiltration;
    },
    cruor: function() {
      if (this.record == null || this.record.id == "") {
        return "";
      }
      return this.record.cruor;
    },
    weight_loss: function() {
      if (this.record == null || this.record.id == "") {
        return "";
      }
      return this.record.weight_loss;
    },
    diastolic_blood_pressure: function() {
      if (this.record == null || this.record.id == "") {
        return "";
      }
      return this.record.diastolic_blood_pressure;
    },
    actual_displacement: function() {
      if (this.record == null || this.record.id == "") {
        return "";
      }
      return this.record.actual_displacement;
    },
    symptom_after_dialysis: function() {
      if (this.record == null || this.record.id == "") {
        return "";
      }
      return this.record.symptom_after_dialysis;
    },
    catheter: function() {
      if (this.record == null || this.record.id == "") {
        return "";
      }
      return this.record.catheter;
    },
    temperature: function() {
      if (this.record == null || this.record.id == "") {
        return "";
      }
      return this.record.temperature;
    },
    pulse_frequency: function() {
      if (this.record == null || this.record.id == "") {
        return "";
      }
      return this.record.pulse_frequency;
    },
    actual_treatment_hour: function() {
      if (this.record == null || this.record.id == "") {
        return "";
      }
      return this.record.actual_treatment_hour;
    },
    actual_treatment_minute: function() {
      if (this.record == null || this.record.id == "") {
        return "";
      }
      return this.record.actual_treatment_minute;
    },
    dialysis_intakes_feed: function() {
      if (this.record == null || this.record.id == "") {
        return "";
      }
      return this.record.dialysis_intakes_feed;
    },
    complication: function() {
      if (this.record == null || this.record.id == "") {
        return "";
      }
      return this.record.complication;
    },
    remark: function() {
      if (this.record == null || this.record.id == "") {
        return "";
      }
      return this.record.remark;
    }
  },
  methods: {
    setRecord(record) {
      if (record == null) {
        this.info1[0].content = "";
        this.info1[1].content = "";
        this.info1[2].content = "";
        this.info1[3].content = "";
        this.info1[4].content = "";

        this.info2[0].content = "";
        this.info2[1].content = "";
        this.info2[2].content = "";
        this.info2[3].content = "";
        this.info2[4].content = "";

        this.info3[0].content = "";
        this.info3[1].content = "";
        this.info3[2].content = "";
        this.info3[3].content = "";
        this.info3[4].content = "";

        this.note = "";
      } else {
        this.info1[0].content = record.weight_after;
        this.info1[1].content = record.systolic_blood_pressure;
        this.info1[2].content = record.actual_ultrafiltration;
        this.info1[3].content = record.cruor;
        // this.info1[4].content = record.systolic_blood_pressure

        this.info2[0].content = record.weight_loss;
        this.info2[1].content = record.diastolic_blood_pressure;
        this.info2[2].content = record.actual_displacement;
        this.info2[3].content = record.symptom_after_dialysis;
        this.info2[4].content = record.catheter;

        this.info3[0].content = record.temperature;
        this.info3[1].content = record.pulse_frequency;
        this.info3[2].content = record.actual_treatment_hour;
        this.info3[3].content = record.dialysis_intakes_feed;
        this.info3[4].content = record.complication;

        this.note = record.remark;
      }
    }
  }
};
</script>

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