<template>
  <!-- 排班表填充内容 -->
    <div>
      <div style="min-width: 60px;min-height: 20px;font-size: 12px;">
          <span :class='modeColor(scheduleDetail.mode_id)'>{{scheduleDetail.patient}}</span>
          <span v-if="scheduleDetail.mode_id>2 && scheduleDetail.mode_id !=0">
            <br/>
          </span>
          <template v-if="schedulMode">
            <span v-if="scheduleDetail.mode_id>0"  :class='modeColor(scheduleDetail.mode_id)'>{{'('+modename(scheduleDetail.mode_id)+')'}}</span>
          </template>
          <!-- <template v-if="schedulFlag">
            <br/><span>{{scheduleDetail.dialysis_machine_name}}</span>
          </template> -->
      </div>
    </div>
</template>

<script>
export default {
  name: "scheduleItem",
  props:{
      scheduleDetail:{
          type:Object,
          default: function (){
              return {
                mode_id:0,
                mode_name:'',
                patient_id:0,
                patient:"",
                dialysis_machine_name:"",
              }
          },
      },
      schedulFlag:{
        type:Boolean,
        default:false
      },
      schedulMode:{
        type:Boolean,
        default:true
      }
  },
  data() {
    return {
      mode:[{id:1,name:'HD'},{id:2,name:'HDF'},{id:3,name:'HD+HP'},{id:4,name:'HP'},{id:5,name:'HF'},{id:6,name:'SCUF'},{id:7,name:'IUF'}
      ,{id:8,name:'HFHD'},{id:9,name:'HFHD+HP'},{id:10,name:'PHF'},{id:11,name:'HFR'},{id:12,name:'HDF+HP'},{id:13,name:'CRRT'},{id:14,name:'腹水回输'}
      ,{id:15,name:'IUF+HD'},{id:16,name:'UF'},{id:17,name:'HD+'},{id:18,name:'血浆胆红素吸附+HDF'},{id:19,name:'H血浆胆红素吸附'},{id:20,name:'I-HDF'},{id:21,name:'HD高通'}
      ,{id:22,name:'CVVH'},{id:23,name:'CVVHD'},{id:24,name:'CVVHDF'},{id:25,name:'PE'},{id:26,name:'血浆胆红素吸附+HP'},{id:27,name:'HPD'},{id:28,name:'HDP'}
      ,{id:29,name:'HFD'},{id:30,name:'HDF100'},{id:31,name:'HDF600'},{id:32,name:'HDF800'},{id:33,name:'HDF1000'}]
    }
  },
  created(){
  },

  methods:{
      modeColor(ids){
          if(ids == 1){

          }else if(ids == 2){
              return 'modeRed'
          }else if(ids == 3){
              return 'modePurple'
          }
      },
      modename(val){
        for(let i in this.mode){
          if(val==this.mode[i].id){
            return this.mode[i].name
          }
        }
      }
  }
};
</script>

<style lang="scss" scoped>
.modeRed{
  color:#ee0ad0;
}
.modePurple{
  color: #53b86e;
}
</style>
