<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 style="height: 0.6rem;">
          <label>入室方式 : </label>
          <span class="content">{{way}}</span>
        </li>
        <li style="height: 0.6rem;">
          <label>病人情况 : </label>
          <span class="content">{{condition}}</span>
        </li>
      </ul>
      <ul>
        <li style="height: 0.6rem;">
          <label>病人意识 : </label>
          <span class="content">{{consciousness}}</span>
        </li>
        <li style="height: 0.6rem;">
          <label> </label>
          <span class="content"> </span>
        </li>
      </ul>
      <ul>
        <li style="height: 0.6rem;">
          <label>病人食欲 : </label>
          <span class="content">{{appetite}}</span>
        </li>
        <li style="height: 0.6rem;">
          <label> </label>
          <span class="content"> </span>
        </li>
      </ul>
    </div>
    <!-- <div class="note">处方医生 : {{doctor}}</div> -->
  </div>    
</template>

<script>
export default {
  name: "AcceptsAssessment",
  data() {
    return {
      title: "接诊评估 ",
      // doctor: "刘小军  医生",
      // row1: [
      //   { value: "1", label: "入室方式 : ", content: "", unit: "" },
      //   { value: "2", label: "病人情况 : ", content: "", unit: "" }
      // ],
      // row2: [
      //   { value: "1", label: "病人意识 : ", content: "", unit: "" },
      //   { value: "2", label: " ", content: " ", unit: " " }
      // ],
      // row3: [
      //   { value: "1", label: "病人食欲 : ", content: "", unit: "" },
      //   { value: "2", label: " ", content: " ", unit: " " }
      // ],

      ways: {
        "1": "步行",
        "2": "扶行",
        "3": "轮椅",
        "4": "平车",
      },
      conditions: {
        "1": "住院",
        "2": "手术期",
      },
      consciousnesses: {
        "1": "清醒",
        "2": "嗜睡",
        "3": "昏迷",
      },
      appetites: {
        "1": "正常",
        "2": "减退",
        "3": "恶心",
        "4": "呕吐",
        "5": "腹泻",
      },
    };
  },
  props: {
    record: {
      type: Object
    }
  },
  computed: {
    way: function() {
      if (this.record == null || this.record.id == "") {
        return ""
      } else {
        return this.ways[this.record.way] + ""
      }
    },
    condition: function() {
      if (this.record == null || this.record.id == "") {
        return ""
      } else {
        return this.conditions[this.record.condition] + ""
      }
    },
    consciousness: function() {
      if (this.record == null || this.record.id == "") {
        return ""
      } else {
        return this.consciousnesses[this.record.consciousness] + ""
      }
    },
    appetite: function() {
      if (this.record == null || this.record.id == "") {
        return ""
      } else {
        return this.appetites[this.record.appetite] + ""
      }
    }
  },
  methods: {
    // setRecord(record) {
    //   if (record == null) {
    //     this.row1[0].content = ""
    //     this.row1[1].content = ""
    //     this.row2[0].content = ""
    //     this.row3[0].content = ""
    //   } else {
    //     this.row1[0].content = this.ways[record.way]
    //     this.row1[1].content = this.conditions[record.condition]
    //     this.row2[0].content = this.consciousnesses[record.consciousness]
    //     this.row3[0].content = this.appetites[record.appetite]
    //   }
    // }
  }
};
</script>

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

</style>



