<template>
  <div class="monitoring">
   <div>
          <!-- <span class="computerTime">上机时间:{{getTimes(dialysis_order.start_time)}}</span> -->
          <!-- <van-cell>
               <template #title><span style="color:#7b8c9c">上机时间:{{getTimes(dialysis_order.start_time)}}</span>
              </template>
          </van-cell> -->
           <div style="padding:0 1rem;height:1.875rem;line-height:1.875rem;color: #323233;font-size:0.875rem;" v-if="this.org_id == 9671 || this.org_id == 10340">
              透析模式:
              <span v-if="prescription_prop!=null&&prescription_prop.mode_id>0">{{getModeName(prescription_prop.mode_id)}}</span>
          </div>
          <div style="padding:0 1rem;height:1.875rem;line-height:1.875rem;color: #323233;font-size:0.875rem;" v-if="this.org_id == 9671 || this.org_id == 10340 || org_id == 10751 || org_id == 10752">
              目标超滤量:<span v-if="prescription_prop!=null">{{prescription_prop.target_ultrafiltration}}ml</span>
              透析时长:
               <span v-if="prescription_prop!=null&&prescription_prop.dialysis_duration_hour>0">{{prescription_prop.dialysis_duration_hour}}时</span>
               <span v-if="prescription_prop!=null&&prescription_prop.dialysis_duration_minute>0">{{prescription_prop.dialysis_duration_minute}}分</span>

          </div>
           <div style="padding:0 1rem;height:1.875rem;line-height:1.875rem;color: #323233;font-size:0.875rem;" v-if="this.org_id == 9671 || this.org_id == 10469 || this.org_id == 9675 || org_id == 10751 || org_id == 10752">
              处方脱水量:<span v-if="prescription_prop!=null">{{prescription_prop.prescription_water}}ml
            </span>
          </div>

          <div style="padding:0 1rem;height:1.875rem;line-height:1.875rem;color: #323233;font-size:0.875rem;">
              上机时间:{{getTimes(dialysis_order.start_time)}}
             <span v-if="this.org_id == 9671 || this.org_id == 10340">下机时间:{{getTime(dialysis_order.end_time)}}</span>
          </div>
          <div v-if="monitorRecords.length > 0" style="width:100%;overflow-x:auto;">
            <table class="table newMonitTable" style>
              <tr @click="selectRow(-1, null)">
                  <th v-if="isShow('监测时间')" width="60px" >时间</th>
                  <th v-if="isShow('血压')" width="40px" style="width:5%"> 血压 <br />(mmHg) </th>
                  <th v-if="isShow('血压1')" width="40px" style="width:5%"> 血压 <br />(mmHg) </th>
                  <th v-if="isShow('拒测血压')" width="20px" style="width:5%"> 拒测 <br />血压</th>
                  <th v-if="isShow('血压监测部位')" width="40px">血压监测部位</th>
                  <th v-if="isShow('脉搏')" width="30px"> 脉搏 <br />(次/分) </th>
                  <th v-if="isShow('脉搏1')" width="30px"> 脉搏 <br />(次/分) </th>
                  <th v-if="isShow('体温')" width="40px" style="width:6%"> 体温 <br />(℃) </th>
                  <th v-if="isShow('体温1')" width="40px" style="width:6%"> 体温 <br />(℃) </th>
                  <th v-if="isShow('呼吸频率')" width="50px" style="width:6%"> 呼吸频率 <br />(次/分) </th>
                  <th v-if="isShow('血流量')" width="40px" style="width:5%"> 血流量 <br />(ml/min) </th>
                  <th v-if="isShow('血流量1')" width="40px" style="width:5%"> 血流量 <br />(ml/min) </th>
                  <th width="60px" style="width:6%"> 静脉压/动脉压 <br />({{monitorRecords[0]&&monitorRecords[0]['venous_pressure_type'] == 2 ? 'kpa' : 'mmHg'}}) </th>
                  <th v-if="isShow('跨膜压')" width="40px" style="width:6%"> 跨膜压 <br />({{monitorRecords[0]&&monitorRecords[0]['transmembrane_pressure_type'] == 2 ? 'kpa' : 'mmHg'}}) </th>
                  <th v-if="isShow('跨膜压1')" width="40px" style="width:6%"> 跨膜压 <br />({{monitorRecords[0]&&monitorRecords[0]['transmembrane_pressure_type'] == 2 ? 'kpa' : 'mmHg'}}) </th>
                  
                  <th v-if="isShow('超滤率') && (template_id ==6 || template_id == 10 || template_id == 11 || template_id == 12 || template_id == 13 || template_id == 17 || template_id == 18 || template_id == 19 || template_id == 20 || template_id == 21 || template_id == 22 || template_id == 23 || template_id == 24 || template_id == 26 || template_id == 31 || template_id == 34 || template_id == 35 || template_id == 38 || template_id == 41 || template_id == 43 || template_id == 44 || template_id == 47 || template_id == 48 || template_id == 53 || template_id == 54 || template_id == 56 || template_id == 65 || org_id == 10432 || org_id == 10445 || org_id == 10375 || org_id == 10480 || org_id == 10551  || org_id == 10537 || org_id ==10597 || org_id ==10599 || org_id == 10580 || org_id ==10629 || org_id ==10617 || org_id==10677|| org_id==10667 || org_id == 10693 || org_id ==10702 || org_id == 10697 || org_id ==10635 || org_id == 10723 || org_id ==10721 || org_id == 10727 || org_id == 10206 || org_id == 10740 || org_id == 10742 || org_id ==10745 || org_id == 10751 || org_id == 10752 || org_id == 10757)" width="50px" style="6%"> 超滤率 <br />(ml/h) </th>
                  <th v-if="isShow('超滤率') && template_id !=6 && template_id !=10 && template_id !=11 && template_id !=12 && template_id !=13 && template_id !=17 && template_id !=18 && template_id !=19 && template_id !=20 && template_id !=21 && template_id !=22 && template_id !=23 && template_id !=24 && template_id !=26 && template_id !=31 && template_id !=34 && template_id !=35 && template_id !=38 && template_id !=41 && template_id !=43 && template_id !=44 && template_id !=47 && template_id !=48 && template_id !=53 && template_id !=54 && template_id !=56 && template_id !=65 && org_id!=10432 && org_id!=10445 && org_id!=10375  && org_id!=10480 && org_id!=10551 && org_id!=10537 && org_id!=10597 && org_id!=10599 && org_id!=10580 && org_id!=10629 && org_id!=10617  && org_id!=10677 && org_id!=10667 && org_id!=10693 && org_id!=10702 && org_id!=10697 && org_id!=10635 && org_id!=10723 && org_id!=10721  && org_id!=10727 && org_id!=10206&&org_id!=10740 && org_id!=10742 && org_id!=10745 && org_id!=10751 && org_id!=10752 && org_id!=10757" width="50px" style="6%"> 超滤率 <br />(L/h) </th>
                  <th v-if="isShow('超滤率2')" width="60px">超滤率 <br />(ml/h) </th>
                  
                  <th v-if="isShow('超滤量') && (template_id ==5 || template_id ==6 || template_id == 10 || template_id == 11 || template_id == 12 || template_id == 13 || template_id == 17 || template_id == 18 || template_id == 19 || template_id == 20 || template_id == 21 || template_id == 22 || template_id == 23 || template_id == 24 || template_id == 26 || org_id == 9555 || template_id == 27 || template_id == 29 || template_id == 30 || template_id == 31 || template_id == 32 || template_id == 34 || template_id == 35 || template_id == 36 || template_id == 38 || template_id == 40 || template_id == 9 || template_id == 41 || template_id == 43 || template_id == 44 || template_id == 47 || template_id == 46 || template_id == 48 || template_id == 53 || template_id == 54 || template_id == 65 || template_id == 56 || template_id == 60 || org_id == 10340 || org_id == 10387 || org_id == 10432 || org_id == 10445 || org_id == 10375 || org_id == 10480 || org_id == 10551 || org_id == 10485 || org_id ==10597 || org_id ==10599 || org_id ==10612 || org_id ==10580 || org_id ==10629 || org_id ==10617 || org_id==10677 || org_id==10667 || org_id==10693 || org_id ==10702 || org_id ==10697 || org_id ==10635 || org_id==10723 || org_id == 10721 || org_id ==10727 || org_id == 10206 || org_id == 10742 || org_id == 10740 || org_id == 10745 || org_id == 10751 || org_id == 10752 || org_id == 10757) && org_id!=10471" width="50px" style="width:6%"> 超滤量 <br />(ml) </th>
                  <th v-if="isShow('超滤量') && (template_id != 5 && template_id !=6 && template_id !=10 && template_id !=11 && template_id !=12 && template_id !=13 && template_id !=17 && template_id !=18 && template_id !=19 && template_id !=20 && template_id !=21 && template_id !=22 && template_id !=23 && template_id !=24 && template_id !=26 && org_id !=9555 && template_id!=27 && template_id!=29 && template_id!=30 && template_id!=31 && template_id !=9 && template_id!=32 && template_id!=34 && template_id!=35 && template_id!=36 && template_id!=38 && template_id!=40 && template_id!=41 && template_id!=43 && template_id!=44 && template_id!=47 && template_id!=46  && template_id!=48 && template_id!=53 && template_id!=54 && template_id!=65 && template_id!=56 && template_id!=60 && org_id != 10340 && org_id != 10387 && org_id != 10432  && org_id != 10445 && org_id!=10375 && org_id!=10480 && org_id!=10551 && org_id!=10485 && org_id!=10597 && org_id!=10599&&org_id!=10612 &&org_id!=10580 && org_id !=10629 && org_id!=10617 && org_id!=10677 && org_id!=10667 && org_id!=10693 && org_id!=10702  && org_id!=10697 && org_id!=10635 && org_id!=10723 && org_id!=10721 && org_id!=10727  && org_id!=10206 && org_id!=10740 && org_id!=10742 && org_id!=10745 && org_id !=10751 && org_id!=10752&& org_id!=10757) || org_id ==10471" width="50px" style="width:6%"> 超滤量 <br />(L) </th>

                  <th v-if="isShow('超滤量1')" width="50px" style="width:6%"> 超滤量 <br />(ml) </th>

                  <th v-if="isShow('钠浓度')" width="40px" style="width:6%"> 钠浓度 <br />(mmol/L) </th>
                  <th v-if="isShow('钠浓度1')" width="40px" style="width:6%"> 钠浓度 <br />(mmol/L) </th>
                  <th v-if="isShow('透析液温度')" width="60px" style="width:6%"> 透析液温度 <br />(℃) </th>
                  <th v-if="isShow('透析液温度1')" width="60px" style="width:6%"> 透析液温度 <br />(℃) </th>
                  <th v-if="isShow('置换率') && (template_id ==6 || template_id == 10 || template_id == 11 || template_id == 20 || template_id == 26 || template_id == 29  || template_id == 46 || template_id == 48 || template_id == 53 || template_id == 54 || org_id == 10340 || org_id == 10445 || org_id == 10410 || org_id ==10617 || org_id ==10598 || org_id ==10677 || org_id==10702 || org_id == 10727 || org_id ==10721 || org_id == 10727 || org_id == 10206 || org_id == 10751 || org_id == 10752 || org_id == 10757) && org_id!=10558 && org_id!=10414 && org_id!=10677 && org_id!=10353 " width="50px" style="width:6%"> 置换率 <br />(ml/min) </th>
                  <th v-if="isShow('置换率') && (template_id !=6 && template_id !=10 && template_id != 11 && template_id != 20 && template_id != 26 && template_id != 29  && template_id != 46 && template_id != 48 && template_id != 53  && template_id != 54 && org_id!=10340 && org_id!=10445 && org_id!=10410 && org_id!=10617 && org_id!=10598 && org_id!=10677 && org_id!=10702 && org_id!=10727 && org_id!=10721 && org_id!=10727 && org_id!=10206 && org_id!=10751 && org_id!=10752 && org_id!=10757) || org_id ==10558 || org_id ==10414 || org_id==10677 || org_id == 10353" width="50px"  style="width:6%"> 置换率 <br />(L/h) </th>
                  <th v-if="isShow('置换率1')" width="50px" style="width:6%"> 置换率 <br />(ml/min) </th>
                  <th v-if="isShow('置换量') && (template_id ==43 )" width="40px" style="width:6%"> 置换量 <br />(ml/h) </th>
                  <th v-if="isShow('置换量') && ((template_id ==6 && org_id != 9919 && org_id!=10191 && template_id!=43) || org_id ==9779 ||template_id ==11 ||template_id ==20 ||template_id ==26 ||template_id ==29 ||template_id == 48 ||template_id == 46 ||template_id == 53 ||template_id == 54 ||template_id == 56 ||org_id == 10340 ||org_id == 10432 ||org_id == 10445 || org_id == 10206 || org_id == 10751) && org_id!=10558 && org_id!=10346 && org_id!=10517 && org_id!=10598 && org_id!=10617 && org_id!=10414 && org_id!=10510 && org_id!=10567 && org_id!=10644 && org_id!=10353 && org_id!=10752 && org_id!=10731" width="50px" style="width:6%"> 置换量 <br />(ml) </th>
                  <th v-if="isShow('置换量') && ((template_id !=6 || org_id == 9919 || org_id == 10191) && org_id !=9779 && template_id !=11 && template_id !=20 && template_id !=26 && template_id !=29 && template_id!=43 && template_id!=48 && template_id!=46 && template_id!=53 && template_id!=54 && template_id!=56 && org_id!=10340 && org_id!=10432  && org_id!=10445 && org_id!=10206 && org_id!=10751) || org_id ==10558 || org_id ==10346 || org_id == 10517 || org_id ==10598 || org_id==10617 || org_id==10414 || org_id == 10510 || org_id ==10567 || org_id == 10644 || org_id == 10353 || org_id == 10752 || org_id == 10731" width="50px" style="width:6%"> 置换量 <br />(L) </th>
                
                  <th v-if="isShow('SpO₂')  && template_id !=6 && template_id !=10 && template_id !=11" width="40px" > SpO₂ <br />(%) </th>
                  <th v-if="isShow('SpO₂')  && (org_id == 10447 || org_id ==9829)" width="40px" > SpO₂ <br />(%) </th>
                  <th v-if="isShow('SpO₂1')" width="40px" > SpO₂ <br />(%) </th>
                  <th v-if="isShow('电导度')" width="40px"> 电导度 <br />(mS/cm) </th>
                  <th v-if="isShow('电导度1')" width="40px"> 电导度 <br />(mS/cm) </th>
                  <th v-if="isShow('置换液流量')" width="50px"> 置换液流量 <br />
                    <span v-if="template_id !=27 && template_id !=29 && template_id !=60">
                      <span v-if="org_id !=10580"> (ml/h)</span>
                      <span v-if="org_id ==10580"> (L/h)</span>
                    </span>
                    <span v-if="template_id ==27 || template_id ==29 || template_id == 60">(ml/min)</span> </th>
                  <th v-if="isShow('置换液流量1')" width="50px"> 置换液流量 <br />(ml/min)</th>
                  <th v-if="isShow('透析液流量')" width="50px"> 透析液流量 <br />(ml/h) </th>
                  <th v-if="isShow('透析液流量1')" width="50px"> 透析液流量 <br />(ml/h) </th>
                 
                  <th v-if="isShow('剩余肝素')" width="60px">剩余肝素 <br />(ml) </th>
                  <th v-if="isShow('置换量1')" width="50px" style="width:6%"> 置换量 <br />(L) </th>
                  <th v-if="isShow('肝素用量余量')" width="60px"> 肝素用量余量 <br />(ml) </th>
                  <th v-if="isShow('肝素量')" width="60px"> 肝素量 <br />(mg) </th>
                  <th v-if="isShow('抗凝剂')" width="60px">抗凝剂</th>

                  <th v-if="isShow('并发症')" width="60px">并发症</th>
                  <th v-if="isShow('累计血容量') && (template_id ==41 || org_id ==9538 || org_id == 10340 || org_id ==10217)" width="50px"> 累计血容量 <br />(L) </th>
                  <th v-if="isShow('累计血容量') && template_id !=41 && org_id!=9538 && org_id!=10340 && org_id!=10217" width="50px"> 累计血容量 <br />(ml) </th>

                  <th v-if="isShow('血容量')" width="60px">血容量(L)</th>
                  <th v-if="isShow('血容量1')" width="50px">血容量 <br />(L) </th>
                  <th v-if="isShow('血温监测')" width="60px">血温监测</th>
                  <th v-if="isShow('血温监测1')" width="60px">血温监测</th>
                  <th v-if="isShow('尿素监测')" width="60px">尿素监测</th>
                  <th v-if="isShow('尿素监测1')" width="60px">尿素监测</th>
                  <th v-if="isShow('血浓量')" width="60px">血浓量</th>
                  <th v-if="isShow('血浓量1')" width="60px">血浓量</th>
                  <th v-if="isShow('脱水')" width="60px">脱水</th>
                  <th v-if="isShow('KT/V')" width="60px">Kt/V</th>
                  <th v-if="isShow('kt/v1')" width="60px">Kt/V</th>
                  <th v-if="isShow('urr1')" width="60px">URR</th>
                  <th v-if="isShow('置换液速度')" width="60px">置换液速度(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="(item,index) in monitorRecords" :key="index" :value="item.value" @click="selectRow(index, item)" :class="index==currentIndex?'row-class-active':''" >
                  <td v-if="isShow('监测时间')">{{parseTime(item.operate_time, '{y}-{m}-{d} {h}:{i}')}}</td>
                  <td v-if="isShow('血压')" >{{item.systolic_blood_pressure?item.systolic_blood_pressure:''}}/{{item.diastolic_blood_pressure?item.diastolic_blood_pressure:''}}</td>
                  <td v-if="isShow('血压1')" >
                    {{item.monitor_systolic_blood_pressure_one?item.monitor_systolic_blood_pressure_one:'未测'}}
                    <span v-if="item.monitor_diastolic_blood_pressure_one!=''&&item.monitor_diastolic_blood_pressure_one>0">/{{item.monitor_diastolic_blood_pressure_one?item.monitor_diastolic_blood_pressure_one:'未测'}}</span></td>
                  <td v-if="isShow('拒测血压')" >{{ item.is_pressure }}</td>
                  <td v-if="isShow('血压监测部位')">{{getBloodPressure(item.blood_pressure_monitoring_site)}}</td>
                  <td v-if="isShow('脉搏')">{{item.pulse_frequency?item.pulse_frequency:'/'}}</td>
                  <td v-if="isShow('脉搏1')">{{item.monitor_pulse_frequency_one?item.monitor_pulse_frequency_one:'/'}}</td>
                  <td v-if="isShow('体温')">{{item.temperature?item.temperature:''}}</td>
                  <td v-if="isShow('体温1')">{{item.monitor_temperature_one?item.monitor_temperature_one:'/'}}</td>
                  <td v-if="isShow('呼吸频率')">
                     <span v-if="org_id!=10644"> {{item.breathing_rate?item.breathing_rate:'/'}} </span>
                     <span v-if="org_id==10644"> {{item.breathing_rate?item.breathing_rate:''}} </span>
                  </td>
                  <td v-if="isShow('血流量')">{{item.blood_flow_volume?item.blood_flow_volume:''}}</td>
                  <td v-if="isShow('血流量1')">{{item.blood_flow_volume_one?item.blood_flow_volume_one:'/'}}</td>
                  <td v-if="org_id!=10693"> {{item.venous_pressure?item.venous_pressure:''}}
                    <span v-if="item.arterial_pressure!=''|| item.arterial_pressure>0">/</span>
                    {{item.arterial_pressure?item.arterial_pressure:''}}</td>
                  <td v-if="org_id ==10693"> {{item.venous_pressure_one?item.venous_pressure_one:''}}/{{item.arterial_pressure_one?item.arterial_pressure_one:''}}</td>
                  <td v-if="isShow('跨膜压')" >
                    <span v-if="org_id!=10644">{{item.transmembrane_pressure?item.transmembrane_pressure:'/'}}</span>
                    <span v-if="org_id==10644">{{item.transmembrane_pressure?item.transmembrane_pressure:''}}</span>
                  </td>
                  <td v-if="isShow('跨膜压1')" >{{item.transmembrane_pressure_one?item.transmembrane_pressure_one:'/'}}</td>
                  <td v-if="isShow('超滤率')" >
                    <span v-if="org_id==10702 || org_id== 10757"> {{item.ultrafiltration_rate?item.ultrafiltration_rate:'0'}}</span>
                    <span v-if="org_id!=10702 && org_id!=10757"> {{item.ultrafiltration_rate?item.ultrafiltration_rate:''}}</span>
                  </td>
                  <th v-if="isShow('超滤率2')" width="60px">{{ item.ultrafiltration_rate_one?item.ultrafiltration_rate_one:"/" }} <br /></th>
                  <td v-if="isShow('超滤量') && (org_id==10551 || org_id ==10617 || org_id ==10629 || org_id ==10679 || org_id ==10693 || org_id ==10702 || org_id ==10721 || org_id ==10644 || org_id == 10727 || org_id == 10752 || org_id == 10757)" >
                    {{item.ultrafiltration_volume?item.ultrafiltration_volume:'0'}}</td>
                  <td v-if="isShow('超滤量') && org_id!=10551 && org_id != 10617 && org_id!=10629 && org_id!=10679 && org_id!=10693 && org_id!=10702 && org_id!=10721 && org_id!=10644 && org_id!=10727 && org_id!=10752 && org_id!=10757" >
                    <span v-if="org_id ==10612">
                      <span v-if="index == 1"> {{ item.ultrafiltration_volume ? item.ultrafiltration_volume : "0" }}</span>
                      <span v-if="index!=1"> {{ item.ultrafiltration_volume ? item.ultrafiltration_volume : "" }}</span>
                    </span>
                    <span v-if="org_id!=10612">
                      {{ item.ultrafiltration_volume ? item.ultrafiltration_volume : "" }}
                    </span>

                  </td>
                  <td v-if="isShow('超滤量1')" >{{item.ultrafiltration_volume_one?item.ultrafiltration_volume_one:'/'}}</td>
                  <td v-if="isShow('钠浓度')">{{item.sodium_concentration?item.sodium_concentration:''}}</td>
                  <td v-if="isShow('钠浓度1')">{{item.sodium_concentration_one?item.sodium_concentration_one:'/'}}</td>
                  <td v-if="isShow('透析液温度')" >{{item.dialysate_temperature?item.dialysate_temperature:''}}</td>
                  <td v-if="isShow('透析液温度1')" >{{item.dialysate_temperature_one?item.dialysate_temperature_one:'/'}}</td>
                  <td v-if="isShow('置换率')">{{item.replacement_rate?item.replacement_rate:''}}</td>
                  <td v-if="isShow('置换率1')">{{item.replacement_rate_one?item.replacement_rate_one:'/'}}</td>
                  <td v-if="isShow('置换量')" >
                    <span v-if="org_id!=10702 && org_id!=10721 && org_id!=10644"> {{item.displacement_quantity?item.displacement_quantity:''}}</span> 
                    <span v-if="org_id==10702 || org_id == 10721 || org_id == 10644"> {{item.displacement_quantity?item.displacement_quantity:'0'}}</span> 
                  </td>
                 
                  <td v-if="isShow('SpO₂') && template_id != 6 && template_id != 10  && template_id != 11" >
                    <span v-if="org_id == 10340">{{item.blood_oxygen_saturation?item.blood_oxygen_saturation:'/'}}</span>
                    <span v-else>{{item.blood_oxygen_saturation?item.blood_oxygen_saturation:''}}</span>
                  </td>
                  <td v-if="isShow('SpO₂') && (org_id == 10447 || org_id ==9829)" >
                    <span>{{item.blood_oxygen_saturation?item.blood_oxygen_saturation:'/'}}</span>
                  </td>

                  <td v-if="isShow('SpO₂1')" >
                    <span>{{item.blood_oxygen_saturation_one?item.blood_oxygen_saturation_one:'/'}}</span>
                  </td>

                  <td v-if="isShow('电导度')">{{item.conductivity?item.conductivity:''}}</td>
                  <td v-if="isShow('电导度1')">{{item.conductivity_one?item.conductivity_one:'/'}}</td>
                  <td v-if="isShow('置换液流量')" >{{item.displacement_flow_quantity?item.displacement_flow_quantity:''}}</td>
                  <td v-if="isShow('置换液流量1')" >{{item.displacement_flow_quantity_one?item.displacement_flow_quantity_one:'/'}}</td>
                  <td v-if="isShow('透析液流量')" >{{item.dialysate_flow?item.dialysate_flow:''}}</td>
                  <td v-if="isShow('透析液流量1')" >{{item.dialysate_flow_one?item.dialysate_flow_one:'/'}}</td>
                  
                  <th v-if="isShow('剩余肝素')" width="60px">{{item.heparin_one?item.heparin_one:"/"}} <br /> </th>
                  <td v-if="isShow('置换量1')" >{{item.displacement_quantity_one?item.displacement_quantity_one:'/'}}</td>
                  <td v-if="isShow('肝素用量余量')">{{item.heparin?item.heparin:''}}</td>
                  <td v-if="isShow('肝素量')">{{item.heparin_amount?item.heparin_amount:''}}</td>
                  <td v-if="isShow('抗凝剂')">
                  <span v-if="item.monitor_anticoagulant == 0"></span>
                  <span v-if="item.monitor_anticoagulant == 1">无肝素</span>
                  <span v-if="item.monitor_anticoagulant == 2">普通肝素</span>
                  <span v-if="item.monitor_anticoagulant == 3">低分子肝素</span>
                  <span v-if="item.monitor_anticoagulant == 4">阿加曲班</span>
                  <span v-if="item.monitor_anticoagulant == 5">枸橼酸钠</span>
                  <span v-if="item.monitor_anticoagulant == 6">低分子肝素钙</span>
                  <span v-if="item.monitor_anticoagulant == 7">低分子肝素钠</span>
                  <span v-if="item.monitor_anticoagulant == 8">依诺肝素</span>
                  <span v-if="item.monitor_anticoagulant == 9">达肝素</span>
                  <span v-if="item.monitor_anticoagulant == 12">无抗凝剂</span>
                  <span v-if="item.monitor_anticoagulant_value!=''">({{item.monitor_anticoagulant_value}})</span>
                  </td>

                  <td v-if="isShow('并发症')">{{getComplication(item.complication)}}</td>
                  <td v-if="isShow('累计血容量')" width="60px">{{item.accumulated_blood_volume}}</td>

                  <td v-if="isShow('血容量')" width="60px">{{item.accumulated_blood_volume}}</td>
                  <td v-if="isShow('血容量1')" width="60px">{{item.accumulated_blood_volume_one?item.accumulated_blood_volume_one:"/"}}</td>
                  <td v-if="isShow('血温监测')" width="60px">{{item.blood_temperature}}</td>
                  <td v-if="isShow('血温监测1')" width="60px">{{item.blood_temperature_one?item.blood_temperature_one:"/"}}</td>
                  <td v-if="isShow('尿素监测')" width="60px">{{item.urea_monitoring}}</td>
                  <td v-if="isShow('尿素监测1')" width="60px">{{item.urea_monitoring?item.urea_monitoring:"/"}}</td>
                  <td v-if="isShow('血浓量')" width="60px">{{item.blood_thickness}}</td>
                  <td v-if="isShow('血浓量1')" width="60px">{{item.blood_thickness_one?item.blood_thickness_one:"/"}}</td>
                  <td v-if="isShow('脱水')" width="60px">{{item.dehydration}}</td>

                  <td v-if="isShow('KT/V')">{{item.ktv?item.ktv:''}}</td>
                  <td v-if="isShow('kt/v1')">{{item.ktv_one?item.ktv_one:'/'}}</td>
                  <td v-if="isShow('urr1')">{{item.urr_one?item.urr_one:'/'}}</td>
                  <th v-if="isShow('置换液速度')" width="60px">{{item.replacement_speed?item.replacement_speed:""}}</th>
                  <td v-if="isShow('病情变化')">{{item.symptom}}</td>
                  <td v-if="isShow('处理')">{{item.dispose}}</td>
                  <td v-if="isShow('结果')">{{item.result}}</td>
              </tr>
            </table>
          </div>
          <div v-else class="nodataTxt">暂无监测数据</div>

          <van-popup v-model="show" get-container="#app" class="mointoringPopup" style="z-index:3200;" position="top" :style="{ height: '100%' }">
              <div class="newMointoring">
                  <div class="newMointoringTitle">
                      <span @click="back" style="color:#323233;font-size: .875rem;"><i class="iconfont icon-zuojiantou jiantou" style="color:#323233;"></i>返回</span>
                      <span style="font-weight:bold;margin-right: 1.5rem;">{{ formTitle }}</span>
                      <span></span>
                  </div>
                  <div style="display:flex;flex:1;    flex-direction: column;flex: 1;overflow-y: auto;">
                      <div style="flex:1;overflow-y: auto;">
                          <van-cell v-if="isShow('监测时间')" title="监测时间" :required="isShow_title('监测时间')" :value="parseTime(form.operate_time, '{y}-{m}-{d} {h}:{i}')" @click="chooseTime"></van-cell>
                          <van-field v-model="form.systolic_bp" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('收缩压')" :required="isShow_title('收缩压')" label="收缩压(mmHg)" type="number" input-align="right" />
                          <van-field v-model="form.monitor_systolic_blood_pressure_one" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('收缩压1')" :required="isShow_title('收缩压')" label="收缩压(mmHg)"  input-align="right" />

                          <van-field v-model="form.diastolic_bp" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('舒张压')" :required="isShow_title('舒张压')" label="舒张压(mmHg)" type="number" input-align="right" />
                          <van-field v-model="form.monitor_diastolic_blood_pressure_one" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('舒张压1')" :required="isShow_title('舒张压')" label="舒张压(mmHg)"  input-align="right" />

                          <van-field v-model="form.pulse_frequency" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('脉搏')" :required="isShow_title('脉搏')" label="脉搏(次/分)" type="number" input-align="right"/>
                          <van-field v-model="form.monitor_pulse_frequency_one" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('脉搏1')" :required="isShow_title('脉搏')" label="脉搏(次/分)" input-align="right"/>
                          <van-cell title='拒测血压' v-if="isShow('拒测血压')">
                              <template #label>
                                  <van-radio-group v-model="form.is_pressure">
                                      <van-radio :name="item.name" v-for='(item,index) in pressureList' :key="index">{{ item.name }}</van-radio>
                                  </van-radio-group>
                              </template>
                          </van-cell>
                          <van-cell title='血压监测部位' :required="isShow_title('血压监测部位')" v-if="isShow('血压监测部位')">
                              <template #label>
                                  <van-radio-group v-model="form.blood_pressure_monitoring_site">
                                      <van-radio :name="item.id" v-for='(item,index) in bloodPressureMmonitoringSite' :key="index">{{ item.name }}</van-radio>
                                  </van-radio-group>
                              </template>
                          </van-cell>

                          <van-field v-model="form.temperature" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('体温')" :required="isShow_title('体温')" label="体温(℃)" type="number" input-align="right" />
                          <van-field v-model="form.monitor_temperature_one" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('体温1')" :required="isShow_title('体温1')" label="体温(℃)" input-align="right" />

                          <van-field  v-model="form.breathing_rated" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('呼吸频率')&& org_id!=10340 && org_id!=9671" :required="isShow_title('呼吸频率')" label="呼吸频率(次/分)" input-align="right" />
                          <van-field  v-model="form.breathing_rated" @focus="inputFocus" @keydown='changeFocus' type="number" v-if="isShow('呼吸频率')&& (org_id ==10340 || org_id ==9671)" :required="isShow_title('呼吸频率')" label="呼吸频率(次/分)" input-align="right" />


                          <van-field v-model="form.blood_flow_volume" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('血流量')" :required="isShow_title('血流量')" label="血流量(ml/min)" type="number" input-align="right" />
                          <van-field v-model="form.blood_flow_volume_one" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('血流量1')" :required="isShow_title('血流量')" label="血流量(ml/min)"  input-align="right" />


                          <van-field v-model="form.arterial_pressure" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('动脉压')  && org_id!=10340 && org_id!=9671" :required="isShow_title('动脉压')" input-align="right">

                              <template #label>
                                  <span>动脉压({{form.arterial_pressure_type == 2 ? 'kpa': 'mmHg'}})</span>
                              </template>
                              <template #button>
                                  <van-button @click="venousPressureChangeThree" size="small" class="changeBtn" type="primary" style="margin-left:40px">切换</van-button>
                              </template>
                          </van-field>

                          <van-field v-model="form.arterial_pressure_one" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('动脉压1')" :required="isShow_title('动脉压1')" input-align="right">

                            <template #label>
                                <span>动脉压({{form.arterial_pressure_type == 2 ? 'kpa': 'mmHg'}})</span>
                            </template>
                            <template #button>
                                <van-button @click="venousPressureChangeThree" size="small" class="changeBtn" type="primary" style="margin-left:40px">切换</van-button>
                            </template>
                        </van-field>

                         <van-field v-model="form.arterial_pressure" @focus="inputFocus" @keydown='changeFocus' :required="isShow_title('动脉压')" v-if="isShow('动脉压') && (org_id ==10340 || org_id==9671)" type="number" input-align="right">
                              <template #label>
                                  <span>动脉压({{form.arterial_pressure_type == 2 ? 'kpa': 'mmHg'}})</span>
                              </template>
                              <template #button>
                                  <van-button @click="venousPressureChangeThree" size="small" class="changeBtn" type="primary" style="margin-left:40px">切换</van-button>
                              </template>
                          </van-field>

                          <van-field v-model="form.arterial_pressure" @focus="inputFocus" @keydown='changeFocus' :required="isShow_title('动脉压1')" v-if="isShow('动脉压1') && (org_id ==10340 || org_id==9671)" type="number" input-align="right">
                              <template #label>
                                  <span>动脉压({{form.arterial_pressure_type == 2 ? 'kpa': 'mmHg'}})</span>
                              </template>
                              <template #button>
                                  <van-button @click="venousPressureChangeThree" size="small" class="changeBtn" type="primary" style="margin-left:40px">切换</van-button>
                              </template>
                          </van-field>

                          <van-field v-model="form.venous_pressure" @focus="inputFocus" @keydown='changeFocus' :required="isShow_title('静脉压')" v-if="isShow('静脉压')" type="number" input-align="right">
                              <template #label>
                                  <span>静脉压({{form.venous_pressure_type == 2 ? 'kpa': 'mmHg'}})</span>
                              </template>
                              <template #button>
                                  <van-button @click="venousPressureChangeOne" size="small" class="changeBtn" type="primary" style="margin-left:40px">切换</van-button>
                              </template>
                          </van-field>

                          <van-field v-model="form.venous_pressure_one" @focus="inputFocus" @keydown='changeFocus' :required="isShow_title('静脉压1')" v-if="isShow('静脉压1')" type="number" input-align="right">
                              <template #label>
                                  <span>静脉压({{form.venous_pressure_type == 2 ? 'kpa': 'mmHg'}})</span>
                              </template>
                              <template #button>
                                  <van-button @click="venousPressureChangeOne" size="small" class="changeBtn" type="primary" style="margin-left:40px">切换</van-button>
                              </template>
                          </van-field>


                          <van-field v-model="form.transmembrane_pressure" @focus="inputFocus" @keydown='changeFocus' :required="isShow_title('跨膜压')" v-if="isShow('跨膜压')" type="number" input-align="right">
                              <template #label>
                                  <span>跨膜压({{form.transmembrane_pressure_type == 2 ? 'kpa': 'mmHg'}})</span>
                              </template>
                              <template #button>
                                  <van-button @click="venousPressureChangeTwo" size="small" class="changeBtn" type="primary" style="margin-left:40px">切换</van-button>
                              </template>
                          </van-field>

                          <van-field v-model="form.transmembrane_pressure_one" @focus="inputFocus" @keydown='changeFocus' :required="isShow_title('跨膜压1')" v-if="isShow('跨膜压1')" type="number" input-align="right">
                              <template #label>
                                  <span>跨膜压({{form.transmembrane_pressure_type == 2 ? 'kpa': 'mmHg'}})</span>
                              </template>
                              <template #button>
                                  <van-button @click="venousPressureChangeTwo" size="small" class="changeBtn" type="primary" style="margin-left:40px">切换</van-button>
                              </template>
                          </van-field>


                          <van-field v-model="form.ultrafiltration_volume_one" @focus="inputFocus" @keydown='changeFocus' :required="isShow_title('超滤量1')" v-if="isShow('超滤量1')" type="number" input-align="right">
                              <template #label>
                                  <span>超滤量(ml)</span>
                              </template>
                          </van-field>


                          <van-field v-model="form.ultrafiltration_volume" @focus="inputFocus" @keydown='changeFocus' :required="isShow_title('超滤量')" v-if="isShow('超滤量')" type="number" input-align="right">
                              <template #label>
                                  <span v-if="(template_id == 5 || template_id == 6 || template_id == 10 || template_id == 11 || template_id == 12 || template_id == 13 || template_id == 17 || template_id == 18 || template_id == 19 || template_id == 20 || template_id == 21 || template_id == 22 || template_id == 23 || template_id == 24 || template_id == 26 || org_id == 9555 || template_id == 27 || template_id == 29 || template_id == 30 || template_id == 31 || template_id == 9 || template_id == 32 || template_id == 34 || template_id == 35 || template_id == 36 || template_id == 38 || template_id == 40 || template_id == 41 || template_id == 43 || template_id == 44 || template_id == 46 || template_id == 47 || template_id == 48 || template_id == 53 || template_id == 54 || template_id == 56 || template_id == 60 || template_id == 65 || org_id == 10340  || org_id == 10387 || org_id == 10432 || org_id == 10445 || org_id == 10410 || org_id == 10485 || org_id == 10375 || org_id == 10480 || org_id == 10551 || org_id ==10597 || org_id ==10599 || org_id ==10612 || org_id == 10580 || org_id ==10629  || org_id ==10617 || org_id ==10677 || org_id ==10667 || org_id == 10693 || org_id == 10702 || org_id == 10697 || org_id == 10635 || org_id==10723 || org_id == 10721 || org_id ==10727 || org_id == 10206 || org_id == 10740 || org_id == 10742 || org_id == 10745 || org_id == 10751 || org_id == 10752 || org_id == 10757) && org_id!=10471" >超滤量(ml)</span>
                                  <span v-else>超滤量(L)</span>
                              </template>
                          </van-field>

                          <van-field v-model="form.ultrafiltration_rate" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('超滤率')" :required="isShow_title('超滤率')" type="number" input-align="right">
                              <template #label>
                                  <span v-if="(template_id == 6 || template_id == 10 || template_id == 11 || template_id == 13 || template_id == 17 || template_id == 18 || template_id == 19 || template_id == 20 || template_id == 21 || template_id == 22 || template_id == 23 || template_id == 24 || template_id == 26 || template_id == 29 || template_id == 30 || template_id == 31 || template_id == 32 || template_id == 34 || template_id == 35 || template_id == 36 || template_id == 38 || template_id == 41 || template_id == 43 || template_id == 44 || template_id == 46 || template_id == 47 || template_id == 48  || template_id == 53 || template_id == 54 || template_id == 56 || template_id == 60 || template_id == 65 || org_id == 10340 || org_id == 10432 || org_id == 10445 || org_id == 10410 || org_id == 10485 || org_id == 10375 || org_id == 10480 || org_id == 10551 || org_id ==10537 || org_id ==10597 || org_id ==10599 || org_id ==10612 || org_id==10580 || org_id ==10629  || org_id ==10617 || org_id ==10677 || org_id ==10667 || org_id == 10693 || org_id==10702 || org_id == 10697 || org_id == 10635 || org_id == 10723 || org_id == 10721 || org_id ==10727 || org_id == 10206 || org_id == 10742 || org_id == 10740 || org_id == 10745 || org_id == 10751 || org_id == 10752 || org_id == 10757) && org_id!=10471">超滤率(ml/h)</span>
                                  <span v-else>超滤率(L/h)</span>
                              </template>
                          </van-field>
                          <van-field v-model="form.ultrafiltration_rate_one" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('超滤率2')" :required="isShow_title('超滤率2')" input-align="right">
                              <template #label>
                                  <span>超滤率(ml/h)</span>
                              </template>
                          </van-field>

                          <van-field v-model="form.sodium_concentration" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('钠浓度')" :required="isShow_title('钠浓度')" label="钠浓度(mmol/L)" type="number" input-align="right" />
                          <van-field v-model="form.sodium_concentration_one" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('钠浓度1')" :required="isShow_title('钠浓度1')" label="钠浓度(mmol/L)" type="number" input-align="right" />

                          <van-field v-model="form.conductivity" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('电导度')" :required="isShow_title('电导度')" label="电导度(mS/cm)" type="number" input-align="right" />
                          <van-field v-model="form.conductivity_one" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('电导度1')" :required="isShow_title('电导度1')" label="电导度(mS/cm)" type="number" input-align="right" />

                          <van-field v-model="form.dialysate_temperature" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('透析液温度')" :required="isShow_title('透析液温度')" label="透析液温度(℃)" type="number" input-align="right" />

                          <van-field v-model="form.dialysate_temperature_one" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('透析液温度1')" :required="isShow_title('透析液温度1')" label="透析液温度(℃)" type="number" input-align="right" />

                          <van-field v-model="form.replacement_rate" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('置换率')" :required="isShow_title('置换率')" type="number" input-align="right">
                              <template #label>
                                  <span v-if="(template_id == 6 || template_id == 10 || template_id == 11 || template_id == 20 || template_id == 26 || template_id == 29  || template_id == 46 || template_id == 48 || template_id == 53 || template_id == 54 || template_id == 56 || org_id == 10340 || org_id == 10445 || org_id == 10410 || org_id ==10410 || org_id ==10617 || org_id ==10598 || org_id ==10677 || org_id ==10702 || org_id == 10727 || org_id == 10721 || org_id == 10727 || org_id == 10206 || org_id == 10751 || org_id == 10752 || org_id == 10757) && org_id!=10558 && org_id!=10414 && org_id!=10677 && org_id!=10353">置换率(ml/min)</span>
                                  <span v-else>置换率(L/h)</span>
                              </template>
                          </van-field>

                          <van-field v-model="form.replacement_rate_one" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('置换率1')" :required="isShow_title('置换率1')" type="number" input-align="right">
                              <template #label>
                                <span>置换率(ml/min)</span>
                              </template>
                          </van-field>

                          <van-field v-model="form.displacement_quantity" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('置换量')" :required="isShow_title('置换量')" type="number" input-align="right">
                              <template #label>

                                  <span v-if="(template_id == 6 || template_id == 9779 || template_id == 43 || template_id == 11 || template_id == 20 || template_id == 26 || template_id == 29 || template_id == 46 || template_id == 48 || template_id == 53  || template_id == 54 || template_id == 56 || org_id == 10340 || org_id == 10432 || org_id == 10445 || org_id == 10751) && org_id != 9919 && org_id!=10478 && org_id!=10558 && org_id!=10517 && org_id!=10598 && org_id!=10617 && org_id!=10414 && org_id!=10510 && org_id!=10567 && org_id!=10644 && org_id!=10353 && org_id!=10752 && org_id!=10731">
                                      <span v-if="(template_id == 43) ">置换量(ml/h)</span>
                                      <span v-else>置换量(ml)</span>
                                  </span>

                                  <span v-else>置换量(L)</span>
                              </template>
                          </van-field>

                          <van-field v-model="form.displacement_quantity_one" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('置换量1')" :required="isShow_title('置换量1')" type="number" input-align="right">
                              <template #label>
                                  <span>置换量(L)</span>
                              </template>
                          </van-field>


                          <van-field v-model="form.blood_oxygen_saturation" @focus="inputFocus" @keydown='changeFocus' :required="isShow_title('SpO₂')" v-if="isShow('SpO₂')"  input-align="right">
                              <template #label>
                                  <span v-if="template_id == 6 || template_id == 10 || template_id == 11 || template_id == 21">SpO₂(%)</span>
                                  <span v-else>SpO₂(%)</span>
                              </template>
                          </van-field>

                          <van-field v-model="form.blood_oxygen_saturation_one" @focus="inputFocus" @keydown='changeFocus' :required="isShow_title('SpO₂1')" v-if="isShow('SpO₂1')"  input-align="right">
                              <template #label>

                                  <span>SpO₂(%)</span>
                              </template>
                          </van-field>

                          <van-field v-model="form.blood_sugar" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('血糖')" :required="isShow_title('血糖')" label="血糖(mmol/L)" type="number" input-align="right"/>

                          <van-field v-model="form.blood_sugar_one" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('血糖1')" :required="isShow_title('血糖1')" label="血糖(mmol/L)" type="number" input-align="right"/>

                          <van-field v-model="form.displacement_flow_quantity" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('置换液流量')" :required="isShow_title('置换液流量')" type="number" input-align="right">
                              <template #label>
                                  <span v-if="template_id != 27 && template_id!=29 && template_id!=60">
                                    <span v-if="org_id!=10580"> 置换液流量(ml/h) </span>
                                    <span v-if="org_id==10580"> 置换液流量(L/h) </span>
                                  </span>
                                  <span v-if="template_id == 27 || template_id == 29 || template_id ==60">置换液流量(ml/min)</span>
                              </template>
                          </van-field>

                          <van-field v-model="form.displacement_flow_quantity_one" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('置换液流量1')" :required="isShow_title('置换液流量1')" type="number" input-align="right">
                              <template #label>
                                  <span>置换液流量(ml/min)</span>
                              </template>
                          </van-field>

                          <van-field v-model="form.dialysate_flow" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('透析液流量')" :required="isShow_title('透析液流量')" label="透析液流量(ml/h)" type="number" input-align="right"/>


                          <van-field v-model="form.dialysate_flow_one" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('透析液流量1')" :required="isShow_title('透析液流量1')" label="透析液流量(ml/h)" type="number" input-align="right"/>

                          <van-field v-model="form.heparin" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('肝素用量余量')" :required="isShow_title('肝素用量余量')" label="肝素用量余量(ml)" input-align="right"/>
                          <van-field v-model="form.heparin_amount" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('肝素量')" :required="isShow_title('肝素量')" label="肝素量(mg)" type="number" input-align="right"/>
                          <van-field v-model="form.heparin_one" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('剩余肝素')" :required="isShow_title('剩余肝素')" label="剩余肝素(ml)" input-align="right"/>
                          <van-cell title='抗凝剂' v-if="isShow('抗凝剂')">
                              <template #label>
                                  <van-radio-group v-model="form.monitor_anticoagulant">
                                      <van-radio name="-2" key="-2">请选择</van-radio>
                                      <van-radio :name="item.id" v-for='(item,index) in anticoagulantsConfit' :key="index">{{ item.name }}</van-radio>
                                  </van-radio-group>
                              </template>
                          </van-cell>
                          <van-field v-model="form.monitor_anticoagulant_value" @focus="inputFocus" v-if="isShow('抗凝剂')" :required="isShow_title('抗凝剂')" label="抗凝剂" input-align="right"/>

                          <van-field v-if="isShow('KT/V')" :required="isShow_title('KT/V')" label="Kt/V" @focus="inputFocus" v-model="form.ktv" rows="1" autosize type="textarea" placeholder=""/>

                          <van-field v-if="isShow('kt/v1')" :required="isShow_title('kt/v1')" label="Kt/V" @focus="inputFocus" v-model="form.ktv_one" rows="1" autosize type="textarea" placeholder=""/>

                          <van-field v-if="isShow('URR')"  :required="isShow_title('URR')" label="URR" @focus="inputFocus" v-model="form.urr" rows="1" autosize type="textarea" placeholder=""/>

                          <van-field v-if="isShow('urr1')"  :required="isShow_title('urr1')" label="URR" @focus="inputFocus" v-model="form.urr_one" rows="1" autosize type="textarea" placeholder=""/>


                          <van-cell title='并发症' v-if="isShow('并发症')">
                              <template #label>
                                  <van-radio-group v-model="form.complication">
                                      <van-radio name="-2" key="-2">请选择</van-radio>
                                      <van-radio :name="item.id" v-for='(item,index) in complicationList' :key="index">{{ item.name }}</van-radio>
                                  </van-radio-group>
                              </template>
                          </van-cell>
                           <van-field v-model="form.accumulated_blood_volume" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('累计血容量')" type="number" input-align="right">
                              <template #label>
                                  <span v-if="template_id == 41 || org_id == 9538 || org_id == 10340 || org_id == 10217">累计血容量(L)</span>
                                  <span v-else>累计血容量(ml)</span>
                              </template>
                          </van-field>

                          <van-field v-model="form.accumulated_blood_volume" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('血容量')" label="血容量(L)" type="number" input-align="right"/>

                          <van-field v-model="form.accumulated_blood_volume_one" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('血容量1')" label="血容量(L)"  input-align="right"/>



                          <van-field v-model="form.blood_temperature" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('血温监测')" label="血温监测" type="number" input-align="right"/>
                          <van-field v-model="form.blood_temperature_one" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('血温监测1')" label="血温监测"  input-align="right"/>

                          <van-field v-model="form.urea_monitoring" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('尿素监测')" label="尿素监测" type="number" input-align="right"/>
                          <van-field v-model="form.urea_monitoring_one" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('尿素监测1')" label="尿素监测"  input-align="right"/>

                          <van-field v-model="form.blood_thickness" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('血浓量')" label="血浓量" type="number" input-align="right"/>
                          <van-field v-model="form.blood_thickness_one" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('血浓量1')" label="血浓量" input-align="right"/>

                          <van-field v-model="form.blood_monitor" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('血压监测')" label="血压监测" type="number" input-align="right"/>
                          <van-field v-model="form.blood_monitor_one" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('血压监测1')" label="血压监测" input-align="right"/>

                          <van-field v-model="form.dehydration" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('脱水')" label="脱水(L)" type="number" input-align="right"/>

                          <van-field v-model="form.replacement_speed" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('置换液速度')" label="置换液速度(ml/h)" type="number" input-align="right"/>
                          <van-field v-model="form.replacement_speed_one" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('置换液速度1')" label="置换液速度(ml/h)" input-align="right"/>

                          <van-field v-model="form.dicarbonate" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('碳酸氢钠用量')" label="碳酸氢钠用量(ml)" type="number" input-align="right"/>
                          <van-field v-model="form.dicarbonate_one" @focus="inputFocus" @keydown='changeFocus' v-if="isShow('碳酸氢钠用量1')" label="碳酸氢钠用量(ml)" input-align="right"/>

                          <van-cell title='病情变化' v-if="isShow('病情变化')" @click="symptomsShow = true" is-link value="请选择"></van-cell>
                          <van-popup v-model="symptomsShow" class="listBoxPopup newListBoxPopup" style="z-index:5000">
                              <div class="listBox">
                                  <div @click="chooseSymptoms('')">请选择</div>
                                  <div v-for="(item,index) in symptoms" :key="index" @click="chooseSymptoms(item.name)">{{ item.name }}</div>
                              </div>
                          </van-popup>

                          <van-field class="bgField" v-if="isShow('病情变化')" :required="isShow_title('病情变化')" @focus="inputFocus" v-model="form.symptom" rows="1" autosize type="textarea" placeholder="请输入"/>
                          <van-cell title='处理' v-if="isShow('处理')" :required="isShow_title('处理')" @click="disposeShow = true" is-link value="请选择"></van-cell>
                          <van-popup v-model="disposeShow" class="listBoxPopup newListBoxPopup" style="z-index:5000">
                              <div class="listBox">
                                  <div @click="chooseDispose('')">请选择</div>
                                  <div v-for="(item,index) in dispose" :key="index" @click="chooseDispose(item.name)">{{ item.name }}</div>
                              </div>
                          </van-popup>
                          <van-field class="bgField" v-if="isShow('处理')" :required="isShow_title('处理')" @focus="inputFocus" v-model="form.dispose" rows="1" autosize type="textarea" placeholder="请输入"/>
                          <van-cell title='结果' v-if="isShow('结果')" :required="isShow_title('结果')" @click="resultsShow = true" is-link value="请选择"></van-cell>
                          <van-popup v-model="resultsShow" class="listBoxPopup newListBoxPopup" style="z-index:5000">
                              <div class="listBox">
                                  <div @click="chooseResults('')">请选择</div>
                                  <div v-for="(item,index) in results" :key="index" @click="chooseResults(item.name)">{{ item.name }}</div>
                              </div>
                          </van-popup>
                          <van-field class="bgField" v-if="isShow('结果')" :required="isShow_title('结果')" @focus="inputFocus" v-model="form.result" rows="1" autosize type="textarea" placeholder="请输入"/>
                      </div>
                      <div class="addBox">
                          <div v-if="form.id>0" @click="submitEditAction">修改</div>
                          <div v-else @click="submitAction">保存</div>
                      </div>
                  </div>
                  <mt-datetime-picker class="datetimePicker startTimePicker" ref="picker" type="datetime" @confirm="handleConfirm" v-model="pickertime"></mt-datetime-picker>
              </div>
          </van-popup>
          <van-popup v-model="tableShow" get-container="#app" class="mointoringPopup"  position="top" :style="{ height: '100%' }">
              <div>
                  <van-sticky>
                      <div class="newMointoringTitle">
                          <span @click="tableShow = false" style="color:#323233;font-size: .875rem;"><i class="iconfont icon-zuojiantou jiantou" style="color:#323233;"></i>返回</span>
                          <span style="font-weight:bold;margin-right: 1.5rem;">表格查看</span>
                          <span></span>
                      </div>
                  </van-sticky>
                  <div style="width:100%;overflow-x:auto;">
                      <table class="table newMonitTable tablePopup" style>
                          <tr >
                            <th v-if="isShow('监测时间')" width="60px">时间</th>
                            <th v-if="isShow('血压')" width="40px"> 血压 <br />(mmHg) </th>
                            <th v-if="isShow('脉搏')" width="30px"> 脉搏 <br />(次/分) </th>
                            <th v-if="isShow('体温')" width="40px"> 体温 <br />(℃) </th>
                            <th v-if="isShow('呼吸频率')" width="50px"> 呼吸频率 <br />(次/分) </th>
                            <th v-if="isShow('血流量')" width="40px"> 血流量 <br />(ml/min) </th>
                            <th width="60px"> 静脉压/动脉压 <br />({{monitorRecords[0]&&monitorRecords[0]['venous_pressure_type'] == 2 ? 'kpa' : 'mmHg'}}) </th>
                            <th v-if="isShow('跨膜压')" width="40px"> 跨膜压 <br />({{monitorRecords[0]&&monitorRecords[0]['transmembrane_pressure_type'] == 2 ? 'kpa' : 'mmHg'}}) </th>
                            <th v-if="isShow('超滤量') && (template_id ==5 || template_id ==6 || template_id == 10 || template_id == 11 || template_id == 12 || template_id == 13 || template_id == 17 || template_id == 18 || template_id == 19 || template_id == 20 || template_id == 21 || template_id == 22 || template_id == 23 || template_id == 24 || template_id == 26 || org_id == 9555 || template_id == 27 || template_id == 29 || template_id == 30 || template_id == 31 || template_id == 32 || template_id == 34 || template_id == 35 || template_id == 36 || template_id == 38 || template_id == 40 || template_id == 9 || template_id == 41 || template_id == 43 || template_id == 44 || template_id == 47 || template_id == 46 || template_id == 48 || template_id == 53 || template_id == 54 || template_id == 56 || template_id == 60 || org_id == 10340 || org_id == 10387 || org_id == 10432 || org_id == 10445 || org_id == 10480 || org_id ==10597 || org_id ==10599 || org_id ==10612 || org_id ==10580 || org_id ==10617 || org_id == 10697 || org_id ==10727 || org_id == 10742 || org_id == 10740 || org_id == 10745 || org_id == 10751 || org_id == 10752 || org_id ==10757)" width="50px" > 超滤量 <br />(ml) </th>
                            <th v-if="isShow('超滤量') && template_id != 5 && template_id !=6 && template_id !=10 && template_id !=11 && template_id !=12 && template_id !=13 && template_id !=17 && template_id !=18 && template_id !=19 && template_id !=20 && template_id !=21 && template_id !=22 && template_id !=23 && template_id !=24 && template_id !=26 && org_id !=9555 && template_id!=27 && template_id!=29 && template_id!=30 && template_id!=31 && template_id !=9 && template_id!=32 && template_id!=34 && template_id!=35 && template_id!=36 && template_id!=38 && template_id!=40 && template_id!=41 && template_id!=43 && template_id!=44 && template_id!=47 && template_id!=46  && template_id!=48 && template_id!=53 && template_id!=54 && template_id!=56 && template_id!=60 && org_id != 10340 && org_id != 10387 && org_id != 10432  && org_id != 10445 && org_id != 10480 && org_id!=10597 && org_id!=10599&&org_id!=10612 && org_id!=10580  && org_id!=10617 && org_id!=10697 && org_id!=10727 && org_id!=10740 && org_id!=10742&& org_id!=10745 && org_id!=10751 && org_id!=10752 && org_id!=10757" width="50px" > 超滤量 <br />(L) </th>
                            <th v-if="isShow('钠浓度')" width="40px"> 钠浓度 <br />(mmol/L) </th>
                            <th v-if="isShow('透析液温度')" width="60px"> 透析液温度 <br />(℃) </th>
                            <th v-if="isShow('置换率') && (template_id ==6 || template_id == 10 || template_id == 11 || template_id == 20 || template_id == 26 || template_id == 29  || template_id == 46 || template_id == 48 || template_id == 53 || template_id == 54 || org_id == 10340 || org_id == 10445 || org_id ==10375 || org_id ==10721 || org_id == 10751 || org_id == 10752 || org_id == 10757) && org_id!=10558 && org_id!=10598 && org_id!=10617 && org_id!=10727" width="50px" > 置换率 <br />(ml/min) </th>
                            <th v-if="isShow('置换率') && (template_id !=6 && template_id !=10 && template_id != 11 && template_id != 20 && template_id != 26 && template_id != 29  && template_id != 46 && template_id != 48 && template_id != 53  && template_id != 54 && org_id!=10340 && org_id!=10445 && org_id!=10375 && org_id!=10721 && org_id!=10751 && org_id!=10752 && org_id!=10757) || org_id ==10558 || org_id ==10598 || org_id ==10617 || org_id ==10727" width="50px"  > 置换率 <br />(L/h) </th>
                            <th v-if="isShow('置换量') && (template_id ==43 )" width="40px" > 置换量 <br />(ml/h) </th>
                            <th v-if="isShow('置换量') && ((template_id ==6 && org_id != 9919 && org_id!=10191 && template_id!=43) || org_id ==9779 ||template_id ==11 ||template_id ==20 ||template_id ==26 ||template_id ==29 ||template_id == 48 ||template_id == 46 ||template_id == 53 ||template_id == 54 ||template_id == 56 ||org_id == 10340 ||org_id == 10432 ||org_id == 10445 || org_id ==10751) && org_id!=10558 && org_id !=10617 && org_id!=10510 && org_id!=10644 && org_id!=10752" width="50px" > 置换量 <br />(ml) </th>
                            <th v-if="isShow('置换量') && ((template_id !=6 || org_id == 9919 || org_id == 10191) && org_id !=9779 && template_id !=11 && template_id !=20 && template_id !=26 && template_id !=29 && template_id!=43 && template_id!=48 && template_id!=46 && template_id!=53 && template_id!=54 && template_id!=56 && org_id!=10340 && org_id!=10432  && org_id!=10445 && org_id!=10751) || org_id == 10558 || org_id ==10617 || org_id == 10510 || org_id == 10644 || org_id == 10752" width="50px" > 置换量 <br />(L) </th>
                            <th v-if="isShow('SpO₂')  && template_id !=6 && template_id !=10 && template_id !=11" width="40px" > SpO₂ <br />(%) </th>
                            <th v-if="isShow('SpO₂')  && org_id == 10447" width="40px" > SpO₂ <br />(%) </th>
                            <th v-if="isShow('电导度')" width="40px"> 电导度 <br />(mS/cm) </th>
                            <th v-if="isShow('置换液流量')" width="50px"> 置换液流量 <br /><span v-if="template_id !=27 && template_id !=29 && template_id !=60">(ml/h)</span><span v-if="template_id ==27 || template_id ==29 || template_id==60">(ml/min)</span> </th>
                            <th v-if="isShow('透析液流量')" width="50px"> 透析液流量 <br />(ml/h) </th>
                            <th v-if="isShow('超滤率') && (template_id ==6 || template_id == 10 || template_id == 11 || template_id == 12 || template_id == 13 || template_id == 17 || template_id == 18 || template_id == 19 || template_id == 20 || template_id == 21 || template_id == 22 || template_id == 23 || template_id == 24 || template_id == 26 || template_id == 31 || template_id == 34 || template_id == 35 || template_id == 38 || template_id == 41 || template_id == 43 || template_id == 44 || template_id == 47 || template_id == 48 || template_id == 53 || template_id == 54 || template_id == 56 || org_id == 10432 || org_id == 10445 || org_id == 10480 || org_id ==10537 || org_id ==10597 || org_id ==10599 || org_id ==10580 || org_id ==10617 || org_id == 10697 || org_id == 10740 || org_id == 10742 || org_id == 10745 || org_id == 10751 || org_id == 10752 || org_id == 10757)" width="50px"> 超滤率 <br />(ml/h) </th>
                            <th v-if="isShow('超滤率') && template_id !=6 && template_id !=10 && template_id !=11 && template_id !=12 && template_id !=13 && template_id !=17 && template_id !=18 && template_id !=19 && template_id !=20 && template_id !=21 && template_id !=22 && template_id !=23 && template_id !=24 && template_id !=26 && template_id !=31 && template_id !=34 && template_id !=35 && template_id !=38 && template_id !=41 && template_id !=43 && template_id !=44 && template_id !=47 && template_id !=48 && template_id !=53 && template_id !=54 && template_id !=56 && org_id!=10432 && org_id!=10445 && org_id!=10480 && org_id!=10537 && org_id!=10597 && org_id!=10599 && org_id!=10580 && org_id!=10617  && org_id!=10697 && org_id!=10740 && org_id!=10742 && org_id!=10745 && org_id!=10751 && org_id!=10752 && org_id!=10757" width="50px"> 超滤率 <br />(L/h) </th>
                            <th v-if="isShow('肝素用量余量')" width="60px"> 肝素用量余量 <br />(ml) </th>
                            <th v-if="isShow('肝素量')" width="60px"> 肝素量 <br />(mg) </th>
                            <th v-if="isShow('抗凝剂')" width="60px">抗凝剂</th>
                            <th v-if="isShow('血压监测部位')" width="60px">血压监测部位</th>
                            <th v-if="isShow('并发症')" width="60px">并发症</th>
                            <th v-if="isShow('累计血容量') && (template_id ==41 || org_id ==9538 || org_id == 10340 || org_id == 10217)" width="50px"> 累计血容量 <br />(L) </th>
                            <th v-if="isShow('累计血容量') && template_id !=41 && org_id!=9538 && org_id!=10340 && org_id!=10217" width="50px"> 累计血容量 <br />(ml) </th>
                            <th v-if="isShow('血容量')" width="60px">血容量(L)</th>
                            <th v-if="isShow('血温监测')" width="60px">血温监测</th>
                            <th v-if="isShow('尿素监测')" width="60px">尿素监测</th>
                            <th v-if="isShow('血浓量')" width="60px">血浓量</th>
                            <!-- <th v-if="isShow('血浓量')" width="60px">血浓量</th> -->
                            <th v-if="isShow('脱水')" width="60px">脱水</th>
                            <th v-if="isShow('KT/V') && (org_id == 9987|| org_id == 10215 || org_id == 9800 || org_id ==10517)" width="60px">Kt/V</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="(item,index) in monitorRecords" :key="index" :value="item.value">
                              <td v-if="isShow('监测时间')">{{parseTime(item.operate_time, '{y}-{m}-{d} {h}:{i}')}}</td>
                              <td v-if="isShow('血压')" >{{item.systolic_blood_pressure?item.systolic_blood_pressure:''}}/{{item.diastolic_blood_pressure?item.diastolic_blood_pressure:''}}</td>
                              <td v-if="isShow('脉搏')">{{item.pulse_frequency?item.pulse_frequency:'/'}}</td>
                              <td v-if="isShow('体温')">{{item.temperature?item.temperature:''}}</td>
                              <td v-if="isShow('呼吸频率')">{{item.breathing_rate?item.breathing_rate:'/'}}</td>
                              <td v-if="isShow('血流量')">{{item.blood_flow_volume?item.blood_flow_volume:''}}</td>
                              <td> {{item.venous_pressure?item.venous_pressure:''}}/{{item.arterial_pressure?item.arterial_pressure:''}}</td>
                              <td v-if="isShow('跨膜压')" >{{item.transmembrane_pressure?item.transmembrane_pressure:''}}</td>
                              <td v-if="isShow('超滤量')" >
                                {{item.ultrafiltration_volume?item.ultrafiltration_volume:''}}
                              </td>
                              <td v-if="isShow('钠浓度')">{{item.sodium_concentration?item.sodium_concentration:''}}</td>
                              <td v-if="isShow('透析液温度')" >{{item.dialysate_temperature?item.dialysate_temperature:''}}</td>
                              <td v-if="isShow('置换率')">{{item.replacement_rate?item.replacement_rate:''}}</td>
                              <td v-if="isShow('置换量')" >
                                <span v-if="org_id ==10702"> {{item.displacement_quantity?item.displacement_quantity:'0'}} </span>
                                <span v-if="org_id !=10702"> {{item.displacement_quantity?item.displacement_quantity:''}} </span>
                              </td>
                              <td v-if="isShow('SpO₂') && template_id != 6 && template_id != 10  && template_id != 11" >
                                <span v-if="org_id == 10340">{{item.blood_oxygen_saturation?item.blood_oxygen_saturation:'/'}}</span>
                                <span v-else>{{item.blood_oxygen_saturation?item.blood_oxygen_saturation:''}}</span>
                              </td>
                              <td v-if="isShow('电导度')">{{item.conductivity?item.conductivity:''}}</td>
                              <td v-if="isShow('置换液流量')" >{{item.displacement_flow_quantity?item.displacement_flow_quantity:''}}</td>
                              <td v-if="isShow('透析液流量')" >{{item.dialysate_flow?item.dialysate_flow:''}}</td>
                              <td v-if="isShow('超滤率')" >{{item.ultrafiltration_rate?item.ultrafiltration_rate:''}}</td>
                              <td v-if="isShow('肝素用量余量')&& prescription_prop && prescription_prop.anticoagulant == 2">{{item.heparin?item.heparin:''}}</td>
                              <td v-if="isShow('肝素量')">{{item.heparin_amount?item.heparin_amount:''}}</td>
                              <td v-if="isShow('抗凝剂')">
                              <span v-if="item.monitor_anticoagulant == 0"></span>
                              <span v-if="item.monitor_anticoagulant == 1">无肝素</span>
                              <span v-if="item.monitor_anticoagulant == 2">普通肝素</span>
                              <span v-if="item.monitor_anticoagulant == 3">低分子肝素</span>
                              <span v-if="item.monitor_anticoagulant == 4">阿加曲班</span>
                              <span v-if="item.monitor_anticoagulant == 5">枸橼酸钠</span>
                              <span v-if="item.monitor_anticoagulant == 6">低分子肝素钙</span>
                              <span v-if="item.monitor_anticoagulant == 7">低分子肝素钠</span>
                              <span v-if="item.monitor_anticoagulant == 8">依诺肝素</span>
                              <span v-if="item.monitor_anticoagulant == 9">达肝素</span>
                                <span v-if="item.monitor_anticoagulant == 11">那屈肝素</span>
                               <span v-if="item.monitor_anticoagulant == 12">无抗凝剂</span>
                                <span v-if="item.monitor_anticoagulant == 13">那屈肝素钙</span>
                              <span v-if="item.monitor_anticoagulant_value!=''">({{item.monitor_anticoagulant_value}})</span>
                              </td>
                              <td v-if="isShow('KT/V') && (org_id == 9987 || org_id ==10215 || org_id == 9800 || org_id == 10278 || org_id == 10138 || org_id ==10517)">{{item.ktv?item.ktv:''}}</td>

                              <td v-if="isShow('病情变化')">{{item.symptom}}</td>
                              <td v-if="isShow('处理')">{{item.dispose}}</td>
                              <td v-if="isShow('结果')">{{item.result}}</td>
                          </tr>
                      </table>
                  </div>
              </div>
          </van-popup>
        </div>
      <div class="preserveBox">
          <!-- <van-checkbox class="allcheckTitle" v-model="allChecked" @click="toggle">全选</van-checkbox>
          <p style="font-size:.875rem;" @click="openTable">表格查看</p> -->
          <span :class="{ forbid: is_has_create != true }" @click="openForm">新增</span>
          <span :class="{ forbid: is_has_modify != true && is_has_modify_other != true }" @click="openEidtForm">修改</span>
          <span :class="{ forbid: is_has_del != true && is_has_del_other != true }" class="deleteColor" @click="deleteForm">删除</span>
          <!-- <div @click="commitInfo">保存</div> -->
      </div>

    <van-popup
      v-model="infor_visibility"
      class="advicePopup"
      get-container="#today_panel"
    >
      <infor-sub-menu
      :visibility="infor_visibility"
      v-on:menu-cancle-three="menuCancleFour"
      v-on:menu-comfirm-three="menuComfirmFour"
      >
    </infor-sub-menu>
    </van-popup>

  </div>
</template>

<script>
import { addMonitorRecord, deleteMonitorRecord, editMonitorRecord, GetMonitor, GetMonitorToday, batchDeleteMonitor,saveMobileInformation } from '@/api/dialysis'
import { parseTime } from '@/utils'
import { Dialog, Toast } from 'vant'
import { getDataConfig } from '@/utils/data'
import InforSubMenu from "../dialog/subMenu/InforSubMenu"
import request from '@/utils/request'
import { Console } from 'console'
export default {
props: {
  monitor_records: {
    type: Array
  },
  patient: {
    type: Object
  },
  order: {
    type: Object
  },
  last_monitor_record: {
    type: Object
  },
  dialysis_order: {
    type: Object
  },
  prescription_prop: {
    type: Object
  },
  assessment_after_dislysis:{
    type:Object
  }
},
components:{
  InforSubMenu
},
data () {
  return {
    is_has_create: true,
    is_has_modify: true,
    is_has_modify_other: true,
    is_has_del: true,
    is_has_del_other: true,
    list: ['a', 'b'],
    result: [],
    monitorRecords: this.monitor_records,
    pickertime: new Date(),
    form: {
      // patient_id: 0,
      // order_id: 0,
      monitor_date: 0,
      // monitor_time: "00:00",
      operate_time: 0,
      pulse_frequency: '', // 脉率
      breathing_rated: '', // 呼吸频率
      systolic_bp: '', // 收缩压
      diastolic_bp: '', // 舒张压
      blood_flow_volume: '', // 血流量
      venous_pressure: '', // 静脉压
      venous_pressure_type: 1, // 静脉压类型
      arterial_pressure: '', // 动脉压
      arterial_pressure_type: 1, // 动脉压类型
      transmembrane_pressure: '', // 跨膜压
      transmembrane_pressure_type: 1, // 跨膜压类型
      ultrafiltration_rate: '', // 超滤率
      ultrafiltration_volume: '', // 超滤量
      sodium_concentration: '', // 钠浓度
      dialysate_temperature: '', // 透析液温度
      temperature: '', // 体温
      replacement_rate: '', // 置换率
      displacement_quantity: '', // 置换量
      conductivity: '',
      displacement_flow_quantity: '',
      ktv: '', // KT/V(在线)
      symptom: '', // 症状
      dispose: '', // 处理
      result: '', // 结果,
      blood_oxygen_saturation: '',
      monitoring_nurse: this.$store.getters.user.admin.id, // 监测人
      creator: 0,
      heparin: '',
      dialysate_flow: '',
      urr: '',
      blood_sugar: '',
      monitor_anticoagulant: '',
      monitor_anticoagulant_value: '',
      blood_pressure_monitoring_site: '',
      complication: '',
      accumulated_blood_volume: '',
      blood_temperature: '',
      urea_monitoring: '',
      blood_thickness: '',
      blood_monitor: '',
      heparin_amount: '',
      dehydration: '',
      filter_pressure: '',
      replacement_speed:'', // 置换液速度
      dicarbonate:"",//碳酸氢钠
      remaining_amount_water:"",//肝素用量余量
      dehydration: '',
      filter_pressure: '',
      replacement_speed:'', // 置换液速度
      dicarbonate:"",//碳酸氢钠
      remaining_amount_water:"",//肝素用量余量
      is_pressure:"否",
      heparin_one:"",
      ultrafiltration_rate_one:"",
      monitor_systolic_blood_pressure_one:"",
      monitor_diastolic_blood_pressure_one:"",
      monitor_pulse_frequency_one:"",
      blood_flow_volume_one:"",
      venous_pressure_one:"",
      arterial_pressure_one:"",
      transmembrane_pressure_one:"",
      ultrafiltration_volume_one:"",
      sodium_concentration_one:"",
      dialysate_temperature_one:"",
      replacement_rate_one:"",
      displacement_quantity_one:"",
      ktv_one:"",
      urr_one:"",
      conductivity_one:"",
      displacement_flow_quantity_one:"",
      blood_oxygen_saturation_one:"",
      dialysate_flow_one:"",
      blood_sugar_one:"",
      monitor_temperature_one:"",
      pulse_frequency_one:"",
      blood_temperature_one:"",
      urea_monitoring_one:"",
      blood_thickness_one:"",
      blood_monitor_one:"",
      replacement_speed_one:"",
      dicarbonate_one:"",
      accumulated_blood_volume_one:"",



    },
    anticoagulantsConfit: [],
    allChecked: false,
    show: false,
    symptomsArr: [],
    disposeArr: [],
    resultsArr: [],
    formTitle: '新增监测',
    currentIndex: -1,
    currentRow: null,
    tableShow: false,
    bloodPressureMmonitoringSite: [],
    complicationList: [],
    symptomsShow: false,
    disposeShow: false,
    resultsShow: false,
    infor_visibility: false,
    pressureList:[
      {id:1,name:"是"},
      {id:2,name:"否"}
    ]
  }
},
created () {
  this.getPermission()
  var date = this.$route.query && this.$route.query.date
  this.template_id = this.$store.getters.user.template_info.template_id
  this.org_id = this.$store.getters.user.template_info.org_id

  this.form.monitor_date = date
  this.form.operate_time = this.pickertime.getTime()

  this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit

  this.symptoms = getDataConfig('hemodialysis', 'symptoms')
  this.dispose = getDataConfig('hemodialysis', 'deals')
  this.results = getDataConfig('hemodialysis', 'results')

  if(this.monitorRecords!=null && this.monitorRecords.length>0){
    this.monitorRecords.sort((a, b) => a.operate_time - b.operate_time)
  }

  this.bloodPressureMmonitoringSite = getDataConfig('hemodialysis', 'blood_pressure_monitoring_site')
  this.complicationList = getDataConfig('hemodialysis', 'complication')

},
methods: {
  changeFocus (e) {
    var inputGroup = document.getElementsByTagName('input')
    var inputGroupArr = Array.from(document.getElementsByTagName('input'))
    var iGlength = inputGroupArr.length
    var e = event || e
    var idx = inputGroupArr.indexOf(e.srcElement)
    if (e.keyCode == 13 || e.which == 13) {
      inputGroup[idx + 1].focus()
    }
    // e.preventDefault();
  },
  restrict(even){
      const e=even.target.value
      if((e<130||e>250)){
        Toast.fail(`收缩压不能小于130，大于250`)
      }
  },
  diastolic(even){
    const e=even.target.value
    if((e<50||e>80)){
      Toast.fail(`舒张压不能小于50，大于80`)
    }
  },
  frequency(even){
    const e=even.target.value
    if((e<50||e>130)){
      Toast.fail(`脉搏不能小于50，大于130`)
    }
  },
  temperature(even){
    const e=even.target.value
    if((e<36||e>37)){
      Toast.fail(`体温不能小于36，大于37`)
    }
  },
  breathing(even){
    const e=even.target.value
    if((e<16||e>20)){
      Toast.fail(`呼吸频率不能小于16，大于20`)
    }
  },
  blood(even){
    const e=even.target.value
    if((e<180||e>300)){
      Toast.fail(`血流量不能小于180，大于300`)
    }
  },
  sodium(even){
    const e=even.target.value
    if((e<136||e>142)){
      Toast.fail(`钠浓度不能小于136，大于142`)
    }
  },
  conductivity(even){
    const e=even.target.value
    if((e<136||e>142)){
      Toast.fail(`电导度不能小于136，大于142`)
    }
  },
  dialysate(even){
    const e=even.target.value
    if((e<35||e>37)){
      Toast.fail(`透析液温度不能小于35，大于37`)
    }
  },
  inputFocus: function (event) {
    var input = event.target

    if (input.setSelectionRange) {
      setTimeout(function () {
        input.setSelectionRange(0, input.value.length)
      }, 0)
    } else if (input.createTextRange) {
      var rng = input.createTextRange()
      rng.move('character', input.value.length)
      rng.select()
    }
  },
  isShow (name) {
    var filedList = this.$store.getters.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
  },
  isShow_title (name) {
    var filedList = this.$store.getters.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&&
        filedList[i].is_write == 1) {
        return true
      }
    }
    return false
  },
    getArrEqual(arr1, arr2) {
    let newArr = [];
    for (let i = 0; i < arr2.length; i++) {
      for (let j = 0; j < arr1.length; j++) {
        if (arr1[j].module == 4&&arr1[j].is_show == 1 &&arr1[j].filed_name === arr2[i][0]&&arr1[j].is_write == 1) {
            newArr.push(arr1[j]);
        }
      }
    }
    return newArr;
  },

  open_tips(info) {
    for (let i = 0; i < info.length; i++) {
      if (info[i].is_write == 1) {
        Toast.fail(`${info[i].filed_name_cn}为必填字段，不能为空`)
      }
    }
  },
  parseTime (time, layout) {
    return parseTime(time, layout)
  },
  getTimes (time) {
    return parseTime(time, '{h}:{i}')
  },
  getTime (time) {
    if (time == 0) {
      return ''
    } else {
      return parseTime(time, '{h}:{i}')
    }
  },
  // 自动计算 超滤量
  handleConfirm (time) {
    console.log("haaaaaaaaaaaaaa",this.org_id)

    // if(this.org_id!=10693  ){
    //  // 获取每分钟的超滤率
    //   if (this.form.ultrafiltration_rate > 0) {
    //     var ultrafiltration_rate_min = (this.form.ultrafiltration_rate / 60).toFixed(0)
    //     var operateTime = time / 1000
    //     if (this.order.id > 0) {
    //       if (operateTime > this.order.start_time) {
    //         // 获取时间差
    //         var total_min = (operateTime - this.order.start_time) / 60


    //         if (total_min / 60 == 1 || total_min / 60 == 2 || total_min / 60 == 3 || total_min / 60 == 4 || total_min / 60 == 5 || total_min / 60 == 6) {
    //           this.form.ultrafiltration_volume = (this.form.ultrafiltration_rate * (total_min / 60))
    //         } else {
    //           // 获取超滤量的值
    //           this.form.ultrafiltration_volume = ultrafiltration_rate_min * total_min
    //         }
    //       }
    //     }
    //   }
    // }

    if(this.org_id == 10693){
        // 获取每分钟的超滤率
      if (this.form.ultrafiltration_rate_one > 0) {
        // var ultrafiltration_rate_min = (this.form.ultrafiltration_rate_one / 60).toFixed(0)
        // console.log("ultrafiltration_rate_min-----------",ultrafiltration_rate_min)
        var operateTime = time / 1000
        if (this.order.id > 0) {
          if (operateTime > this.order.start_time) {
            // 获取时间差
              var total_min = (operateTime - this.order.start_time) / 60

              console.log("数据-233333333333333333333",total_min)
              // console.log("this.form.ultrafiltration_volume_one",this.form.ultrafiltration_volume_one)
              // console.log("total_min------------------",total_min)
              // console.log("this.form.ultrafiltration_volume_one * total_min",this.form.ultrafiltration_volume_one * total_min)
              // 获取超滤量的值
              this.form.ultrafiltration_volume_one = ((this.form.ultrafiltration_rate_one * total_min)/60).toFixed(0)


          }
        }
      }
    }

    if(this.org_id != 10693){
        // 获取每分钟的超滤率
      if (this.form.ultrafiltration_rate > 0) {
        // var ultrafiltration_rate_min = (this.form.ultrafiltration_rate_one / 60).toFixed(0)
        // console.log("ultrafiltration_rate_min-----------",ultrafiltration_rate_min)
        var operateTime = time / 1000
        if (this.order.id > 0) {
          if (operateTime > this.order.start_time) {
            // 获取时间差
              var total_min = (operateTime - this.order.start_time) / 60

              console.log("数据-233333333333333333333",total_min)
              // console.log("this.form.ultrafiltration_volume_one",this.form.ultrafiltration_volume_one)
              // console.log("total_min------------------",total_min)
              // console.log("this.form.ultrafiltration_volume_one * total_min",this.form.ultrafiltration_volume_one * total_min)
              // 获取超滤量的值
              this.form.ultrafiltration_volume = ((this.form.ultrafiltration_rate * total_min)/60).toFixed(0)


          }
        }
      }
    }

    this.form.operate_time = time.getTime()
  },
  toggle () {
    this.result = []
    if (this.allChecked) {
      for (let i = 0; i < this.monitorRecords.length; i++) {
        this.result.push(this.monitorRecords[i].id)
      }
    } else {
      this.result = []
    }
  },
  checkGroup (arr) {
    if (arr.length == this.monitorRecords.length) {
      this.allChecked = true
    } else {
      this.allChecked = false
    }
    if (arr.length == 1) {
      this.monitorRecords.map(item => {
        if (item.id == arr.toString()) {
          this.currentRow = item
        }
      })
    } else {
      this.currentRow = null
    }
  },
  selectRow (index, row) {
    if (row != null) {
      this.creator = row.creator
    }
    this.currentIndex = index
    this.currentRow = row
  },
  chooseTime () {
    this.$refs.picker.open()
  },
  openForm () {
    if (this.is_has_create == false) {
      Toast.fail('你没有新增监测的权限')
      return false
    }
    this.show = true
    this.formTitle = '新增监测'
    var date = this.$route.query && this.$route.query.date
    date *= 1000
    var newDate = new Date(date)

    var y = newDate.getFullYear()
    var m = newDate.getMonth() + 1
    var d = newDate.getDate()
    var record_date = y + '/' + (m < 10 ? '0' + m : m) + '/' + (d < 10 ? '0' + d : d)
    this.form.monitor_date = new Date(record_date + ' 00:00:00').getTime() / 1000

    this.getLastRecordTody()
  },
  submitAction: function () {

    var params = {}

    params.patient_id = this.patient.id
    params.order_id = this.order == null ? 0 : this.order.id
    params.date = this.form.monitor_date
    params.operate_time = parseInt(this.form.operate_time / 1000)
    params.pulse_frequency = this.form.pulse_frequency
    params.breathing_rated = this.form.breathing_rated
    params.systolic_bp = this.form.systolic_bp
    params.diastolic_bp = this.form.diastolic_bp
    params.blood_flow_volume = this.form.blood_flow_volume
    params.venous_pressure = this.form.venous_pressure
    params.venous_pressure_type = this.form.venous_pressure_type
    params.arterial_pressure = this.form.arterial_pressure
    params.arterial_pressure_type = this.form.arterial_pressure_type
    params.transmembrane_pressure = this.form.transmembrane_pressure
    params.transmembrane_pressure_type = this.form.transmembrane_pressure_type
    params.ultrafiltration_rate = this.form.ultrafiltration_rate
    params.ultrafiltration_volume = this.form.ultrafiltration_volume
    params.sodium_concentration = this.form.sodium_concentration
    params.dialysate_temperature = this.form.dialysate_temperature
    params.temperature = this.form.temperature
    params.replacement_rate = this.form.replacement_rate
    params.displacement_quantity = this.form.displacement_quantity
    params.conductivity = this.form.conductivity
    params.displacement_flow_quantity = this.form.displacement_flow_quantity
    params.blood_oxygen_saturation = this.form.blood_oxygen_saturation
    params.heparin = this.form.heparin
    params.dialysate_flow = this.form.dialysate_flow

    params.ktv = this.form.ktv
    params.urr = this.form.urr
    params.blood_sugar = this.form.blood_sugar
    params.symptom = this.form.symptom
    params.dispose = this.form.dispose
    params.result = this.form.result
    params.monitoring_nurse = this.form.monitoring_nurse
    params.mode = '1'
    params.monitor_anticoagulant = this.form.monitor_anticoagulant
    params.monitor_anticoagulant_value = this.form.monitor_anticoagulant_value
    params.blood_pressure_monitoring_site = this.form.blood_pressure_monitoring_site
    params.complication = this.form.complication
    params.accumulated_blood_volume = this.form.accumulated_blood_volume
    params.blood_temperature = this.form.blood_temperature
    params.urea_monitoring = this.form.urea_monitoring
    params.blood_thickness = this.form.blood_thickness
    params.blood_monitor = this.form.blood_monitor
    params.heparin_amount = this.form.heparin_amount
    params.dehydration = this.form.dehydration
    params.filter_pressure = this.form.filter_pressure
    params.replacement_speed = this.form.replacement_speed
    params.dicarbonate = this.form.dicarbonate
    params.is_pressure = this.form.is_pressure
    params.ultrafiltration_rate_one = this.form.ultrafiltration_rate_one
    params.heparin_one = this.form.heparin_one

    params.ultrafiltration_rate_one = this.form.ultrafiltration_rate_one
    params.monitor_systolic_blood_pressure_one = this.form.monitor_systolic_blood_pressure_one
    params.monitor_diastolic_blood_pressure_one =this.form.monitor_diastolic_blood_pressure_one
    params.monitor_pulse_frequency_one = this.form.monitor_pulse_frequency_one
    params.blood_flow_volume_one = this.form.blood_flow_volume_one
    params.venous_pressure_one = this.form.venous_pressure_one
    params.arterial_pressure_one = this.form.arterial_pressure_one
    params.transmembrane_pressure_one = this.form.transmembrane_pressure_one
    params.ultrafiltration_volume_one = this.form.ultrafiltration_volume_one
    params.sodium_concentration_one = this.form.sodium_concentration_one
    params.dialysate_temperature_one = this.form.dialysate_temperature_one
    params.replacement_rate_one = this.form.replacement_rate_one
    params.displacement_quantity_one = this.form.displacement_quantity_one
    params.ktv_one = this.form.ktv_one
    params.urr_one = this.form.urr_one
    params.conductivity_one = this.form.conductivity_one
    params.displacement_flow_quantity_one = this.form.displacement_flow_quantity_one
    params.blood_oxygen_saturation_one = this.form.blood_oxygen_saturation_one
    params.dialysate_flow_one = this.form.dialysate_flow_one
    params.blood_sugar_one = this.form.blood_sugar_one
    params.monitor_temperature_one = this.form.monitor_temperature_one
    params.pulse_frequency_one = this.form.pulse_frequency_one
    params.blood_temperature_one = this.form.blood_temperature_one
    params.urea_monitoring_one = this.form.urea_monitoring_one
    params.blood_thickness_one = this.form.blood_thickness_one
    params.blood_monitor_one = this.form.blood_monitor_one
    params.replacement_speed_one = this.form.replacement_speed_one
    params.dicarbonate_one = this.form.dicarbonate_one
    params.accumulated_blood_volume_one = this.form.accumulated_blood_volume_one

    console.log('params', params)

    // 必填弹窗开始
        let result = [];
        let filedList = this.$store.getters.user.fileds;
        let new_arr = Object.entries(params);
        new_arr.forEach((el) => {
          if (el[1] === "" || el[1] === 0 ) {
            // result.push(el);
            result.unshift(el)
          }
        });
        let warnarr = [];
        warnarr = this.getArrEqual(filedList, result);
        if (warnarr.length > 0) {
          this.open_tips(warnarr);
          // 必填弹窗结束
        } else {
          this.loading = true
          Toast.loading({ forbidClick: true, duration: 0 })
        addMonitorRecord(params).then(rs => {
        var resp = rs.data
        if (resp.state == 1) {
          this.loading = false
          var monitor = resp.data.monitor
          this.$emit('did_add_monitor', monitor)

          this.form.pulse_frequency = ''
          this.form.breathing_rated = ''
          this.form.systolic_bp = ''
          this.form.diastolic_bp = ''
          this.form.blood_flow_volume = ''
          this.form.venous_pressure = ''
          this.form.arterial_pressure = ''
          this.form.transmembrane_pressure = ''
          this.form.ultrafiltration_rate = ''
          this.form.ultrafiltration_volume = ''
          this.form.sodium_concentration = ''
          this.form.dialysate_temperature = ''
          this.form.temperature = ''
          this.form.replacement_rate = ''
          this.form.displacement_quantity = ''
          this.form.ktv = ''
          this.form.symptom = ''
          this.form.dispose = ''
          this.form.result = ''
          this.form.conductivity = ''
          this.form.displacement_flow_quantity = ''
          this.form.heparin = ''
          this.form.dialysate_flow = ''
          this.form.urr = ''
          this.form.blood_sugar = ''
          this.form.monitor_anticoagulant = ''
          this.form.monitor_anticoagulant_value = ''
          this.form.complication = ''
          this.form.blood_pressure_monitoring_site = ''
          this.form.accumulated_blood_volume = ''
          this.form.blood_temperature = ''
          this.form.urea_monitoring = ''
          this.form.blood_thickness = ''
          this.form.blood_monitor = ''
          this.form.dehydration = ''
          this.form.heparin_amount = ''
          this.form.filter_pressure = ''
          this.form.replacement_speed = ""
          this.form.dicarbonate = ""
          this.form.ultrafiltration_rate_one = ""
          this.form.heparin_one = ""

          this.form.monitor_diastolic_blood_pressure_one = ""
          this.form.monitor_systolic_blood_pressure_one =""
          this.form.monitor_pulse_frequency_one=""
          this.form.blood_flow_volume_one=""
          this.form.venous_pressure_one = ""
          this.form.arterial_pressure_one= ""
          this.form.transmembrane_pressure_one= ""
          this.form.ultrafiltration_volume_one = ""
          this.form.sodium_concentration_one = ""
          this.form.dialysate_temperature_one =""
          this.form.replacement_rate_one =""
          this.form.displacement_quantity_one = ""
          this.form.ktv_one =""
          this.form.urr_one = ""
          this.form.conductivity_one = ""
          this.form.displacement_flow_quantity_one = ""
          this.form.blood_oxygen_saturation_one = ""
          this.form.dialysate_flow_one = ""
          this.form.blood_sugar_one = ""
          this.form.monitor_temperature_one =""
          this.form.pulse_frequency_one = ""
          this.form.blood_temperature_one = ""
          this.form.urea_monitoring_one = ""
          this.form.blood_thickness_one = ""
          this.form.blood_monitor_one = ""
          this.form.replacement_speed_one = ""
          this.form.dicarbonate_one =""
          this.form.accumulated_blood_volume_one =""
          // this.last_monitor_record.sodium_concentration =
          //   monitor.sodium_concentration
          // this.last_monitor_record.dialysate_temperature =
          //   monitor.dialysate_temperature

          Toast.success('新增成功')
          this.formPanel = false
          this.listPanel = true
          this.symptomsArr = []
          this.disposeArr = []
          this.resultsArr = []
          this.show = false

          // this.$nextTick(() => {
          //     this.$refs[`crewData${this.monitorRecords.length-1}`].scrollIntoView()
          // })监测
        } else {
          this.loading = false
          this.symptomsArr = []
          this.disposeArr = []
          this.resultsArr = []
          this.show = false
          Toast.fail(resp.msg)
         if(resp.code == 600000008){
           this.loading = false
            this.show = false
            this.infor_visibility = true
          }
        }
      })
      .catch(err => {
        this.loading = false
        this.symptomsArr = []
        this.disposeArr = []
        this.resultsArr = []
        this.show = false
        Toast.fail(err)
      })
        }
  },
  openEidtForm () {
    if (this.currentRow == null) {
      Toast.fail('请先选择要修改的记录')
      return false
    } else {
      this.formTitle = '修改监测'
      this.show = true
    }

    this.formPanel = true
    this.listPanel = false
    if (this.currentRow.systolic_blood_pressure == 0) {
      this.form.systolic_bp = ''
    } else {
      this.form.systolic_bp = this.currentRow.systolic_blood_pressure
    }

    if (this.currentRow.diastolic_blood_pressure == 0) {
      this.form.diastolic_bp = ''
    } else {
      this.form.diastolic_bp = this.currentRow.diastolic_blood_pressure
    }

    if (this.currentRow.pulse_frequency == 0) {
      this.form.pulse_frequency = ''
    } else {
      this.form.pulse_frequency = this.currentRow.pulse_frequency
    }

    if (this.currentRow.breathing_rate == 0) {
      this.form.breathing_rated = ''
    } else {
      this.form.breathing_rated = this.currentRow.breathing_rate
    }

    if (this.currentRow.blood_flow_volume == 0) {
      this.form.blood_flow_volume = ''
    } else {
      this.form.blood_flow_volume = this.currentRow.blood_flow_volume
    }

    if (this.currentRow.venous_pressure == 0) {
      this.form.venous_pressure = ''
    } else {
      this.form.venous_pressure = this.currentRow.venous_pressure
    }

    this.form.venous_pressure_type = this.currentRow.venous_pressure_type ? this.currentRow.venous_pressure_type : 1

    if (this.org_id == 9671 || this.org_id == 9675 || this.org_id == 10340) {
      if (this.currentRow.arterial_pressure == 0) {

        this.form.arterial_pressure = '-100'

        this.form.arterial_pressure = '-'
      } else {
        this.form.arterial_pressure = this.currentRow.arterial_pressure
      }
    } else {
      if (this.currentRow.arterial_pressure == 0) {
        if(this.org_id == 10495){
          this.form.arterial_pressure = '-'
        }else{
          this.form.arterial_pressure = ''
        }

        if(this.org_id == 10495){
          this.form.arterial_pressure = '-'
        }else{
          this.form.arterial_pressure = ''
        }

      } else {
        this.form.arterial_pressure = this.currentRow.arterial_pressure
      }
    }

    this.form.arterial_pressure_type = this.currentRow.arterial_pressure_type ? this.currentRow.arterial_pressure_type : 1

    if (this.currentRow.transmembrane_pressure == 0) {
      this.form.transmembrane_pressure = ''
    } else {
      this.form.transmembrane_pressure = this.currentRow.transmembrane_pressure
    }

    this.form.transmembrane_pressure_type = this.currentRow.transmembrane_pressure_type ? this.currentRow.transmembrane_pressure_type : 1

    if (this.currentRow.ultrafiltration_rate == 0) {
        this.form.ultrafiltration_rate = ''
      } else {
        this.form.ultrafiltration_rate = this.currentRow.ultrafiltration_rate
      }
    if(this.org_id !=10551 && this.org_id!=10644){

      if (this.currentRow.ultrafiltration_volume == 0) {
        this.form.ultrafiltration_volume = ''
      } else {
        this.form.ultrafiltration_volume = this.currentRow.ultrafiltration_volume
      }
    }

    if(this.org_id == 10551 || this.org_id == 10644 || this.org_id == 10679){
      this.form.ultrafiltration_volume = this.currentRow.ultrafiltration_volume?this.currentRow.ultrafiltration_volume:0
    }


    if (this.currentRow.sodium_concentration == 0) {
      this.form.sodium_concentration = ''
    } else {
      this.form.sodium_concentration = this.currentRow.sodium_concentration
    }

    if (this.currentRow.dialysate_temperature == 0) {
      this.form.dialysate_temperature = ''
    } else {
      if(this.org_id == 10495){
        this.form.dialysate_temperature = 36.5
      }else{
        this.form.dialysate_temperature = this.currentRow.dialysate_temperature
      }
      if(this.org_id == 10495){
        this.form.dialysate_temperature = 36.5
      }else{
        this.form.dialysate_temperature = this.currentRow.dialysate_temperature
      }

    }
    if (this.currentRow.temperature == 0) {
      this.form.temperature = ''
    } else {
      this.form.temperature = this.currentRow.temperature
    }

    if (this.currentRow.replacement_rate == 0) {
      this.form.replacement_rate = ''
    } else {
      this.form.replacement_rate = this.currentRow.replacement_rate
    }

    if (this.currentRow.displacement_quantity == 0) {
      this.form.displacement_quantity = ''
    } else {
      this.form.displacement_quantity = this.currentRow.displacement_quantity
    }

    if (this.currentRow.conductivity == 0) {
      this.form.conductivity = ''
    } else {
      this.form.conductivity = this.currentRow.conductivity
    }

    if (this.currentRow.displacement_flow_quantity == 0) {
      this.form.displacement_flow_quantity = ''
    } else {
      this.form.displacement_flow_quantity = this.currentRow.displacement_flow_quantity
    }

    if (this.currentRow.heparin == 0) {
      this.form.heparin = ''
    } else {
      this.form.heparin = this.currentRow.heparin
    }

    if (this.currentRow.dialysate_flow == 0) {
      this.form.dialysate_flow = ''
    } else {
      this.form.dialysate_flow = this.currentRow.dialysate_flow
    }

    if (this.currentRow.ktv == 0) {
      this.form.ktv = ''
    } else {
      this.form.ktv = this.currentRow.ktv
    }
    if (this.currentRow.urr == '') {
      this.form.urr = ''
    } else {
      this.form.urr = this.currentRow.urr
    }

    if (this.currentRow.blood_sugar == '') {
      this.form.blood_sugar = ''
    } else {
      this.form.blood_sugar = this.currentRow.blood_sugar
    }
    if (this.org_id == 10340) {
      this.form.blood_oxygen_saturation = this.currentRow.blood_oxygen_saturation ? this.currentRow.blood_oxygen_saturation : '/'
    } else {
      this.form.blood_oxygen_saturation = this.currentRow.blood_oxygen_saturation ? this.currentRow.blood_oxygen_saturation : ' '
    }

    this.form.symptom = this.currentRow.symptom
    this.form.dispose = this.currentRow.dispose
    this.form.result = this.currentRow.result
    this.form.id = this.currentRow.id
    this.form.operate_time = this.currentRow.operate_time * 1000
    this.form.creator = this.currentRow.creator

    this.form.monitor_anticoagulant = this.currentRow.monitor_anticoagulant
    this.form.monitor_anticoagulant_value = this.currentRow.monitor_anticoagulant_value

    this.symptomsArr = this.currentRow.symptom.split(',')
    this.disposeArr = this.currentRow.dispose.split(',')
    this.resultsArr = this.currentRow.result.split(',')
    this.form.blood_pressure_monitoring_site = this.currentRow.blood_pressure_monitoring_site
    this.form.complication = this.currentRow.complication
    this.form.accumulated_blood_volume = this.currentRow.accumulated_blood_volume

    this.form.blood_temperature = this.currentRow.blood_temperature

    this.form.urea_monitoring = this.currentRow.urea_monitoring
    this.form.blood_thickness = this.currentRow.blood_thickness
    this.form.blood_monitor = this.currentRow.blood_monitor
    this.form.heparin_amount = this.currentRow.heparin_amount
    if (this.currentRow.heparin_amount === 0) {
      this.form.heparin_amount = ''
    } else {
      this.form.heparin_amount = this.currentRow.heparin_amount
    }
    if (this.currentRow.dehydration === 0) {
      this.form.dehydration = ''
    } else {
      this.form.dehydration = this.currentRow.dehydration
    }

    this.form.id = this.currentRow.id
    this.form.filter_pressure = this.currentRow.filter_pressure ? this.currentRow.filter_pressure : ''
    this.form.replacement_speed = this.currentRow.replacement_speed?this.currentRow.replacement_speed:''
    this.form.dicarbonate = this.currentRow.dicarbonate?this.currentRow.dicarbonate:""
    this.form.ultrafiltration_rate_one = this.currentRow.ultrafiltration_rate_one?this.currentRow.ultrafiltration_rate_one:""
    this.form.heparin_one = this.currentRow.heparin_one?this.currentRow.heparin_one:""

    this.form.monitor_systolic_blood_pressure_one = this.currentRow.monitor_systolic_blood_pressure_one?this.currentRow.monitor_systolic_blood_pressure_one:""
    this.form.monitor_diastolic_blood_pressure_one = this.currentRow.monitor_diastolic_blood_pressure_one?this.currentRow.monitor_diastolic_blood_pressure_one:""
    this.form.monitor_pulse_frequency_one = this.currentRow.monitor_pulse_frequency_one?this.currentRow.monitor_pulse_frequency_one:""
    this.form.blood_flow_volume_one = this.currentRow.blood_flow_volume_one?this.currentRow.blood_flow_volume_one:""
    this.form.venous_pressure_one = this.currentRow.venous_pressure_one? this.currentRow.venous_pressure_one:""
    this.form.arterial_pressure_one = this.currentRow.arterial_pressure_one?this.currentRow.arterial_pressure_one:""
    this.form.transmembrane_pressure_one = this.currentRow.transmembrane_pressure_one?this.currentRow.transmembrane_pressure_one:""
    this.form.ultrafiltration_volume_one = this.currentRow.ultrafiltration_volume_one?this.currentRow.ultrafiltration_volume_one:""
    this.form.sodium_concentration_one = this.currentRow.sodium_concentration_one?this.currentRow.sodium_concentration_one:""
    this.form.dialysate_temperature_one = this.currentRow.dialysate_temperature_one?this.currentRow.dialysate_temperature_one:""
    this.form.replacement_rate_one = this.currentRow.replacement_rate_one?this.currentRow.replacement_rate_one:""
    this.form.displacement_quantity_one = this.currentRow.displacement_quantity_one?this.currentRow.displacement_quantity_one:""
    this.form.ktv_one = this.currentRow.ktv_one? this.currentRow.ktv_one:""
    this.form.urr_one = this.currentRow.urr_one?this.currentRow.urr_one:""
    this.form.conductivity_one = this.currentRow.conductivity_one?this.currentRow.conductivity_one:""
    this.form.displacement_flow_quantity_one = this.currentRow.displacement_flow_quantity_one?this.currentRow.displacement_flow_quantity_one:""
    this.form.blood_oxygen_saturation_one = this.currentRow.blood_oxygen_saturation_one?this.currentRow.blood_oxygen_saturation_one:""
    this.form.dialysate_flow_one = this.currentRow.dialysate_flow_one?this.currentRow.dialysate_flow_one:""
    this.form.blood_sugar_one = this.currentRow.blood_sugar_one?this.currentRow.blood_sugar_one:""
    this.form.monitor_temperature_one = this.currentRow.monitor_temperature_one?this.currentRow.monitor_temperature_one:""
    this.form.pulse_frequency_one = this.currentRow.pulse_frequency_one?this.currentRow.pulse_frequency_one:""
    this.form.blood_temperature_one= this.currentRow.blood_temperature_one?this.currentRow.blood_temperature_one:""
    console.log("hahhahahah",this.form.blood_temperature_one)
    this.form.urea_monitoring_one = this.currentRow.urea_monitoring_one?this.currentRow.urea_monitoring_one:""
    this.form.blood_thickness_one = this.currentRow.blood_thickness_one?this.currentRow.blood_thickness_one:""
    this.form.blood_monitor_one = this.currentRow.blood_monitor_one?this.currentRow.blood_monitor_one:""
    this.form.replacement_speed_one = this.currentRow.replacement_speed_one?this.currentRow.replacement_speed_one:""
    this.form.dicarbonate_one = this.currentRow.dicarbonate_one?this.currentRow.dicarbonate_one:""
    this.form.accumulated_blood_volume_one = this.currentRow.accumulated_blood_volume_one?this.currentRow.accumulated_blood_volume_one:""

  },
  submitEditAction: function () {
    this.loading = true
    Toast.loading({ forbidClick: true, duration: 0 })
    var params = {}

    params.patient_id = this.patient.id
    params.order_id = this.order == null ? 0 : this.order.id
    params.date = this.form.monitor_date
    // params.time = this.form.monitor_time;
    params.operate_time = parseInt(this.form.operate_time / 1000)
    params.pulse_frequency = this.form.pulse_frequency
    params.breathing_rated = this.form.breathing_rated
    params.systolic_bp = this.form.systolic_bp
    params.diastolic_bp = this.form.diastolic_bp
    params.blood_flow_volume = this.form.blood_flow_volume
    params.venous_pressure = this.form.venous_pressure
    params.venous_pressure_type = this.form.venous_pressure_type
    params.arterial_pressure = this.form.arterial_pressure
    params.arterial_pressure_type = this.form.arterial_pressure_type
    params.transmembrane_pressure = this.form.transmembrane_pressure
    params.transmembrane_pressure_type = this.form.transmembrane_pressure_type
    params.ultrafiltration_rate = this.form.ultrafiltration_rate
    params.ultrafiltration_volume = this.form.ultrafiltration_volume
    params.sodium_concentration = this.form.sodium_concentration
    params.dialysate_temperature = this.form.dialysate_temperature
    params.temperature = this.form.temperature
    params.replacement_rate = this.form.replacement_rate
    params.displacement_quantity = this.form.displacement_quantity
    params.ktv = this.form.ktv
    params.conductivity = this.form.conductivity
    params.symptom = this.form.symptom
    params.heparin = this.form.heparin
    params.dialysate_flow = this.form.dialysate_flow

    params.dispose = this.form.dispose
    params.result = this.form.result
    params.monitoring_nurse = this.form.monitoring_nurse
    params.displacement_flow_quantity = this.form.displacement_flow_quantity
    params.blood_oxygen_saturation = this.form.blood_oxygen_saturation
    params.id = this.form.id
    params.mode = '2'
    params.urr = this.form.urr
    params.blood_sugar = this.form.blood_sugar
    params.monitor_anticoagulant = this.form.monitor_anticoagulant
    params.monitor_anticoagulant_value = this.form.monitor_anticoagulant_value
    params.blood_pressure_monitoring_site = this.form.blood_pressure_monitoring_site
    params.complication = this.form.complication
    params.accumulated_blood_volume = this.form.accumulated_blood_volume
    params.blood_temperature = this.form.blood_temperature
    params.urea_monitoring = this.form.urea_monitoring
    params.blood_thickness = this.form.blood_thickness
    params.blood_monitor = this.form.blood_monitor
    params.heparin_amount = this.form.heparin_amount
    params.dehydration = this.form.dehydration
    params.filter_pressure = this.form.filter_pressure
    params.dicarbonate = this.form.dicarbonate
    params.replacement_speed = this.form.replacement_speed
    params.is_pressure = this.form.is_pressure
    params.ultrafiltration_rate_one = this.form.ultrafiltration_rate_one?this.form.ultrafiltration_rate_one:"/"
    params.heparin_one= this.form.heparin_one?this.form.heparin_one:"/"

    params.monitor_systolic_blood_pressure_one = this.form.monitor_systolic_blood_pressure_one?this.form.monitor_systolic_blood_pressure_one:""
    params.monitor_diastolic_blood_pressure_one =this.form.monitor_diastolic_blood_pressure_one?this.form.monitor_diastolic_blood_pressure_one:""
    params.monitor_pulse_frequency_one = this.form.monitor_pulse_frequency_one?this.form.monitor_pulse_frequency_one:""
    params.blood_flow_volume_one = this.form.blood_flow_volume_one?this.form.blood_flow_volume_one:""
    params.venous_pressure_one = this.form.venous_pressure_one?this.form.venous_pressure_one:""
    params.arterial_pressure_one = this.form.arterial_pressure_one?this.form.arterial_pressure_one:""
    params.transmembrane_pressure_one = this.form.transmembrane_pressure_one?this.form.transmembrane_pressure_one:""
    params.ultrafiltration_volume_one = this.form.ultrafiltration_volume_one?this.form.ultrafiltration_volume_one:""
    params.sodium_concentration_one = this.form.sodium_concentration_one? this.form.sodium_concentration_one:""
    params.dialysate_temperature_one = this.form.dialysate_temperature_one?this.form.dialysate_temperature_one:""
    params.replacement_rate_one = this.form.replacement_rate_one?this.form.replacement_rate_one:""
    params.displacement_quantity_one = this.form.displacement_quantity_one?this.form.displacement_quantity_one:""
    params.ktv_one = this.form.ktv_one?this.form.ktv_one:""
    params.urr_one = this.form.urr_one?this.form.urr_one:""
    params.conductivity_one = this.form.conductivity_one?this.form.conductivity_one:""
    params.displacement_flow_quantity_one = this.form.displacement_flow_quantity_one?this.form.displacement_flow_quantity_one:""
    params.blood_oxygen_saturation_one = this.form.blood_oxygen_saturation_one?this.form.blood_oxygen_saturation_one:""
    params.dialysate_flow_one = this.form.dialysate_flow_one?this.form.dialysate_flow_one:""
    params.blood_sugar_one = this.form.blood_sugar_one?this.form.blood_sugar_one:""
    params.monitor_temperature_one = this.form.monitor_temperature_one?this.form.monitor_temperature_one:""
    params.pulse_frequency_one = this.form.pulse_frequency_one? this.form.pulse_frequency_one:""
    params.blood_temperature_one = this.form.blood_temperature_one?this.form.blood_temperature_one:""
    params.urea_monitoring_one = this.form.urea_monitoring_one?this.form.urea_monitoring_one:""
    params.blood_thickness_one = this.form.blood_thickness_one?this.form.blood_thickness_one:""
    params.blood_monitor_one = this.form.blood_monitor_one?this.form.blood_monitor_one:""
    params.replacement_speed_one = this.form.replacement_speed_one?this.form.replacement_speed_one:""
    params.dicarbonate_one = this.form.dicarbonate_one?this.form.dicarbonate_one:""
    params.accumulated_blood_volume_one = this.form.accumulated_blood_volume_one? this.form.accumulated_blood_volume_one:""
    if (
      this.form.creator != this.$store.getters.user.admin.id &&
              this.form.creator != 0
    ) {
      params.mode = '3'
    }
    editMonitorRecord(params)
      .then(rs => {
        var resp = rs.data
        if (resp.state == 1) {
          this.loading = false

          var monitor = resp.data.monitor

          this.$emit('did_edit_monitor', monitor)
          //

          Toast.success('修改成功')
          // this.selectRow(-1, null)
          this.form.pulse_frequency = ''
          this.form.breathing_rated = ''
          this.form.systolic_bp = ''
          this.form.diastolic_bp = ''
          this.form.blood_flow_volume = ''
          this.form.venous_pressure = ''
          this.form.arterial_pressure = ''
          this.form.transmembrane_pressure = ''
          this.form.ultrafiltration_rate = ''
          this.form.ultrafiltration_volume = ''
          this.form.sodium_concentration = ''
          this.form.dialysate_temperature = ''
          this.form.temperature = ''
          this.form.replacement_rate = ''
          this.form.displacement_quantity = ''
          this.form.ktv = ''
          this.form.blood_oxygen_saturation = ''
          this.form.symptom = ''
          this.form.dispose = ''
          this.form.result = ''
          this.form.conductivity = ''
          this.form.displacement_flow_quantity = ''
          this.form.heparin = ''
          this.form.dialysate_flow = ''
          this.form.urr = ''
          this.form.blood_sugar = ''

          this.form.creator = 0
          this.form.id = -1
          this.formPanel = false
          this.listPanel = true
          this.form.monitor_anticoagulant_value = ''
          this.form.monitor_anticoagulant = ''
          this.form.dehydration = ''
          this.form.heparin_amount = ''
          this.form.ultrafiltration_rate_one= ""
          this.form.heparin_one= ""

          this.form.monitor_systolic_blood_pressure_one = ""
          this.form.monitor_diastolic_blood_pressure_one = ""
          this.form.monitor_pulse_frequency_one = ""
          this.form.blood_flow_volume_one = ""
          this.form.venous_pressure_one = ""
          this.form.arterial_pressure_one =""
          this.form.transmembrane_pressure_one =""
          this.form.ultrafiltration_volume_one = ""
          this.form.sodium_concentration_one = ""
          this.form.dialysate_temperature_one = ""
          this.form.replacement_rate_one = ""
          this.form.displacement_quantity_one = ""
          this.form.ktv_one = ""
          this.form.urr_one = ""
          this.form.conductivity_one = ""
          this.form.displacement_flow_quantity_one = ""
          this.form.blood_oxygen_saturation_one = ""
          this.form.dialysate_flow_one = ""
          this.form.blood_sugar_one = ""
          this.form.monitor_temperature_one = ""
          this.form.pulse_frequency_one = ""
          this.form.blood_temperature_one= ""

          this.form.urea_monitoring_one = ""
          this.form.blood_thickness_one = ""
          this.form.blood_monitor_one = ""
          this.form.replacement_speed_one = ""
          this.form.dicarbonate_one = ""
          this.form.accumulated_blood_volume_one = ""


          this.symptomsArr = []
          this.disposeArr = []
          this.resultsArr = []
          this.show = false
        } else {
          this.loading = false
          Toast.fail(resp.msg)
          if(resp.code == 600000008){
              this.infor_visibility = true
           }
        }
      })
      .catch(error => {
        Toast.fail(error.toString())
      })
  },
  deleteForm () {
    if (this.currentIndex < 0 || this.currentRow == null) {
      Toast.fail('请先选择要删除的记录')
      return false
    }
    Dialog.confirm({
      title: '删除监测记录',
      message: '是否删除该监测记录'
    })
      .then(() => {
        let params = {
          record_id: this.currentRow.id,
          patient_id: this.patient.id,
          mode: '4',
          monitoring_date: this.currentRow.monitoring_date
        }

        if (
          this.$store.getters.user.admin.id != this.creator &&
                  this.creator != 0
        ) {
          params.mode = '5'
        }
        deleteMonitorRecord(params).then(rs => {
          var resp = rs.data
          if (resp.state == 1) {
            var recordId = resp.data.record_id
            this.$emit('did_delete_monitor', recordId)
            // this.result = []
            Toast.success('删除成功')
            // this.result = []
            this.allChecked = false
          } else {
            Toast.fail(resp.msg)
           if(resp.code == 600000008){
              this.allChecked = false
              this.infor_visibility = true

           }
          }
        })
      })
      .catch(() => {})
  },
  getLastRecordTody () {
    let params = {
      patient_id: this.patient.id
    }

    GetMonitorToday(params).then(rs => {
      var resp = rs.data.data
      this.today_last_monitor_record = resp.monitor
      var lastMonitorRecordList =  resp.lastMonitorRecordList
      // console.log("owowowo",lastMonitorRecordList)
      if(this.org_id == 10510){

        this.form.operate_time = Date.parse(new Date())
      }else{

        if(this.org_id!=10060 && this.org_id!=10735){
          this.form.operate_time = lastMonitorRecordList.operate_time ? (lastMonitorRecordList.operate_time + 3600) * 1000 : Date.parse(new Date())
        }
        if(this.org_id ==10060){
          this.form.operate_time = resp.monitor.operate_time ? (resp.monitor.operate_time + 3600) * 1000 : Date.parse(new Date())
        }
        //针对胶州少海医院
        if(this.org_id == 10735){
          this.form.operate_time = lastMonitorRecordList.operate_time ? (lastMonitorRecordList.operate_time + 1800) * 1000 : Date.parse(new Date())
        }
      }




      if(this.org_id == 9829){
        this.form.pulse_frequency = 80
      }else{
        this.form.pulse_frequency = '' // this.last_monitor_record.pulse_frequency;
      }
      this.form.systolic_bp = '' // this.last_monitor_record.systolic_blood_pressure;
      this.form.diastolic_bp = '' // this.last_monitor_record.diastolic_blood_pressure;
      this.form.blood_flow_volume = resp.monitor.blood_flow_volume ? resp.monitor.blood_flow_volume : ''
      if (this.template_id == 34|| this.org_id == 10735) {
        this.form.venous_pressure = resp.monitor.venous_pressure ? resp.monitor.venous_pressure : ''
      } else {
        this.form.venous_pressure = '' // this.last_monitor_record.venous_pressure;
      }
      if (this.org_id == 10387) {
        this.form.venous_pressure = resp.monitor.venous_pressure ? resp.monitor.venous_pressure : ''
      }
      if (this.org_id == 9671 || this.org_id == 9675 || this.org_id == 10340) {
        this.form.venous_pressure = 80
      }

      this.form.venous_pressure_type = resp.monitor.venous_pressure_type ? resp.monitor.venous_pressure_type : 1 // this.last_monitor_record.venous_pressure;
      if (this.template_id == 17 || this.template_id == 43 || this.org_id == 9671 || this.org_id == 9675) {
        this.form.arterial_pressure = '-100'
      }else if(this.org_id == 10340){
        this.form.arterial_pressure = '-'
      } else {
        this.form.arterial_pressure = resp.monitor.arterial_pressure ? resp.monitor.arterial_pressure : '' // this.last_monitor_record.arterial_pressure;
      }
      if (this.org_id == 10387) {
        this.form.arterial_pressure = resp.monitor.arterial_pressure ? resp.monitor.arterial_pressure : ''
      }

      if(this.org_id  == 10495){
        this.form.arterial_pressure = "-"
      }

      this.form.arterial_pressure_type = resp.monitor.arterial_pressure_type ? resp.monitor.arterial_pressure_type : 1
      if (this.template_id == 34 || this.org_id == 10735) {
        this.form.transmembrane_pressure = resp.monitor.transmembrane_pressure ? resp.monitor.transmembrane_pressure : ''
      } else if (this.org_id == 9671 || this.org_id == 9675 || this.org_id == 10340) {
        this.form.transmembrane_pressure = 60
      } else {
        this.form.transmembrane_pressure = ''
      }
      if (this.org_id == 10387) {
        this.form.transmembrane_pressure = resp.monitor.transmembrane_pressure ? resp.monitor.transmembrane_pressure : ''
      }

      // this.last_monitor_record.transmembrane_pressure;
      this.form.transmembrane_pressure_type = resp.monitor.transmembrane_pressure_type ? resp.monitor.transmembrane_pressure_type : 1
      this.form.id = -1

      this.form.ultrafiltration_rate = resp.monitor.ultrafiltration_rate ? resp.monitor.ultrafiltration_rate : ''
      this.form.ultrafiltration_volume = resp.monitor.ultrafiltration_volume ? resp.monitor.ultrafiltration_volume : ''
      this.form.sodium_concentration = resp.monitor.sodium_concentration ? resp.monitor.sodium_concentration : ''
      this.form.dialysate_temperature = resp.monitor.dialysate_temperature ? resp.monitor.dialysate_temperature : ''
      this.form.replacement_rate = resp.monitor.replacement_rate ? resp.monitor.replacement_rate : ''
      this.form.heparin = resp.monitor.heparin ? resp.monitor.heparin : ''
      this.form.dialysate_flow = resp.monitor.dialysate_flow ? resp.monitor.dialysate_flow : ''
      this.form.displacement_quantity = resp.monitor.displacement_quantity ? resp.monitor.displacement_quantity : '' // this.last_monitor_record.displacement_quantity;
      this.form.conductivity = ''
      this.form.displacement_flow_quantity = resp.monitor.displacement_flow_quantity ? resp.monitor.displacement_flow_quantity : ''
      this.form.ktv = resp.monitor.ktv ? resp.monitor.ktv : '' // this.last_monitor_record.ktv;
      this.form.symptom = '' // this.last_monitor_record.symptom;
      this.form.dispose = '' // this.last_monitor_record.dispose;
      this.form.result = '' // this.last_monitor_record.result;

      // this.form.ultrafiltration_rate_one= ""
      this.form.heparin_one= ""
      this.form.monitor_systolic_blood_pressure_one = ""
      this.form.monitor_diastolic_blood_pressure_one = ""
      this.form.monitor_pulse_frequency_one = ""
      this.form.blood_flow_volume_one = ""
      this.form.venous_pressure_one = ""
      this.form.arterial_pressure_one =""
      this.form.transmembrane_pressure_one =""
      // this.form.ultrafiltration_volume_one = ""
      this.form.sodium_concentration_one = ""
      this.form.dialysate_temperature_one = ""
      this.form.replacement_rate_one = ""
      this.form.displacement_quantity_one = ""
      this.form.ktv_one = ""
      this.form.urr_one = ""
      this.form.conductivity_one = ""
      this.form.displacement_flow_quantity_one = ""
      this.form.blood_oxygen_saturation_one = ""
      this.form.dialysate_flow_one = ""
      this.form.blood_sugar_one = ""
      this.form.monitor_temperature_one = ""
      this.form.pulse_frequency_one = ""
      this.form.blood_temperature_one= ""
      this.form.urea_monitoring_one = ""
      this.form.blood_thickness_one = ""
      this.form.blood_monitor_one = ""
      this.form.replacement_speed_one = ""
      this.form.dicarbonate_one = ""
      this.form.accumulated_blood_volume_one = ""



      if (this.org_id == 9675 || this.org_id == 10340) {
        this.form.blood_oxygen_saturation = resp.monitor.blood_oxygen_saturation ? resp.monitor.blood_oxygen_saturation : '/'
      }else if(this.org_id == 10447 ||this.org_id == 9671){
        this.form.blood_oxygen_saturation = "99"
      } else {
        this.form.blood_oxygen_saturation = resp.monitor.blood_oxygen_saturation ? resp.monitor.blood_oxygen_saturation : ''
      }
      if (this.org_id == 9671 || this.org_id == 9675 || this.org_id == 10340 || this.org_id == 10447) {
        this.form.breathing_rated = '20'
      } else {
        this.form.breathing_rated = resp.monitor.breathing_rate ? resp.monitor.breathing_rate : ''
      }

      if (this.org_id == 9671 || this.org_id == 9675 || this.org_id == 10340 || this.org_id == 9829 || this.org_id ==10517) {
        if(this.form.temperature == 0 || this.form.temperature == ""){
          this.form.temperature = resp.monitor.temperature ? resp.monitor.temperature : '36.5'
        }

      } else {
        this.form.temperature = resp.monitor.temperature ? resp.monitor.temperature : ''
      }

      this.form.urr = resp.monitor.urr ? resp.monitor.urr : ''

      if (this.org_id == 9671 || this.org_id == 9675 || this.org_id == 10340 || this.org_id == 10447) {
        if(this.form.conductivity == 0 || this.form.conductivity == ""){
          this.form.conductivity = resp.monitor.conductivity? resp.monitor.conductivity : ''
        }

      } else {
        this.form.conductivity = resp.monitor.conductivity ? resp.monitor.conductivity : ''
      }
      this.form.blood_pressure_monitoring_site = resp.monitor.blood_pressure_monitoring_site ? resp.monitor.blood_pressure_monitoring_site : ''
      this.form.accumulated_blood_volume = resp.monitor.accumulated_blood_volume ? resp.monitor.accumulated_blood_volume : ''
      this.form.heparin_amount = resp.monitor.heparin_amount ? resp.monitor.heparin_amount : ''
      this.form.dehydration = resp.monitor.dehydration ? resp.monitor.dehydration : ''
      if (this.org_id == 9671 || this.org_id == 9675 || this.org_id == 10340 || this.org_id == 10447) {
        if(this.form.breathing_rated == 0 || this.form.breathing_rated == ""){
            this.form.breathing_rated = '20'
        }

      }
      this.form.dicarbonate = resp.monitor.dicarbonate
      this.form.replacement_speed = resp.monitor.replacement_speed

      if(this.org_id == 10375){
        this.form.conductivity = 13.8
        this.form.dialysate_temperature = 37
        this.form.dialysate_flow = 500
        this.form.blood_flow_volume=200
        this.form.breathing_rated = "18"
        this.form.sodium_concentration = 140
      }
      if(this.org_id == 10517){
        this.form.sodium_concentration = 138
        this.form.dialysate_temperature =36.5
      }

      //孝昌
      if(this.org_id == 10693){
        this.form.blood_flow_volume_one = resp.monitor.blood_flow_volume_one? resp.monitor.blood_flow_volume_one:""
      }


      //超滤率 超滤量自动计算
      if(this.org_id == 10597 || this.org_id ==10599 || this.org_id ==10587 || this.org_id ==10571 || this.org_id==10579 || this.org_id ==10600 || this.org_id ==10612 || this.org_id ==10617 || this.org_id ==10580 || this.org_id ==10375 || this.org_id ==10629 || this.org_id ==10480  || this.org_id ==10414 || this.org_id ==10679 || this.org_id ==10693 || this.org_id == 10694 || this.org_id == 10697 || this.org_id ==10702 || this.org_id ==10723 || this.org_id == 10721){

        if(lastMonitorRecordList!=null){
          if(this.org_id != 10721){
            this.form.ultrafiltration_rate = lastMonitorRecordList.ultrafiltration_rate?lastMonitorRecordList.ultrafiltration_rate:""
          }else{
            this.form.ultrafiltration_rate = lastMonitorRecordList.ultrafiltration_rate?lastMonitorRecordList.ultrafiltration_rate:this.today_last_monitor_record.ultrafiltration_rate

          }
         
          console.log("haaaaaaaaaaaaaaaa",this.form.ultrafiltration_rate)
          console.log("bbbbbbbbbbbbbbbbbbbbb",this.today_last_monitor_record.ultrafiltration_rate)
          this.form.replacement_rate = lastMonitorRecordList.replacement_rate?lastMonitorRecordList.replacement_rate:""
          this.form.transmembrane_pressure = lastMonitorRecordList.transmembrane_pressure?lastMonitorRecordList.transmembrane_pressure:""

          this.form.venous_pressure = lastMonitorRecordList.venous_pressure?lastMonitorRecordList.venous_pressure:""

          this.form.displacement_quantity = lastMonitorRecordList.displacement_quantity + lastMonitorRecordList.replacement_rate
         
          if(this.org_id == 10587){
            this.form.displacement_quantity = (lastMonitorRecordList.displacement_quantity + (lastMonitorRecordList.replacement_rate *60) ).toFixed(0)
          }

          if(this.org_id == 10375){
            this.form.displacement_quantity = (lastMonitorRecordList.displacement_quantity + lastMonitorRecordList.replacement_rate).toFixed(1)
          }

          if(this.org_id == 10414){
            this.form.displacement_quantity = (lastMonitorRecordList.displacement_quantity + lastMonitorRecordList.replacement_rate).toFixed(1)
          }



          if(this.org_id == 10480){
             this.form.displacement_quantity = (lastMonitorRecordList.displacement_quantity + lastMonitorRecordList.replacement_rate).toFixed(1)
           }

           if(this.org_id == 10702){
            this.form.displacement_quantity = (lastMonitorRecordList.displacement_quantity + this.monitorRecords[1].displacement_quantity).toFixed(1)
          }

          if(this.org_id == 10694){
            this.form.ultrafiltration_volume = this.form.ultrafiltration_volume.toFixed(0)
          }

          if(this.org_id == 10597){
            console.log("this.form.replacement_rate",this.form.ultrafiltration_rate)
            console.log("this.form.ultrafiltration_volume",this.form.ultrafiltration_volume)
            this.form.ultrafiltration_volume = (this.form.ultrafiltration_rate + lastMonitorRecordList.ultrafiltration_volume).toFixed(0)

          }else{
            this.form.ultrafiltration_volume = (this.form.ultrafiltration_rate + lastMonitorRecordList.ultrafiltration_volume).toFixed(0)
          }

          if(this.org_id == 10721 || this.org_id == 10752){

            this.form.displacement_quantity =  resp.monitor.displacement_quantity

            this.form.ultrafiltration_volume = resp.monitor.ultrafiltration_volume
          }

        
          

        }

      

      }

      if(this.org_id == 10693){
         if(lastMonitorRecordList!=null){
            this.form.ultrafiltration_rate_one = lastMonitorRecordList.ultrafiltration_rate_one?lastMonitorRecordList.ultrafiltration_rate_one:"0"
         }
         console.log("超滤率",lastMonitorRecordList.ultrafiltration_rate_one)
         console.log("超滤量",lastMonitorRecordList.ultrafiltration_volume_one)
         if(lastMonitorRecordList.ultrafiltration_volume_one == "NaN" || lastMonitorRecordList.ultrafiltration_volume_one == ""){
           lastMonitorRecordList.ultrafiltration_volume_one = 0
         }
         this.form.ultrafiltration_volume_one = parseFloat(lastMonitorRecordList.ultrafiltration_rate_one) + parseFloat(lastMonitorRecordList.ultrafiltration_volume_one)
         console.log("this.form.ultrafiltration_volume_one",this.form.ultrafiltration_volume_one)
         if(this.form.ultrafiltration_volume_one>0){
          this.form.ultrafiltration_volume_one = this.form.ultrafiltration_volume_one.toFixed(0)
         }

        //  this.form.ultrafiltration_volume = parseFloat(lastMonitorRecordList.ultrafiltration_rate_one)  +parseFloat(lastMonitorRecordList.ultrafiltration_volume)
        //  console.log(parseFloat(lastMonitorRecordList.ultrafiltration_rate_one))
        //  console.log(parseFloat(lastMonitorRecordList.ultrafiltration_volume))
        //  console.log("haaaaaaaaaaaaaaaaaa", this.form.ultrafiltration_volume )
      }

      if(this.org_id == 10702){
        this.form.venous_pressure = ""
        this.form.transmembrane_pressure = ""
      }
      
      if(this.org_id == 10745){
        this.form.venous_pressure = lastMonitorRecordList.venous_pressure?lastMonitorRecordList.venous_pressure:""
        this.form.transmembrane_pressure = lastMonitorRecordList.transmembrane_pressure?lastMonitorRecordList.transmembrane_pressure:""
      }

      if(this.org_id ==10693){
         this.form.conductivity_one = lastMonitorRecordList.conductivity_one?lastMonitorRecordList.conductivity_one:""
      }

      if(this.org_id == 10644){
        
          this.form.displacement_quantity = (this.form.displacement_quantity/1000).toFixed(2)
       }

       if(this.org_id == 10721){
         this.form.venous_pressure = ""
         this.form.transmembrane_pressure = ""
       }

       if(this.org_id == 10752){
          this.form.replacement_rate = lastMonitorRecordList.replacement_rate
        }
        


      // this.form.monitor_anticoagulant = resp.monitor.monitor_anticoagulant?resp.monitor.monitor_anticoagulant:''
      // this.form.monitor_anticoagulant_value = resp.monitor.monitor_anticoagulant_value?resp.monitor.monitor_anticoagulant_value:''
    })
  },
  openTable () {
    this.tableShow = true
  },
  setRecords (records) {
    this.monitorRecords = records
  },
  chooseSymptoms (val) {
    this.form.symptom += val + ' '
    this.symptomsShow = false
  },
  chooseDispose (val) {
    this.form.dispose += val + ' '
    this.disposeShow = false
  },
  chooseResults (val) {
    this.form.result += val + ' '
    this.resultsShow = false
  },
  menuComfirmSymptoms: function (val) {

    this.form.symptom = val.join(' ')
  },
  changeBloodPressure (val) {
    this.form.blood_pressure_monitoring_site = val.join(' ')
  },
  menuComfirmDispose (val) {
    this.form.dispose = val.join(' ')
  },
  menuComfirmResults (val) {
    this.form.result = val.join(' ')
  },
  back () {
    this.show = false
  },
  getPermission () {
    request
      .get('/m/api/permission/get', {
        params: {
          create_url: '/m/api/monitor/add?mode=1',
          modify_url: '/m/api/monitor/edit?mode=2',
          modify_other_url: '/m/api/monitor/edit?mode=3',
          del_url: '/m/api/monitor/delete?mode=4',
          del_other_url: '/m/api/monitor/delete?mode=5',
          module: 7
        }
      })
      .then(res => {

        if (res.data.state == 0) {
          this.hasPermission = false
        } else if (res.data.state == 1) {
          this.is_has_create = res.data.data.is_has_create
          this.is_has_modify = res.data.data.is_has_modify
          this.is_has_modify_other = res.data.data.is_has_modify_other
          this.is_has_del = res.data.data.is_has_del
          this.is_has_del_other = res.data.data.is_has_del_other
        }
      })
  },
  venousPressureChangeThree () {
    if (this.form.arterial_pressure_type == 1) {
      this.form.arterial_pressure_type = 2
    } else {
      this.form.arterial_pressure_type = 1
    }
  },
  venousPressureChangeOne () {
    if (this.form.venous_pressure_type == 1) {
      this.form.venous_pressure_type = 2
    } else {
      this.form.venous_pressure_type = 1
    }
  },
  venousPressureChangeTwo () {
    if (this.form.transmembrane_pressure_type == 1) {
      this.form.transmembrane_pressure_type = 2
    } else {
      this.form.transmembrane_pressure_type = 1
    }
  },
  getBloodPressure (id) {
    var name = ''
    for (let i = 0; i < this.bloodPressureMmonitoringSite.length; i++) {
      if (id == this.bloodPressureMmonitoringSite[i].id) {
        name = this.bloodPressureMmonitoringSite[i].name
      }
    }
    return name
  },
  getComplication (id) {
    var name = ''
    for (let i = 0; i < this.complicationList.length; i++) {
      if (id == this.complicationList[i].id) {
        name = this.complicationList[i].name
      }
    }
    return name
  },
  getModeName (id) {
    var name = ''
    if (id == 1) {
      name = 'HD'
    }
    if (id == 2) {
      name = 'HDF'
    }
    if (id == 3) {
      name = 'HD+HP'
    }
    if (id == 4) {
      name = 'HP'
    }
    if (id == 5) {
      name = 'HF'
    }
    if (id == 6) {
      name = 'SCUF'
    }
    if (id == 7) {
      name = 'IUF'
    }
    if (id == 8) {
      name = 'HFHD'
    }
    if (id == 9) {
      name = 'HFHD+HP'
    }
    if (id == 10) {
      name = 'PHF'
    }
    if (id == 11) {
      name = 'HFR'
    }
    if (id == 12) {
      name = 'HDF+HP'
    }
    if (id == 13) {
      name = 'CRRT'
    }
    if (id == 14) {
      name = '腹水回输'
    }
    if (id == 19) {
      name = 'IUF+HD'
    }
    if (id == 20) {
      name = 'UF'
    }
    if (id == 21) {
      name = 'HD+'
    }
    if (id == 22) {
      name = '血浆胆红素吸附+HDF'
    }
    if (id == 23) {
      name = '血浆胆红素吸附'
    }
    if (id == 24) {
      name = 'I-HDF'
    }
    if (id == 25) {
      name = 'HD高通'
    }
    if (id == 26) {
      name = 'CVVH'
    }
    if (id == 27) {
      name = 'CVVHD'
    }
    if (id == 28) {
      name = 'CVVHDF'
    }
    if (id == 29) {
      name = 'PE'
    }
    if (id == 30) {
      name = '血浆胆红素吸附+HP'
    }
    if (id == 31) {
      name = 'HPD'
    }
    if (id == 32) {
      name = 'HDP'
    }

    return name
  },

 menuComfirmFour:function(start_time,remark){
     var params = {
       patient_id:this.$route.query.patient_id,
       record_date:this.$route.query.date,
       start_time:start_time,
       module:7,
       remark:remark,
     }

    saveMobileInformation(params).then(response=>{
      if(response.data.state == 1){
         this.infor_visibility = false
         Toast.success('申请成功')
      }
    })
  },
  menuCancleFour:function(){
   this.infor_visibility = false

  },
}

}
</script>

<style lang="scss" scoped>
.monitoring{
  display: flex;
  flex-direction: column;
  height: 100%;
  >:first-child{
      flex: 1;
      overflow-y: auto;
  }
  .halfWidth{
      width: 100%;
  }
  .allWidth{
      width: 100%;
  }
  .van-cell__title{
      display: flex;
      flex-wrap: wrap;
  }
  .preserveBox{
      height: 2.5rem;
      display: flex;
      justify-content: space-between;
      // padding: 0 .625rem;
      padding: 0 3.75rem;
      align-items: center;
      font-size: 1rem;
      >span{
          height: 1.875rem;
          line-height: 1.875rem;
          padding: 0 .875rem;
          font-size: .875rem;
          border-radius: 5px;
          border: 1px solid #409eff;
          color: #409eff;
      }
      .forbid {
          color: #c6cdd2;
          border: 1px solid #c6cdd2;
      }
  }
  .mint-datetime{
      z-index: 4010 !important;
  }
  >>>.v-modal{
      z-index: 4009 !important;
  }
  .mointoringPopup{
      top: 0;
      transform: translate3d(0, 0, 0);
      border-radius: 0;
  }

  .van-radio-group{
      display: flex;
      flex-wrap: wrap;
      .van-radio{
          width: 50%;
          margin-bottom: .625rem;
      }
  }

  .nodataTxt{
      position: fixed;
      left: 50%;
      top: 50%;
      transform: translate(-50%,-50%);
      font-size: .875rem;
      color:#999;
  }
  .row-class-active > td {
      background: #badcff !important;
  }
  .newMonitTable{
      font-size: .875rem !important;
      tr th{
          height: 2.25rem !important;
      }
      tr td{
          padding: .5rem 0;
      }

  }
  @media only screen and (min-width: 415px) and (max-width: 767px){
      .newMonitTable {
          width: 2000px !important;
      }
  }
  @media only screen and (min-width: 768px) and (max-width: 1024px){
      .newMonitTable {
          width: 3200px !important;
      }
  }
}
.newMointoring{
  height: 100%;
  display: flex;
  flex-direction: column;
  // >:last-child{
  //     flex: 1;
  //     overflow-y: auto;
  // }
  .addBox{
      height: 3.125rem;
      display: flex;
      justify-content: space-between;
      padding: 0 1rem;
      align-items: center;
      font-size: 1rem;
      >:first-child{
          text-align: center;
          height: 2.5rem;
          width: 100%;
          line-height: 2.5rem;
          background: #409eff;
          color:#fff;
          border-radius: 4px;
      }
  }
  .van-checkbox-group{
      display: flex;
      flex-wrap: wrap;
      .van-checkbox{
          width: 50%;
          margin-bottom: .625rem;
      }
  }
}
.newMointoringTitle{
  height: 3.125rem;
  display: flex;
  justify-content: space-between;
  padding: 0 .875rem;
  align-items: center;
  font-size: 1rem;
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
}
.computerTime{
  height: 1.875rem;
  line-height: 1.875rem;
  font-size: .875rem;
  padding: 0 1rem;
  color: #323233;
}
.paddingLeft{
  padding-left: 1.6875rem;
  width: 100%;
}
.bgColor{
  color: #409eff;
}
.datetimePicker{
  // z-index: 4012 !important;
  .picker-item{
      font-size: .875rem !important;
      height: 44px;
      line-height: 44px;

  }
  .mint-datetime-action{
      font-size: .9375rem !important;
  }

}
.deleteColor{
  color: #f56c6c !important;
  border: 1px solid #f56c6c !important;

}
.tablePopup{
  font-size: .875rem;
}

</style>

<style lang="scss">
.monitoring{
  .van-field__label{
      // width: 9.375rem;
      width: initial;
  }

}
.newMointoring{
  .van-field__label{
      width: initial;
  }
  .van-radio-group{
      display: flex;
      flex-wrap: wrap;
      font-size: .875rem;
      .van-radio{
          width: 50%;
          margin-bottom: .625rem;
      }
  }
  .changeBtn{
      height: 2rem;
      font-size: .875rem !important;
      padding: 0 .625rem;
  }
  .van-field__control--right{
      padding-right: 1.375rem !important;
  }
  .v-modal{
      z-index: 4009 !important;
  }
  .startTimePicker{
      z-index: 5000 !important;
  }
  .datetimePicker{
      // z-index: 4012 !important;
      .picker-item{
          font-size: .875rem !important;
          height: 44px;
          line-height: 44px;

      }
      .mint-datetime-action{
          font-size: .9375rem !important;
      }

  }
  .bgField{
      .van-field__control{
          border:1px solid #ccc;
          background: #f6f6f6;
          border-radius: 4px;
          min-height: 6.25rem !important;
      }
      ::placeholder{  //通过这个设置
          color: #999 !important;
      }
  }
  .newListBoxPopup{
      width: 80%;
      height: 80%;
      left: 50% !important;
      top: 50% !important;
      transform: translate3d(-50%,-50%,0) !important;
      overflow-y: auto;
      border-radius: .625rem;
      z-index: 9999 !important;
  }
  .listBox{
      >div{
          padding: 1rem .625rem;
          border-bottom: 1px solid #e5e5e5;
          font-size: .875rem;
          color:#323233;
          text-align: left;
      }
  }
  .van-dialog.open_tips{
z-index: 9999 !important;
box-shadow: 3px 4px 6px 0px #aeabab;
}
.van-overlay{
z-index: 9999 !important;
}
}

</style>
<style scoped>
.van-overflow-hidden >>> .van-dialog.open_tips{
z-index: 9999 !important;
box-shadow: 3px 4px 6px 0px #aeabab;
}
</style>
