<template>
  <div class="dialysisPrescription">
    <div>
      <div class="warnTxt" v-if="showTxt != ''">
        {{ showTxt }}
      </div>
      <van-collapse v-model="activeNames" accordion @change="showSubMenu">
        <van-collapse-item v-if="isShow('透析模式')" name="1">
          <template #title>
              <div><span v-if="isShow_title('透析模式')" class="warn_tip">*</span>透析模式</div>
          </template>
          <template #value>
            <div>{{ GetModeByModeId(dialysisPrescription.mode_id) }}</div>
          </template>
          <van-radio-group v-model="dialysisPrescription.mode_id">
            <van-radio
              :name="item.id"
              v-for="(item, index) in modeOption"
              :key="index"
              @click="menuComfirm(item)"
              >{{ item.name }}</van-radio
            >
          </van-radio-group>
        </van-collapse-item>
        <van-field
          v-model="timeValue"
          readonly
          @click="openPicker"
          v-if="isShow('透析时长')"
          label="透析时长"
          input-align="right"
          :required="isShow_title('透析时长')"
        />
        <van-field
          v-model="dialysisPrescription.blood_flow_volume"
          @focus="inputFocus"
          v-if="isShow('血流量')"
          label="血流量(ml/min)"
          type="number"
          input-align="right"
          :required="isShow_title('血流量')"
        />
        <van-field
          v-model="dialysisPrescription.pre_impulse"
          @focus="inputFocus"
          v-if="isShow('预冲量')"
          type="number"
          input-align="right"
          :required="isShow_title('预冲量')"
        >
          <template #label>
            <span
              v-if="
                template_id != 9 &&
                template_id != 17 &&
                template_id != 20 &&
                template_id != 21 &&
                template_id != 22 &&
                template_id != 23 &&
                $store.getters.user.template_info.org_id != 10345
              "
              >预冲量(L)</span
            >
            <span
              v-if="
                template_id == 9 ||
                template_id == 17 ||
                template_id == 20 ||
                template_id == 21 ||
                template_id == 22 ||
                template_id == 23 ||
                $store.getters.user.template_info.org_id == 10345
              "
              >预冲量(ml)</span
            >
          </template>
        </van-field>
        <van-cell style="background: pink">
          <span v-if="$store.getters.user.template_info.org_id !=10702">透前体重：{{predialysis.weight_before ? predialysis.weight_before : "--"}}Kg</span>
          <span v-if="$store.getters.user.template_info.org_id ==10702">透前体重：{{(predialysis.weight_before-predialysis.additional_weight).toFixed(2) ?(predialysis.weight_before-predialysis.additional_weight).toFixed(2) : "--"}}Kg</span>
          <span
            >干体重：{{
              predialysis.dry_weight ? predialysis.dry_weight : "--"
            }}Kg</span
          >
          <span v-if="$store.getters.user.template_info.org_id !=10599">衣物重：{{
              predialysis.additional_weight
                ? predialysis.additional_weight
                : "--"
            }}Kg</span><br/>
          <span v-if="last_record!=undefined && $store.getters.user.template_info.org_id !=10599  && $store.getters.user.template_info.org_id !=10702">上次透后体重：{{last_record.weight_after?last_record.weight_after: "--"}}Kg</span></br>
          <span v-if="last_record!=undefined && $store.getters.user.template_info.org_id ==10702">上次透后体重：{{(last_record.weight_after-last_record.additional_weight).toFixed(2)?(last_record.weight_after-last_record.additional_weight).toFixed(2): "--"}}Kg</span></br>

          <span v-if="$store.getters.user.template_info.org_id == 10721">
            <span v-if="predialysis!=null && last_record!=null">
                体重增长：
                {{predialysis&&last_record&&((predialysis.weight_before - predialysis.additional_weight)-(last_record.weight_after-last_record.additional_weight)).toFixed(2)?((predialysis.weight_before - predialysis.additional_weight)-(last_record.weight_after-last_record.additional_weight)).toFixed(2):"" }} kg
              </span>
          </span><br/>
             
          <span v-if="$store.getters.user.template_info.org_id == 10551 || $store.getters.user.template_info.org_id == 10612 || $store.getters.user.template_info.org_id == 10622 &&predialysis!=undefined&&predialysis.weight_before>0 &&dialysisPrescription!=undefined && dialysisPrescription.target_ultrafiltration>0">目标脱水量百分比:{{ (((dialysisPrescription.target_ultrafiltration)/predialysis.dry_weight)*100).toFixed(2)  }}%</span>
          <span v-if="$store.getters.user.template_info.org_id == 10249 || $store.getters.user.template_info.org_id == 10622   &&predialysis!=undefined&&predialysis.weight_before>0 &&dialysisPrescription!=undefined && dialysisPrescription.target_ultrafiltration>0">目标脱水量百分比:{{ (((dialysisPrescription.target_ultrafiltration/1000)/predialysis.dry_weight)*100).toFixed(2)  }}%</span>
          <span v-if="($store.getters.user.template_info.org_id == 10449 || $store.getters.user.template_info.org_id == 10721) &&predialysis!=undefined&&predialysis.weight_before>0 &&dialysisPrescription!=undefined">4小时超滤量上限（5%）:{{ (predialysis.dry_weight*0.05).toFixed(2)  }}kg</span>
          <span v-if="$store.getters.user.template_info.org_id ==10599 &&predialysis!=undefined">心率:{{predialysis.pulse_frequency  }}次/分</span>&nbsp;
          <span v-if="$store.getters.user.template_info.org_id ==10599 &&predialysis!=undefined">体温:{{predialysis.temperature  }}℃</span>&nbsp;
          <span v-if="($store.getters.user.template_info.org_id ==10599 || $store.getters.user.template_info.org_id ==10440 ||  $store.getters.user.template_info.org_id ==10721 || $store.getters.user.template_info.org_id ==0) &&predialysis!=undefined">血压:{{predialysis.systolic_blood_pressure  }}/{{ predialysis.diastolic_blood_pressure  }}mmHg</span>
        </van-cell>
        <van-field
          v-model="dialysisPrescription.target_ultrafiltration"
          @focus="inputFocus"
          v-if="isShow('目标超滤量')"
          type="number"
          input-align="right"
          :required="isShow_title('目标超滤量')"
        >
          <template #label>
            <span
              v-if="
                ($store.getters.user.template_info.template_id != 9 &&
                $store.getters.user.template_info.template_id != 17 &&
                $store.getters.user.template_info.template_id != 20 &&
                $store.getters.user.template_info.template_id != 21 &&
                $store.getters.user.template_info.template_id != 22 &&
                $store.getters.user.template_info.template_id != 23 &&
                $store.getters.user.template_info.template_id != 24 &&
                $store.getters.user.template_info.template_id != 26 &&
                $store.getters.user.template_info.template_id != 28 &&
                $store.getters.user.template_info.template_id != 27 &&
                $store.getters.user.template_info.template_id != 29 &&
                $store.getters.user.template_info.template_id != 30 &&
                $store.getters.user.template_info.template_id != 32 &&
                $store.getters.user.template_info.template_id != 38 &&
                $store.getters.user.template_info.template_id != 40 &&
                $store.getters.user.template_info.template_id != 43 &&
                $store.getters.user.template_info.template_id != 45 &&
                $store.getters.user.template_info.template_id != 46 &&
                $store.getters.user.template_info.template_id != 48 &&
                $store.getters.user.template_info.template_id != 53 &&
                $store.getters.user.template_info.template_id != 56 &&
                $store.getters.user.template_info.org_id != 9555 &&
                $store.getters.user.template_info.org_id != 10345 &&
                $store.getters.user.template_info.org_id != 10395 &&
                $store.getters.user.template_info.org_id != 10340 &&
                $store.getters.user.template_info.template_id != 60 &&
                $store.getters.user.template_info.org_id != 10430 &&
                $store.getters.user.template_info.org_id != 10432 &&
                $store.getters.user.template_info.org_id!=10441 &&
                $store.getters.user.template_info.org_id!=10445 &&
                $store.getters.user.template_info.org_id!=9829 &&
                $store.getters.user.template_info.org_id!=10440 &&
                $store.getters.user.template_info.org_id!=10469 &&
                $store.getters.user.template_info.org_id!=10460 &&
                $store.getters.user.template_info.org_id!=10644 &&
                $store.getters.user.template_info.org_id!=10667 &&
                $store.getters.user.template_info.org_id!=10723 &&
                $store.getters.user.template_info.org_id!=10727 &&
                $store.getters.user.template_info.org_id!=10731 &&
                $store.getters.user.template_info.org_id!=10751)||
                $store.getters.user.template_info.org_id==10633
              "
              >目标超滤量(L)</span
            >
            <span
              v-if="
                ($store.getters.user.template_info.template_id == 9 ||
                $store.getters.user.template_info.template_id == 17 ||
                $store.getters.user.template_info.template_id == 20 ||
                $store.getters.user.template_info.template_id == 21 ||
                $store.getters.user.template_info.template_id == 22 ||
                $store.getters.user.template_info.template_id == 23 ||
                $store.getters.user.template_info.template_id == 24 ||
                $store.getters.user.template_info.template_id == 26 ||
                $store.getters.user.template_info.template_id == 28 ||
                $store.getters.user.template_info.template_id == 27 ||
                $store.getters.user.template_info.template_id == 29 ||
                $store.getters.user.template_info.template_id == 30 ||
                $store.getters.user.template_info.template_id == 32 ||
                $store.getters.user.template_info.template_id == 38 ||
                $store.getters.user.template_info.template_id == 40 ||
                $store.getters.user.template_info.template_id == 43 ||
                $store.getters.user.template_info.template_id == 45 ||
                $store.getters.user.template_info.template_id == 46 ||
                $store.getters.user.template_info.template_id == 48 ||
                $store.getters.user.template_info.template_id == 53 ||
                $store.getters.user.template_info.template_id == 56 ||
                $store.getters.user.template_info.org_id == 9555 ||
                $store.getters.user.template_info.org_id == 10345 ||
                $store.getters.user.template_info.org_id == 10395 ||
                $store.getters.user.template_info.org_id == 10340 ||
                $store.getters.user.template_info.template_id == 60 ||
                $store.getters.user.template_info.org_id == 10430 ||
                $store.getters.user.template_info.org_id == 10432 ||
                $store.getters.user.template_info.org_id ==10441 ||
                $store.getters.user.template_info.org_id ==10445 ||
                $store.getters.user.template_info.org_id ==9829 ||
                $store.getters.user.template_info.org_id ==10440 ||
                $store.getters.user.template_info.org_id == 10469 ||
                $store.getters.user.template_info.org_id == 10460 ||
                $store.getters.user.template_info.org_id == 10644 ||
                $store.getters.user.template_info.org_id == 10667 ||
                $store.getters.user.template_info.org_id == 10723 ||
                $store.getters.user.template_info.org_id == 10727 ||
                $store.getters.user.template_info.org_id == 10731 ||
                $store.getters.user.template_info.org_id == 10751) &&
                $store.getters.user.template_info.org_id != 10633
              "
              >目标超滤量(ml)</span
            >
          </template>
        </van-field>
        <van-field v-model="dialysisPrescription.prescription_water" @focus="inputFocus" v-if="isShow('处方脱水量')" type="number" input-align="right">
            <template #label>
                <span v-if=" $store.getters.user.template_info.org_id!=10597 && $store.getters.user.template_info.org_id!=10612 && $store.getters.user.template_info.org_id!=10598 && $store.getters.user.template_info.org_id!=10679 && $store.getters.user.template_info.org_id!=10677 && $store.getters.user.template_info.org_id!=10622&& $store.getters.user.template_info.org_id!=10702 && $store.getters.user.template_info.org_id!=10635 && $store.getters.user.template_info.org_id!=10721 && $store.getters.user.template_info.org_id!=10740 && $store.getters.user.template_info.org_id!=10742 && $store.getters.user.template_info.org_id!=10745 && $store.getters.user.template_info.org_id!=10752&& $store.getters.user.template_info.org_id!=10757">处方脱水量(ml)</span>
                <span  v-if=" $store.getters.user.template_info.org_id==10597 ||  $store.getters.user.template_info.org_id==10612  ||  $store.getters.user.template_info.org_id==10598 ||$store.getters.user.template_info.org_id==10679 ||$store.getters.user.template_info.org_id==10677 || $store.getters.user.template_info.org_id==10622  || $store.getters.user.template_info.org_id==10702 || $store.getters.user.template_info.org_id==10635 || $store.getters.user.template_info.org_id==10721 || $store.getters.user.template_info.org_id==10740|| $store.getters.user.template_info.org_id==10742 || $store.getters.user.template_info.org_id==10745 || $store.getters.user.template_info.org_id==10752 || $store.getters.user.template_info.org_id==10757">处方脱水量(L)</span>
            </template>
         </van-field>

        <van-collapse-item
          v-if="isShow('是否单超脱水')"
          title="是否单超脱水"
          name="52"
        >
        <template slot="title">
          <div><span v-if="isShow_title('是否单超脱水')" class="warn_tip">*</span>是否单超脱水</div>
        </template>
          <template #value>
            <div>{{ dialysisPrescription.is_water }}</div>
          </template>
          <van-radio-group
            v-model="dialysisPrescription.is_water"
            @change="radioChange"
          >
            <van-radio name="请选择" key="-2">请选择</van-radio>
            <van-radio
              :name="item.name"
              v-for="(item, index) in waterList"
              :key="index"
              >{{ item.name }}</van-radio
            >
          </van-radio-group>
        </van-collapse-item>

        <van-collapse-item
          v-if="isShow('是否先超脱水')"
          title="是否先超脱水"
          name="52"
        >
        <template slot="title">
          <div><span v-if="isShow_title('是否先超脱水')" class="warn_tip">*</span>是否先超脱水</div>
        </template>
          <template #value>
            <div>{{ dialysisPrescription.first_super }}</div>
          </template>
          <van-radio-group
            v-model="dialysisPrescription.first_super"
            @change="radioChange"
          >
            <van-radio name="请选择" key="-2">请选择</van-radio>
            <van-radio
              :name="item.name"
              v-for="(item, index) in waterListOne"
              :key="index"
              >{{ item.name }}</van-radio
            >
          </van-radio-group>
        </van-collapse-item>


        <van-collapse-item
          v-if="isShow('是否序惯脱水')"
          title="是否序惯脱水"
          name="52"
        >
        <template slot="title">
          <div><span v-if="isShow_title('是否序惯脱水')" class="warn_tip">*</span>是否序惯脱水</div>
        </template>
          <template #value>
            <div>{{ dialysisPrescription.is_sequential }}</div>
          </template>
          <van-radio-group
            v-model="dialysisPrescription.is_sequential"
            @change="radioChange"
          >
            <van-radio name="请选择" key="-2">请选择</van-radio>
            <van-radio
              :name="item.name"
              v-for="(item, index) in waterListTwo"
              :key="index"
              >{{ item.name }}</van-radio
            >
          </van-radio-group>
        </van-collapse-item>

        <van-field
          v-model="dialysisPrescription.single_time"
          @focus="inputFocus"
          v-if="isShow('单超时长') && dialysisPrescription.is_water == '是'"
          label="单超时长(min)"
          input-align="right"
          :required="isShow_title('单超时长') && dialysisPrescription.is_water == '是'"
        />
        <van-field
          v-model="dialysisPrescription.single_water"
          @focus="inputFocus"
          v-if="isShow('单超脱水') && dialysisPrescription.is_water == '是'"
          label="单超脱水(ml)"
          input-align="right"
          :required="isShow_title('单超脱水') && dialysisPrescription.is_water == '是'"
        />
        <van-field
          v-model="dialysisPrescription.drhy_water"
          @focus="inputFocus"
          v-if="isShow('曲线脱水')"
          label="曲线脱水(ml)"
          input-align="right"
          :required="isShow_title('曲线脱水')"
        />
        <van-field
          v-model="dialysisPrescription.dry_water_hour"
          @focus="inputFocus"
          v-if="isShow('曲线脱水时长')"
          label="曲线脱水时长(h)"
          input-align="right"
          :required="isShow_title('曲线脱水时长')"
        />

        <van-field
          v-model="dialysisPrescription.conduct"
          @focus="inputFocus"
          v-if="isShow('电导度')"
          label="电导度(mS/cm)"
          type="number"
          input-align="right"
        />

        <van-field
          v-model="dialysisPrescription.replacement_flow"
          @focus="inputFocus"
          v-if="
            isShow('置换流量') &&
            $store.getters.user.template_info.org_id != 10340  && dialysisPrescription.mode_id !=3
          "
          label="置换液流量(ml/min)"
          input-align="right"
           v-show="zhiShow"
          :required="isShow_title('置换流量')"
        />
        <van-field
          v-model="dialysisPrescription.replacement_flow"
          @focus="inputFocus"
          v-if="isShow('置换流量') && dialysisPrescription.mode_id !=3 &&  $store.getters.user.template_info.org_id == 10340"
          label="置换液流量(ml/min)"
          input-align="right"
           v-show="zhiShow"
          :required="isShow_title('置换流量')"
        />

        <van-collapse-item
          v-if="isShow('透析液配方')"
          title="透析液配方"
          name="2"
        >
        <template slot="title">
          <div><span v-if="isShow_title('透析液配方')" class="warn_tip">*</span>透析液配方</div>
        </template>
          <template #value>
            <div>
              {{
                GetDialysateFormulationById(
                  dialysisPrescription.dialysate_formulation
                )
              }}
            </div>
          </template>
          <van-radio-group v-model="dialysisPrescription.dialysate_formulation">
            <van-radio name="-2" key="-2">请选择</van-radio>
            <van-radio
              :name="item.id"
              v-for="(item, index) in dialysateFormulationOptions"
              :key="index"
              >{{ item.name }}</van-radio
            >
          </van-radio-group>
        </van-collapse-item>
        <van-collapse-item v-if="isShow('抗凝剂')" title="抗凝剂" name="3">
          <template slot="title">
          <div><span v-if="isShow_title('抗凝剂')" class="warn_tip">*</span>抗凝剂</div>
        </template>
          <template #value>
            <div>
              {{ GetAnticoagulantById(dialysisPrescription.anticoagulant) }}
            </div>
          </template>
          <van-radio-group v-model="dialysisPrescription.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>
        </van-collapse-item>

        <van-field v-model="dialysisPrescription.washing_time" @focus="inputFocus" v-if="isShow('冲洗时间') && dialysisPrescription.anticoagulant == 1" label="q(h)" input-align="right"/>

        <van-field v-model="dialysisPrescription.warsh_count" @focus="inputFocus" v-if="isShow('冲洗量') && dialysisPrescription.anticoagulant == 1" label="NS冲洗量(ml)" input-align="right"/>
        <van-field
          v-model="dialysisPrescription.antioxidant_commodity_name"
          @focus="inputFocus"
          v-if="isShow('抗凝剂商品名称')"
          label="抗凝剂商品名称"
          input-align="right"
          :required="isShow_title('抗凝剂商品名称')"
        />
        <van-field
          v-model="dialysisPrescription.no_heparin_remarks"
          @focus="inputFocus"
          v-if="isShow('无肝素备注') && dialysisPrescription.anticoagulant == 1"
          label="无肝素备注"
          input-align="right"
          :required="isShow_title('无肝素备注')&& dialysisPrescription.anticoagulant == 1"
        />
        <van-field
          v-model="dialysisPrescription.heparin_sodium"
          @focus="inputFocus"
          v-if="isShow('肝素钠') && dialysisPrescription.anticoagulant == 10"
          label="肝素钠(mg/h)"
          type="number"
          input-align="right"
          :required="isShow_title('肝素钠')&& dialysisPrescription.anticoagulant == 10"
        />
        <van-field
          v-model="dialysisPrescription.nucleoprotamine"
          @focus="inputFocus"
          v-if="isShow('鱼精蛋白') && dialysisPrescription.anticoagulant == 10"
          label="鱼精蛋白(mg/h)"
          type="number"
          input-align="right"
          :required="isShow_title('鱼精蛋白') && dialysisPrescription.anticoagulant == 10"
        />
        <van-field
          v-model="dialysisPrescription.push_the_protamine"
          @focus="inputFocus"
          v-if="
            isShow('下机前推注鱼精蛋白') &&
            dialysisPrescription.anticoagulant == 10
          "
          :required="isShow_title('下机前推注鱼精蛋白')&&
            dialysisPrescription.anticoagulant == 10"
          label="下机前推注鱼精蛋白(mg)"
          type="number"
          input-align="right"
        />
        <van-field
          v-model="dialysisPrescription.anticoagulant_shouji"
          @focus="inputFocus"
          @input="changeInput"
          v-if="dialysisPrescription.anticoagulant != -2 &&
                dialysisPrescription.anticoagulant != 0 &&
              dialysisPrescription.anticoagulant != 5 &&
              dialysisPrescription.anticoagulant != 1 &&
              dialysisPrescription.anticoagulant != 12 && isShow('首剂')"
          type="number"
          input-align="right"
          :disabled="dialysisPrescription.anticoagulant == 1"
          :required="dialysisPrescription.anticoagulant != -2 &&
                     dialysisPrescription.anticoagulant != 0 &&
                    dialysisPrescription.anticoagulant != 5 &&
                    dialysisPrescription.anticoagulant != 1 &&
                    dialysisPrescription.anticoagulant != 12 && isShow_title('首剂')"
        >
           <template #label v-if="$store.getters.user.template_info.org_id != 10101 && $store.getters.user.template_info.org_id != 10346  && $store.getters.user.template_info.template_id != 45 && $store.getters.user.template_info.template_id != 54  && $store.getters.user.template_info.org_id != 10340  && $store.getters.user.template_info.org_id != 10432 && $store.getters.user.template_info.org_id != 10441  && $store.getters.user.template_info.org_id != 10445 && $store.getters.user.template_info.org_id!=10447&& $store.getters.user.template_info.org_id!=9829 && $store.getters.user.template_info.org_id!=10440 && $store.getters.user.template_info.org_id!=10469&& $store.getters.user.template_info.org_id!=10471 && $store.getters.user.template_info.org_id!=10495 && $store.getters.user.template_info.org_id!=10375 && $store.getters.user.template_info.org_id!=10223 && $store.getters.user.template_info.org_id!=10551 && $store.getters.user.template_info.org_id!=9882 && $store.getters.user.template_info.org_id!=10206&& $store.getters.user.template_info.org_id!=10580&& $store.getters.user.template_info.org_id!=10600&& $store.getters.user.template_info.org_id!=10587&& $store.getters.user.template_info.org_id!=10599&& $store.getters.user.template_info.org_id!=10597 && $store.getters.user.template_info.org_id!=10679 && $store.getters.user.template_info.org_id!=10510 && $store.getters.user.template_info.org_id!=10702 && $store.getters.user.template_info.org_id!=10480">
                      <span v-if="dialysisPrescription.anticoagulant == 0 || dialysisPrescription.anticoagulant == -2">首剂(mg)</span>

                      <span v-if="dialysisPrescription.anticoagulant == 2 && $store.getters.user.template_info.template_id != 13 && $store.getters.user.template_info.template_id != 21 && $store.getters.user.template_info.template_id != 23 && $store.getters.user.template_info.template_id != 40 && $store.getters.user.template_info.template_id != 41  && $store.getters.user.template_info.template_id != 6 && $store.getters.user.template_info.template_id != 38 && $store.getters.user.template_info.template_id != 47 && $store.getters.user.template_info.template_id != 54 && $store.getters.user.template_info.org_id != 10234 && $store.getters.user.template_info.org_id !=10495 && $store.getters.user.template_info.org_id !=10375 && $store.getters.user.template_info.org_id !=10580  ||  $store.getters.user.template_info.org_id ==9538 || $store.getters.user.template_info.org_id !=10340 || $store.getters.user.template_info.org_id !=10432  || $store.getters.user.template_info.org_id !=9829|| $store.getters.user.template_info.org_id !=10679 || $store.getters.user.template_info.org_id !=10510   ">首剂
                        <span v-if="$store.getters.user.template_info.org_id == 9538">(u)</span>
                        <span v-if="$store.getters.user.template_info.org_id != 9538">
                          <span v-if="dialysisPrescription.anticoagulant == 17 && $store.getters.user.template_info.org_id!=10727 ">(U)</span> 
                          <span v-if="dialysisPrescription.anticoagulant == 17 || $store.getters.user.template_info.org_id==10727">(mg)</span> 
                          <span v-if="dialysisPrescription.anticoagulant != 17">
                             <span v-if="dialysisPrescription.anticoagulant==13">
                              (AXaIU)
                             </span>
                             <span v-if="dialysisPrescription.anticoagulant!=13">
                               iu
                             </span>
                          </span>
                        </span>
                      </span>

                      <span v-if="dialysisPrescription.anticoagulant == 2 && ($store.getters.user.template_info.template_id == 13 || $store.getters.user.template_info.template_id == 21 || $store.getters.user.template_info.template_id == 23 || $store.getters.user.template_info.template_id == 40 || $store.getters.user.template_info.template_id == 41 || ($store.getters.user.template_info.template_id == 6 && $store.getters.user.template_info.org_id!=9538) || $store.getters.user.template_info.template_id == 38 || $store.getters.user.template_info.template_id == 47 || $store.getters.user.template_info.template_id == 54 ||  $store.getters.user.template_info.org_id == 10234 || $store.getters.user.template_info.org_id == 10375 || $store.getters.user.template_info.org_id == 10340 || $store.getters.user.template_info.org_id == 10432 || $store.getters.user.template_info.org_id == 9829  || $store.getters.user.template_info.org_id ==10495 || $store.getters.user.template_info.org_id ==10551)">首剂(mg)</span>

                      <span v-if="dialysisPrescription.anticoagulant == 3 || dialysisPrescription.anticoagulant == 8 || dialysisPrescription.anticoagulant == 9 || dialysisPrescription.anticoagulant ==10 || dialysisPrescription.anticoagulant ==17">
                         <span v-if="$store.getters.user.template_info.org_id == 9671">首剂(mg)</span>
                        <!-- <span v-else>首剂(iu)</span> -->
                      </span>
                      <span v-if="dialysisPrescription.anticoagulant == 4 && $store.getters.user.template_info.org_id!=9538">首剂(ml)</span>
                      <span v-if="dialysisPrescription.anticoagulant == 1">首剂(mg)</span>
                      <span v-if="dialysisPrescription.anticoagulant == 6 || dialysisPrescription.anticoagulant == 14 || dialysisPrescription.anticoagulant == 15">
                         <span v-if="$store.getters.user.template_info.org_id == 9671 || $store.getters.user.template_info.org_id == 10551">首剂(mg)</span>
                         <!-- <span v-else>首剂(iu)</span> -->
                      </span>
                      <span v-if="dialysisPrescription.anticoagulant == 7 ">
                       <span v-if="$store.getters.user.template_info.org_id ==9990 || $store.getters.user.template_info.org_id ==9671"> 首剂(mg)</span>
                       <!-- <span v-else>首剂(iu)</span> -->
                      </span>
                      <span v-if="dialysisPrescription.anticoagulant == 11">首剂(iu)</span>
                     
                      <span v-if="dialysisPrescription.anticoagulant == 4">首剂(mg)</span>
                  </template>

                  <template #label v-else>
                    <span v-if="dialysisPrescription.anticoagulant == 2 || dialysisPrescription.anticoagulant == 4 || dialysisPrescription.anticoagulant == 17 || dialysisPrescription.anticoagulant == 15 ">首剂(mg)</span>
                    <span v-if="dialysisPrescription.anticoagulant == 13 || dialysisPrescription.anticoagulant == 11">首剂(AXaIU)</span>
                    <span v-if="dialysisPrescription.anticoagulant != 2 && dialysisPrescription.anticoagulant != 4  && dialysisPrescription.anticoagulant != 13 && dialysisPrescription.anticoagulant != 17  && dialysisPrescription.anticoagulant != 11 && dialysisPrescription.anticoagulant != 15">首剂(iu)</span>
               </template>
        </van-field>

        <van-field
          v-model="dialysisPrescription.anticoagulant_weichi"
          @focus="inputFocus"
          @input="changeInput"
          v-if="dialysisPrescription.anticoagulant != -2 &&
                    dialysisPrescription.anticoagulant != 0 &&
                    dialysisPrescription.anticoagulant != 1 &&
                    dialysisPrescription.anticoagulant != 12 && isShow('维持')"
          type="number"
          input-align="right"
          :disabled="dialysisPrescription.anticoagulant == 1"
          :required="dialysisPrescription.anticoagulant != -2 &&
                    dialysisPrescription.anticoagulant != 0 &&
                    dialysisPrescription.anticoagulant != 1 &&
                    dialysisPrescription.anticoagulant != 12 && isShow_title('维持')"
        >
          <template
            #label
            v-if="
              $store.getters.user.template_info.org_id != 10101 &&
              $store.getters.user.template_info.org_id != 10346 &&
              $store.getters.user.template_info.template_id != 45 &&
              $store.getters.user.template_info.template_id != 54 &&
              $store.getters.user.template_info.org_id != 10340 &&
              $store.getters.user.template_info.org_id != 10432 &&
              $store.getters.user.template_info.org_id != 10495 &&
              $store.getters.user.template_info.org_id != 10375 &&
              $store.getters.user.template_info.org_id != 10551 &&
              $store.getters.user.template_info.org_id!=10600 &&
              $store.getters.user.template_info.org_id!=10587 &&
              $store.getters.user.template_info.org_id!=10599 &&
              $store.getters.user.template_info.org_id!=10597 &&
              $store.getters.user.template_info.org_id!=10679 &&
              $store.getters.user.template_info.org_id!=10702 &&
              $store.getters.user.template_info.org_id!=10480 &&
              $store.getters.user.template_info.org_id!=10510 &&
              $store.getters.user.template_info.org_id!=10644 &&
              $store.getters.user.template_info.org_id!=10580
            "
          >
            <span
              v-if="
                dialysisPrescription.anticoagulant == 0 ||
                dialysisPrescription.anticoagulant == -2
              "
              >维持(mg/h)</span
            >
            <span
              v-if="
                (dialysisPrescription.anticoagulant == 2 &&
                  $store.getters.user.template_info.template_id != 13 &&
                  $store.getters.user.template_info.template_id != 21 &&
                  $store.getters.user.template_info.template_id != 23 &&
                  $store.getters.user.template_info.template_id != 40 &&
                  $store.getters.user.template_info.template_id != 41 &&
                  $store.getters.user.template_info.template_id != 47 &&
                  $store.getters.user.template_info.template_id != 6) ||
                ($store.getters.user.template_info.org_id == 9538 &&
                  $store.getters.user.template_info.template_id != 38 &&
                  $store.getters.user.template_info.template_id != 54 &&
                  $store.getters.user.template_info.org_id != 10234 &&
                  $store.getters.user.template_info.org_id != 10340 &&
                  $store.getters.user.template_info.org_id != 10432 &&
                  $store.getters.user.template_info.org_id != 10495 &&
                  $store.getters.user.template_info.org_id != 10375 &&
                  $store.getters.user.template_info.org_id != 10223 &&
                  $store.getters.user.template_info.org_id != 10551 &&
                  $store.getters.user.template_info.org_id!=10600 &&
                  $store.getters.user.template_info.org_id!=10587 &&
                  $store.getters.user.template_info.org_id!=10599 &&
                  $store.getters.user.template_info.org_id!=10597 &&
                  $store.getters.user.template_info.org_id!=10679 &&
                  $store.getters.user.template_info.org_id!=10480 &&
                  $store.getters.user.template_info.org_id!=10510 &&
                  $store.getters.user.template_info.org_id!=10580
                  )
              "
            >
              维持
              <span v-if="$store.getters.user.template_info.org_id == 9538"
                >(u)</span
              >
              <span v-if="$store.getters.user.template_info.org_id != 9538">
                <span v-if="dialysisPrescription.anticoagulant == 17 && $store.getters.user.template_info.org_id!=10727">(U/h)</span> 
                <span v-if="dialysisPrescription.anticoagulant == 17 || $store.getters.user.template_info.org_id==10727">(mg/h)</span> 
                <span v-if="dialysisPrescription.anticoagulant != 17">(iu/h)</span>
              </span>
            </span>
            <span
              v-if="
                dialysisPrescription.anticoagulant == 2 &&
                ($store.getters.user.template_info.template_id == 13 ||
                  $store.getters.user.template_info.template_id == 21 ||
                  $store.getters.user.template_info.template_id == 23 ||
                  $store.getters.user.template_info.template_id == 40 ||
                  $store.getters.user.template_info.template_id == 41 ||
                  $store.getters.user.template_info.template_id == 47 ||
                  ($store.getters.user.template_info.template_id == 6 &&
                    $store.getters.user.template_info.org_id != 9538) ||
                  $store.getters.user.template_info.template_id == 38 ||
                  $store.getters.user.template_info.template_id == 54 ||
                  $store.getters.user.template_info.org_id == 10234 ||
                  $store.getters.user.template_info.org_id == 10340 ||
                  $store.getters.user.template_info.org_id == 10432 ||
                  $store.getters.user.template_info.org_id == 10495 ||
                  $store.getters.user.template_info.org_id == 10375 ||
                  $store.getters.user.template_info.org_id == 10223 ||
                  $store.getters.user.template_info.org_id == 10551 ||
                  $store.getters.user.template_info.org_id ==10600  ||
                  $store.getters.user.template_info.org_id ==10587  ||
                  $store.getters.user.template_info.org_id ==10599  ||
                  $store.getters.user.template_info.org_id==10597   ||
                  $store.getters.user.template_info.org_id==10679 ||
                  $store.getters.user.template_info.org_id==10510 ||
                  $store.getters.user.template_info.org_id==10480 || 
                  $store.getters.user.template_info.org_id==10580
                  )
              "
              >维持(mg/h)</span
            >
            <span
              v-if="
                dialysisPrescription.anticoagulant == 3 ||
                dialysisPrescription.anticoagulant == 8 ||
                dialysisPrescription.anticoagulant == 9 ||
                dialysisPrescription.anticoagulant == 10
              "
            >
              <span v-if="$store.getters.user.template_info.org_id == 9671"
                >维持(mg/h)</span
              >
              <span v-else>维持(iu/h)</span>
            </span>
            <span v-if="dialysisPrescription.anticoagulant == 4">维持(mg/h)</span>
            <span v-if="dialysisPrescription.anticoagulant == 5"
              >维持(ml/h)</span
            >
            <span v-if="dialysisPrescription.anticoagulant == 16  || dialysisPrescription.anticoagulant == 14"
              >维持(iu/h)
              </span
            >

            
            
            <span v-if="dialysisPrescription.anticoagulant == 1 || dialysisPrescription.anticoagulant == 15 "
              >维持
                (mg/h)
              </span
            >
            <span v-if=" dialysisPrescription.anticoagulant == 17 && $store.getters.user.template_info.org_id!=10727"
              >维持(U/h)
              </span
            >
            <span v-if=" dialysisPrescription.anticoagulant == 17 || $store.getters.user.template_info.org_id==10727"
              >维持(mg/h)
              </span
            >
            <span v-if="dialysisPrescription.anticoagulant == 6">
              <span
                v-if="
                  $store.getters.user.template_info.org_id == 10340 ||
                  $store.getters.user.template_info.org_id == 10432 ||
                  $store.getters.user.template_info.org_id == 10495 ||
                  $store.getters.user.template_info.org_id == 10375 ||
                  $store.getters.user.template_info.org_id == 10551 ||
                  $store.getters.user.template_info.org_id == 10679 ||
                  $store.getters.user.template_info.org_id == 10510 ||
                  $store.getters.user.template_info.org_id== 10480

                "
                >维持(mg/h)</span
              >
              <span v-else>维持(iu/h)</span>
            </span>
            <span v-if="dialysisPrescription.anticoagulant == 7">
              <span
                v-if="
                  $store.getters.user.template_info.org_id == 9990 ||
                  $store.getters.user.template_info.org_id == 9671
                "
                >维持(mg/h)</span
              >
              <span v-else>维持(iu/h)</span>
            </span>
            <span v-if="dialysisPrescription.anticoagulant == 11 || dialysisPrescription.anticoagulant == 13"
              >维持(iu/h)</span
            >
          </template>
          <template #label v-else>
            <span v-if="dialysisPrescription.anticoagulant == 2 || dialysisPrescription.anticoagulant == 4 || dialysisPrescription.anticoagulant == 17 || dialysisPrescription.anticoagulant == 15">维持(mg/h)</span>
            <span v-if="dialysisPrescription.anticoagulant ==11 || dialysisPrescription.anticoagulant == 13">维持(AXaIU)</span>
            <span v-if="dialysisPrescription.anticoagulant != 2 && dialysisPrescription.anticoagulant != 4  && dialysisPrescription.anticoagulant != 13 && dialysisPrescription.anticoagulant != 17  && dialysisPrescription.anticoagulant != 11 && dialysisPrescription.anticoagulant != 15">维持(iu/h)</span>
          </template>
        </van-field>

        <van-field v-model="dialysisPrescription.anticoagulant_weichi_hour" @focus="inputFocus" v-if="isShow('维持时长')" label="维持时长(h)" input-align="right"/>

        <van-field v-model="dialysisPrescription.prescribing_number" @focus="inputFocus" type="number" v-if="isShow('开药数量')" label="开药数量(支)" input-align="right"/>

        <van-field
          v-model="dialysisPrescription.anticoagulant_zongliang"
          @focus="inputFocus"
          v-if="dialysisPrescription.anticoagulant != 5 &&
                    dialysisPrescription.anticoagulant != 0 &&
                    dialysisPrescription.anticoagulant != -2 &&
                    dialysisPrescription.anticoagulant != 1 &&
                    dialysisPrescription.anticoagulant != 12 &&isShow('总量')"
          type="number"
          input-align="right"
          :disabled="dialysisPrescription.anticoagulant == 1"
          :required="dialysisPrescription.anticoagulant != 5 &&
                      dialysisPrescription.anticoagulant != 0 &&
                     dialysisPrescription.anticoagulant != -2 &&
                    dialysisPrescription.anticoagulant != 1 &&
                    dialysisPrescription.anticoagulant != 12 && isShow_title('总量')"
        >
          <template
            #label
            v-if="
              $store.getters.user.template_info.org_id != 10101 &&
              $store.getters.user.template_info.org_id != 10346 &&
              $store.getters.user.template_info.template_id != 45 &&
              $store.getters.user.template_info.template_id != 54 &&
              $store.getters.user.template_info.org_id != 10340 &&
              $store.getters.user.template_info.org_id != 10432 &&
              $store.getters.user.template_info.org_id != 10495 &&
              $store.getters.user.template_info.org_id != 10375 &&
              $store.getters.user.template_info.org_id != 10551 &&
              $store.getters.user.template_info.org_id!=10600 &&
              $store.getters.user.template_info.org_id!=10587 &&
              $store.getters.user.template_info.org_id !=10599 &&
              $store.getters.user.template_info.org_id!=10597 &&
              $store.getters.user.template_info.org_id!=10679 &&
              $store.getters.user.template_info.org_id!=10702 &&
              $store.getters.user.template_info.org_id!=10510 &&
              $store.getters.user.template_info.org_id!=10480 &&
              $store.getters.user.template_info.org_id!=10644 &&
              $store.getters.user.template_info.org_id!=10580
            "
          >
            <span
              v-if="
                dialysisPrescription.anticoagulant == 0 ||
                dialysisPrescription.anticoagulant == -2
              "
              >总量(mg)</span
            >
            <span
              v-if="
                (dialysisPrescription.anticoagulant == 2 &&
                  $store.getters.user.template_info.template_id != 13 &&
                  $store.getters.user.template_info.template_id != 21 &&
                  $store.getters.user.template_info.template_id != 23 &&
                  $store.getters.user.template_info.template_id != 40 &&
                  $store.getters.user.template_info.template_id != 41 &&
                  $store.getters.user.template_info.template_id != 47 &&
                  $store.getters.user.template_info.template_id != 6) ||
                ($store.getters.user.template_info.org_id == 9538 &&
                  $store.getters.user.template_info.template_id != 38)
              "
            >
              总量
              <span v-if="$store.getters.user.template_info.org_id == 9538"
                >(u)</span
              >
              <span v-if="$store.getters.user.template_info.org_id != 9538">
                <span v-if="dialysisPrescription.anticoagulant == 17 && $store.getters.user.template_info.org_id!=10727">(U)</span> 
                <span v-if="dialysisPrescription.anticoagulant == 17 || $store.getters.user.template_info.org_id==10727">(mg)</span> 
                <span v-if="dialysisPrescription.anticoagulant != 17">(iu)</span>
              </span>
            </span>
            <span
              v-if="
                dialysisPrescription.anticoagulant == 2 &&
                ($store.getters.user.template_info.template_id == 13 ||
                  $store.getters.user.template_info.org_id == 10340 ||
                  $store.getters.user.template_info.org_id == 10432 ||
                  $store.getters.user.template_info.org_id == 10495 ||
                  $store.getters.user.template_info.org_id == 10375 ||
                  $store.getters.user.template_info.org_id == 10679 ||
                  $store.getters.user.template_info.org_id == 10510 ||
                  $store.getters.user.template_info.org_id == 10551 ||
                  $store.getters.user.template_info.template_id == 21 ||
                  $store.getters.user.template_info.template_id == 23 ||
                  $store.getters.user.template_info.template_id == 40 ||
                  $store.getters.user.template_info.template_id == 41 ||
                  $store.getters.user.template_info.template_id == 47 ||
                  ($store.getters.user.template_info.template_id == 6 &&
                    $store.getters.user.template_info.org_id != 9538) ||
                  $store.getters.user.template_info.template_id == 38 ||
                  $store.getters.user.template_info.template_id == 54)
              "
              >总量(mg)</span
            >
            <span
              v-if="
                dialysisPrescription.anticoagulant == 3 ||
                dialysisPrescription.anticoagulant == 8 ||
                dialysisPrescription.anticoagulant == 9 ||
                dialysisPrescription.anticoagulant == 10 ||
                dialysisPrescription.anticoagulant == 17
              "
            >
              <span v-if="$store.getters.user.template_info.org_id == 9671 || $store.getters.user.template_info.org_id == 10206">
                总量(mg)</span
              >
             
              <span v-else>
                 <span v-if=" dialysisPrescription.anticoagulant == 17 && $store.getters.user.template_info.org_id!=10727"> 总量(U)</span>
                 <span v-if=" dialysisPrescription.anticoagulant == 17 || $store.getters.user.template_info.org_id==10727"> 总量(mg)</span>
                 <span v-if=" dialysisPrescription.anticoagulant != 17"> 总量(iu)</span>
                </span>
            </span>
            <span v-if="dialysisPrescription.anticoagulant == 4">总量(mg)</span>
            <span v-if="dialysisPrescription.anticoagulant == 1">总量(mg)</span>
            <span v-if="dialysisPrescription.anticoagulant == 6">
              <span v-if="$store.getters.user.template_info.org_id == 9671">
                总量(mg)</span
              >
              <span v-else> 总量(iu)</span>
            </span>
            <span v-if="dialysisPrescription.anticoagulant == 7">
              <span
                v-if="
                  $store.getters.user.template_info.org_id == 9990 ||
                  $store.getters.user.template_info.org_id == 9671
                "
                >总量(mg)</span
              >
              <span v-else>总量(iu)</span>
            </span>
            <span v-if="dialysisPrescription.anticoagulant == 11 || dialysisPrescription.anticoagulant == 13 || dialysisPrescription.anticoagulant == 14|| dialysisPrescription.anticoagulant == 16"
              >总量(iu)</span
            >
            <span v-if="dialysisPrescription.anticoagulant == 15"
              >总量(mg)</span
            >
          </template>
          <template #label v-else>
            <span v-if="dialysisPrescription.anticoagulant == 2 || dialysisPrescription.anticoagulant == 4 || dialysisPrescription.anticoagulant == 17 || dialysisPrescription.anticoagulant == 15">总量(mg)</span>
            <span v-if="dialysisPrescription.anticoagulant == 11 || dialysisPrescription.anticoagulant == 13">总量(AXaIU)</span>
            <span v-if="dialysisPrescription.anticoagulant != 2 && dialysisPrescription.anticoagulant != 4  && dialysisPrescription.anticoagulant != 13 && dialysisPrescription.anticoagulant != 17  && dialysisPrescription.anticoagulant != 11 && dialysisPrescription.anticoagulant != 15">总量(iu)</span>
          </template>
        </van-field>



        <van-field
          v-model="dialysisPrescription.anticoagulant_gaimingcheng"
          @focus="inputFocus"
          v-if="dialysisPrescription.anticoagulant == 5 && isShow('钙名称')"
          label="钙名称"
          input-align="right"
          :required="dialysisPrescription.anticoagulant == 5 && isShow_title('钙名称')"
        />
        <van-field
          v-model="dialysisPrescription.anticoagulant_gaijiliang"
          @focus="inputFocus"
          v-if="dialysisPrescription.anticoagulant == 5 && isShow('钙剂量')"
          :required="dialysisPrescription.anticoagulant == 5 && isShow_title('钙剂量')"
          type="number"
          label="钙剂量(ml)"
          input-align="right"
        />
        <van-field
          v-model="dialysisPrescription.replacement_total"
          @focus="inputFocus"
          v-if="isShow('置换量')"
          :required="isShow_title('置换量')"
          type="number"
          input-align="right"
          v-show="zhiShow"
        >
          <template #label>
            <span
              v-if="
                $store.getters.user.template_info.template_id != 20 &&
                $store.getters.user.template_info.template_id != 28 &&
                $store.getters.user.template_info.template_id != 29 &&
                $store.getters.user.template_info.template_id != 40 &&
                $store.getters.user.template_info.template_id != 46 &&
                $store.getters.user.template_info.template_id != 47 &&
                $store.getters.user.template_info.template_id != 53
              "
              >置换量(L)</span
            >
            <span
              v-if="
                $store.getters.user.template_info.template_id == 20 ||
                $store.getters.user.template_info.template_id == 28 ||
                $store.getters.user.template_info.template_id == 29 ||
                $store.getters.user.template_info.template_id == 40 ||
                $store.getters.user.template_info.template_id == 46 ||
                $store.getters.user.template_info.template_id == 47 ||
                $store.getters.user.template_info.template_id == 53
              "
              >置换量(ml)</span
            >
          </template>
        </van-field>
        <van-field
          v-model="dialysisPrescription.kalium"
          @focus="inputFocus"
          v-if="isShow('钾')"
          label="钾(mmol/L)"
          type="number"
          input-align="right"
          :required="isShow_title('钾')"
        />
        <van-field
          v-model="dialysisPrescription.sodium"
          @focus="inputFocus"
          v-if="isShow('钠')"
          label="钠(mmol/L)"
          type="number"
          input-align="right"
          :required="isShow_title('钠')"
        />
        <van-field
          v-model="dialysisPrescription.calcium"
          @focus="inputFocus"
          v-if="isShow('钙')"
          label="钙(mmol/L)"
          type="number"
          input-align="right"
          :required="isShow_title('钙')"
        />
        <van-field
          v-model="dialysisPrescription.bicarbonate"
          @focus="inputFocus"
          v-if="isShow('碳酸氢盐')"
          label="碳酸氢盐(mmol/L)"
          type="number"
          input-align="right"
          :required="isShow_title('碳酸氢盐')"
        />
        <van-field
          v-model="dialysisPrescription.glucose"
          @focus="inputFocus"
          v-if="isShow('葡萄糖')"
          label="葡萄糖(mmol/L)"
          type="number"
          input-align="right"
          :required="isShow_title('葡萄糖')"
        />
        <van-field
          v-model="dialysisPrescription.dialysate_flow"
          @focus="inputFocus"
          v-if="isShow('透析液流量')"
          label="透析液流量(ml/min)"
          type="number"
          input-align="right"
          :required="isShow_title('透析液流量')"
        />
        <van-field
          v-model="dialysisPrescription.dialysate_temperature"
          @focus="inputFocus"
          v-if="isShow('透析液温度')"
          label="透析液温度(℃)"
          type="number"
          input-align="right"
          :required="isShow_title('透析液温度')"
        />
        <van-field
          v-model="dialysisPrescription.conductivity"
          @focus="inputFocus"
          v-if="isShow('电导率')"
          label="电导率(mS/cm)"
          type="number"
          input-align="right"
          :required="isShow_title('电导率')"
        />
        <van-collapse-item
          v-if="isShow('透析器/灌流器')"
          title="透析器/灌流器"
          name="dialyzer_perfusion_apparatus"
        >
          <template slot="title">
          <div><span v-if="isShow_title('透析器/灌流器')" class="warn_tip">*</span>透析器/灌流器</div>
          </template>
          <template #value>
            <div>{{ dialysisPrescription.dialyzer_perfusion_apparatus }}</div>
          </template>

          <checkBoxMenu
            v-if="checkBoxShow"
            v-on:menu-comfirm="getString"
            :propsForm="propForm"
          ></checkBoxMenu>
        </van-collapse-item>

        <van-collapse-item v-if="isShow('透析器')" title="透析器" name="5">
          <template slot="title">
          <div><span v-if="isShow_title('透析器')" class="warn_tip">*</span>透析器</div>
          </template>
          <template #value>
            <div>{{ dialysisPrescription.dialysis_dialyszers }}</div>
          </template>
          <van-radio-group v-model="dialysisPrescription.dialysis_dialyszers">
            <van-radio name="" key="-2">请选择</van-radio>
            <van-radio
              :name="item.specification_name"
              v-for="(item, index) in dialysisDialyszers"
              :key="index"
              >{{ item.specification_name }}</van-radio
            >
          </van-radio-group>
        </van-collapse-item>
        <van-collapse-item v-if="isShow('灌流器')" title="灌流器" name="6">
          <template slot="title">
          <div><span v-if="isShow_title('灌流器')" class="warn_tip">*</span>灌流器</div>
          </template>
          <template #value>
            <div>{{ dialysisPrescription.dialysis_irrigation }}</div>
          </template>
          <van-radio-group v-model="dialysisPrescription.dialysis_irrigation">
            <van-radio name="" key="-2">请选择</van-radio>
            <van-radio
              :name="item.specification_name"
              v-for="(item, index) in dialysisIrrigation"
              :key="index"
              >{{ item.specification_name }}</van-radio
            >
          </van-radio-group>
        </van-collapse-item>

        <van-collapse-item v-if="isShow('滤过器')" title="滤过器" name="19">
            <template #value>
                <div>{{dialysisPrescription.dialysis_strainer}}</div>
            </template>
            <van-radio-group v-model="dialysisPrescription.dialysis_strainer">
                <van-radio name="" key="-2">请选择</van-radio>
                <van-radio :name="item.specification_name" v-for='(item,index) in dialysisStrainerList' :key="index">{{ item.specification_name }}</van-radio>
            </van-radio-group>
        </van-collapse-item>

        <van-collapse-item
          v-if="isShow('血浆分离器')"
          title="血浆分离器"
          name="plasma_separator"
        >
        <template slot="title">
          <div><span v-if="isShow_title('血浆分离器')" class="warn_tip">*</span>血浆分离器</div>
          </template>
          <template #value>
            <div>{{ dialysisPrescription.plasma_separator }}</div>
          </template>

          <checkBoxMenu
            v-if="checkBoxShow"
            v-on:menu-comfirm="getString"
            :propsForm="propForm"
          ></checkBoxMenu>
        </van-collapse-item>

        <van-collapse-item
          v-if="isShow('胆红素吸附柱')"
          title="胆红素吸附柱"
          name="bilirubin_adsorption_column"
        >
        <template slot="title">
          <div><span v-if="isShow_title('胆红素吸附柱')" class="warn_tip">*</span>胆红素吸附柱</div>
          </template>
          <template #value>
            <div>{{ dialysisPrescription.bilirubin_adsorption_column }}</div>
          </template>

          <checkBoxMenu
            v-if="checkBoxShow"
            v-on:menu-comfirm="getString"
            :propsForm="propForm"
          ></checkBoxMenu>
        </van-collapse-item>

        <van-collapse-item
          v-if="isShow('体液过多症状')"
          title="体液过多症状"
          name="7"
        >
        <template slot="title">
          <div><span v-if="isShow_title('体液过多症状')" class="warn_tip">*</span>体液过多症状</div>
          </template>
          <template #value>
            <div>{{ getBodyFluid(dialysisPrescription.body_fluid) }}</div>
          </template>
          <van-radio-group v-model="dialysisPrescription.body_fluid">
            <van-radio name="-2" key="-2">请选择</van-radio>
            <van-radio
              :name="item.id"
              v-for="(item, index) in bodyFluidOptions"
              :key="index"
              >{{ item.name }}</van-radio
            >
          </van-radio-group>
        </van-collapse-item>
        <van-field
          v-model="dialysisPrescription.body_fluid_other"
          @focus="inputFocus"
          v-if="isShow('体液过多其他症状')"
          label="体液过多其他症状"
          input-align="right"
          :required="isShow_title('体液过多其他症状')"
        />
        <van-collapse-item
          v-if="isShow('透析前使用特殊药物')"
          title="透析前使用特殊药物"
          name="8"
        >
          <template slot="title">
            <div><span v-if="isShow_title('透析前使用特殊药物')" class="warn_tip">*</span>透析前使用特殊药物</div>
          </template>
          <template #value>
            <div>
              {{ getSpecialMedicine(dialysisPrescription.special_medicine) }}
            </div>
          </template>
          <van-radio-group v-model="dialysisPrescription.special_medicine">
            <van-radio name="-2" key="-2">请选择</van-radio>
            <van-radio
              :name="item.id"
              v-for="(item, index) in specialMedicineOptions"
              :key="index"
              >{{ item.name }}</van-radio
            >
          </van-radio-group>
        </van-collapse-item>
        <van-field
          v-model="dialysisPrescription.special_medicine_other"
          @focus="inputFocus"
          v-if="isShow('透析前使用其他特殊药物')"
          label="透析前使用其他特殊药物"
          input-align="right"
          :required="isShow_title('透析前使用其他特殊药物')"
        />

        <van-collapse-item v-if="isShow('置换液')" name="9" v-show="huShow">
          <template #title>
            <span v-if="$store.getters.user.template_info.template_id != 6"
              ><span v-if="isShow_title('置换液')&&$store.getters.user.template_info.template_id != 6" class="warn_tip">*</span>置换方式</span
            >
            <span v-if="$store.getters.user.template_info.template_id == 6"
              ><span v-if="isShow_title('置换液')&&$store.getters.user.template_info.template_id == 6" class="warn_tip">*</span>置换方式</span
            >
          </template>
          <template #value>
            <div>
              {{
                getDisplaceLiquiPart(dialysisPrescription.displace_liqui_part)
              }}
            </div>
          </template>
          <van-radio-group v-model="dialysisPrescription.displace_liqui_part">
            <van-radio name="-2" key="-2">请选择</van-radio>
            <van-radio
              :name="item.id"
              v-for="(item, index) in displaceLiquiPartOptions"
              :key="index"
              >{{ item.name }}</van-radio
            >
          </van-radio-group>
        </van-collapse-item>
        <van-field
          v-model="dialysisPrescription.displace_liqui_value"
          @focus="inputFocus"
          v-if="isShow('置换液总量')"
          v-show="totalShow"
          input-align="right"
          :required="isShow_title('置换液总量')"
        >
          <template #label>
            <span
              v-if="
                ($store.getters.user.template_info.template_id == 21 ||
                  $store.getters.user.template_info.template_id == 29 ||
                  $store.getters.user.template_info.template_id == 53 ||
                  $store.getters.user.template_info.org_id == 10587) &&
                  $store.getters.user.template_info.org_id != 10249 &&
                  $store.getters.user.template_info.org_id != 9538
              "
              >置换液总量
              <span v-if="dialysisPrescription.mode_id !=26 && $store.getters.user.template_info.org_id !=10587"> (ml)</span>
              <span v-if="dialysisPrescription.mode_id ==26 || $store.getters.user.template_info.org_id == 10587"> (L)</span>
              </span
            >
            <span
              v-if="
                ($store.getters.user.template_info.template_id != 21 &&
                  $store.getters.user.template_info.template_id != 29 &&
                  $store.getters.user.template_info.org_id!=10587 &&
                  $store.getters.user.template_info.template_id != 53) ||
                  $store.getters.user.template_info.org_id == 10249 
                 

              "
              >置换液总量
              <span v-if="dialysisPrescription.mode_id !=26 &&  $store.getters.user.template_info.org_id != 9538 &&  $store.getters.user.template_info.org_id != 10735&& $store.getters.user.template_info.org_id != 10697&& $store.getters.user.template_info.org_id != 10752"> (ml)</span>
              <span v-if="dialysisPrescription.mode_id ==26 &&  $store.getters.user.template_info.org_id != 9538 &&  $store.getters.user.template_info.org_id != 10735 && $store.getters.user.template_info.org_id != 10697&& $store.getters.user.template_info.org_id != 10752"> (L/h)</span>
              <span v-if="$store.getters.user.template_info.org_id == 9538 || $store.getters.user.template_info.org_id == 10735  || $store.getters.user.template_info.org_id == 10697  || $store.getters.user.template_info.org_id == 10752"> (L)</span>
              </span
            >
          </template>
        </van-field>
        <van-field
          v-model="dialysisPrescription.displace_speed"
          @focus="inputFocus"
          v-if="(dialysisPrescription.mode_id==2||dialysisPrescription.mode_id==5||dialysisPrescription.mode_id==12)&&isShow('置换速度') &&  $store.getters.user.template_info.org_id!=10677"
          label="置换速度(ml/min)"
          input-align="right"
          :required="(dialysisPrescription.mode_id==2||dialysisPrescription.mode_id==5||dialysisPrescription.mode_id==12)&&isShow_title('置换速度')"
        />

        <van-field
          v-model="dialysisPrescription.displace_speed"
          @focus="inputFocus"
          v-if="(dialysisPrescription.mode_id==2||dialysisPrescription.mode_id==5||dialysisPrescription.mode_id==12)&&isShow('置换速度') &&  $store.getters.user.template_info.org_id==10677"
          label="置换速度(L/min)"
          input-align="right"
          :required="(dialysisPrescription.mode_id==2||dialysisPrescription.mode_id==5||dialysisPrescription.mode_id==12)&&isShow_title('置换速度')"
        />
        <van-field
          v-model="dialysisPrescription.target_ktv"
          @focus="inputFocus"
          v-if="isShow('目标KT/V')"
          label="目标KT/V"
          input-align="right"
          :required="isShow_title('目标KT/V')"
        />

        <van-collapse-item v-if="isShow('血管通路部位')" title="血管通路部位" name="blood_access_part_id">
                  <template slot="title">
                      <div><span v-if="isShow_title('血管通路部位')" class="warn_tip">*</span>血管通路部位</div>
                  </template>
                  <template #value>
                      <div>{{dialysisPrescription.blood_access_part_id}}</div>
                  </template>
                  <checkBoxMenu v-if='checkBoxShow' v-on:menu-comfirm="getString" :propsForm="propForm"></checkBoxMenu>
        </van-collapse-item>
        <van-collapse-item v-if="isShow('血管通路')" title="血管通路" name="10">
          <template slot="title">
                  <div><span v-if="isShow_title('血管通路')" class="warn_tip">*</span>血管通路</div>
                  </template>
          <template #value>
            <div>
              {{ getBloodAccessTwo(dialysisPrescription.blood_access) }}
            </div>
          </template>
          <van-radio-group v-model="dialysisPrescription.blood_access">
            <van-radio name="-2" key="-2">请选择</van-radio>
            <van-radio
              :name="item.id"
              v-for="(item, index) in bloodAccessOptions"
              :key="index"
              >{{ item.name }}</van-radio
            >
          </van-radio-group>
        </van-collapse-item>
        <van-field
          v-model="anticoagulantTimeValue"
          readonly
          @click="openAnticoagulantPicker"
          v-if="isShow('抗凝提前停止')"
          label="抗凝提前停止"
          input-align="right"
          :required="isShow_title('抗凝提前停止')"
        />
        <van-collapse-item v-if="isShow('病情')" title="病情" name="11">
          <template slot="title">
            <div><span v-if="isShow_title('病情')" class="warn_tip">*</span>病情</div>
            </template>
          <template #value>
            <div>{{ getIllness(dialysisPrescription.illness) }}</div>
          </template>
          <van-radio-group v-model="dialysisPrescription.illness">
            <van-radio name="-2" key="-2">请选择</van-radio>
            <van-radio
              :name="item.id"
              v-for="(item, index) in illnessList"
              :key="index"
              >{{ item.name }}</van-radio
            >
          </van-radio-group>
        </van-collapse-item>
        <van-field
          v-model="dialysisPrescription.amylaceum"
          @focus="inputFocus"
          v-if="isShow('葡萄糖')"
          label="葡萄糖"
          input-align="right"
          :required="isShow_title('葡萄糖')"
        />
        <van-collapse-item v-if="isShow('吸氧')" title="吸氧" name="17">
          <template slot="title">
                  <div><span v-if="isShow_title('吸氧')" class="warn_tip">*</span>吸氧</div>
                  </template>
          <template #value>
            <span
              v-if="dialysisPrescription.oxygen_uptake == 0"
              class="text"
              style="width: 50px"
            ></span>
            <span
              v-if="dialysisPrescription.oxygen_uptake == 1"
              class="text"
              style="width: 50px"
              >需</span
            >
            <span
              v-if="dialysisPrescription.oxygen_uptake == 2"
              class="text"
              style="width: 50px"
              >无</span
            >
          </template>
          <van-radio-group
            v-model="dialysisPrescription.oxygen_uptake"
            @change="changeOxygen"
          >
            <van-radio name="-2" key="-2">请选择</van-radio>
            <van-radio :name="'1'">需</van-radio>
            <van-radio :name="'2'">无</van-radio>
          </van-radio-group>
        </van-collapse-item>
        <van-field
          v-model="dialysisPrescription.oxygen_flow"
          @focus="inputFocus"
          v-if="isShow('吸氧') && oxygenShow == true"
          label="吸氧流量(L/分）"
          input-align="right"
          :required="isShow_title('吸氧')&& oxygenShow == true"
        />
        <van-field
          v-model="dialysisPrescription.oxygen_time"
          @focus="inputFocus"
          v-if="isShow('吸氧') && oxygenShow == true"
          label="吸氧时长(h）"
          input-align="right"
          :required="isShow_title('吸氧')&& oxygenShow == true"
        />
        <van-collapse-item v-if="isShow('透析管路')" title="透析管路" name="20">
          <template slot="title">
            <div><span v-if="isShow_title('透析管路')" class="warn_tip">*</span>透析管路</div>
          </template>
          <template #value>
            <div>
              {{
                getHemodialysisPipelines(
                  dialysisPrescription.hemodialysis_pipelines
                )
              }}
            </div>
          </template>
          <van-radio-group
            v-model="dialysisPrescription.hemodialysis_pipelines"
          >
            <van-radio name="-2" key="-2">请选择</van-radio>
            <van-radio
              :name="item.name"
              v-for="(item, index) in hemodialysisPipelinesOptions"
              :key="index"
              >{{ item.name }}</van-radio
            >
          </van-radio-group>
        </van-collapse-item>
        <van-field
          v-model="dialysisPrescription.hemodialysis_pipelines_count"
          @focus="inputFocus"
          :formatter="formatter"
          type="number"
          v-if="isShow('透析管路支数')"
          label="透析管路支数"
          input-align="right"
          :required="isShow_title('透析管路支数')"
        />
        <van-collapse-item
          v-if="isShow('穿刺针')"
          title="穿刺针"
          name="puncture_needle"
        >
        <template slot="title">
            <div><span v-if="isShow_title('穿刺针')" class="warn_tip">*</span>穿刺针</div>
          </template>
          <template #value>
            <div>{{ dialysisPrescription.puncture_needle }}</div>
          </template>

          <checkBoxMenu
            v-if="checkBoxShow"
            v-on:menu-comfirm="getString"
            :propsForm="propForm"
          ></checkBoxMenu>
        </van-collapse-item>
        <van-field
          v-model="dialysisPrescription.puncture_needle_count"
          @focus="inputFocus"
          :formatter="formatter"
          type="number"
          v-if="isShow('穿刺针支数')"
          label="穿刺针支数"
          input-align="right"
          :required="isShow_title('穿刺针支数')"
        />
        <van-collapse-item v-if="isShow('促红素')" title="促红素" name="22">
          <template slot="title">
            <div><span v-if="isShow_title('促红素')" class="warn_tip">*</span>促红素</div>
          </template>
          <template #value>
            <div>{{ getEPO(dialysisPrescription.epo) }}</div>
          </template>
          <van-radio-group v-model="dialysisPrescription.epo">
            <van-radio name="-2" key="-2">请选择</van-radio>
            <van-radio
              :name="item.name"
              v-for="(item, index) in epoOptions"
              :key="index"
              >{{ item.name }}</van-radio
            >
          </van-radio-group>
        </van-collapse-item>
        <van-field
          v-model="dialysisPrescription.epo_count"
          @focus="inputFocus"
          :formatter="formatter"
          type="number"
          v-if="isShow('促红素支数')"
          label="促红素支数"
          input-align="right"
          :required="isShow_title('促红素支数')"
        />
        <van-field
          v-model="dialysisPrescription.max_ultrafiltration_rate"
          rows="1"
          autosize
          label="最大超滤率(ml/h)"
          v-if="isShow('最大超滤率')"
          type="textarea"
          input-align="right"
          :required="isShow_title('最大超滤率')"
        />
        <van-collapse-item v-if="isShow('处方医生')" title="处方医生" name="5">
          <template slot="title">
                  <div><span v-if="isShow_title('处方医生')" class="warn_tip">*</span>处方医生</div>
                  </template>
          <template #value>
            <div v-if="admin_map[dialysisPrescription.admin_user_id]">
              {{ admin_map[dialysisPrescription.admin_user_id].name }}
            </div>
          </template>
          <van-radio-group v-model="dialysisPrescription.admin_user_id">
            <van-radio name="-2" key="-2">请选择</van-radio>
            <van-radio
              :name="item.id"
              v-for="(item, index) in admins"
              :key="index"
              v-if="item.status == 1"
              >{{ item.name }}</van-radio
            >
          </van-radio-group>
        </van-collapse-item>

        <van-collapse-item v-if="isShow('带水上机')" title="带水上机" name="52">
          <template slot="title">
            <div><span v-if="isShow_title('带水上机')" class="warn_tip">*</span>带水上机</div>
          </template>
          <template #value>
            <div>{{ dialysisPrescription.water_machine }}</div>
          </template>
          <van-radio-group v-model="dialysisPrescription.water_machine">
            <van-radio name="请选择" key="-2">请选择</van-radio>
            <van-radio
              :name="item.name"
              v-for="(item, index) in machineList"
              :key="index"
              >{{ item.name }}</van-radio
            >
          </van-radio-group>
        </van-collapse-item>

        <van-field v-model="dialysisPrescription.prescription_sodium" @focus="inputFocus" v-if="isShow('处方钠')" label="处方钠" input-align="right"/>
         <van-field v-model="dialysisPrescription.start_sodium" @focus="inputFocus" v-if="isShow('开始钠')" label="开始钠" input-align="right"/>
         <van-field v-model="dialysisPrescription.sodium_curve" @focus="inputFocus" v-if="isShow('钠曲线')" label="钠曲线" input-align="right"/>

         <van-field v-model="dialysisPrescription.dialysis_fluid_flow" @focus="inputFocus" v-if="isShow('透析液流速')" label="透析液流速(ml/h)" input-align="right"/>
         <van-field v-model="dialysisPrescription.sodium_bicarbonate_flow" @focus="inputFocus" v-if="isShow('碳酸氢钠流速')" label="碳酸氢钠流速(ml/h)" input-align="right"/>


         <van-collapse-item
          v-if="isShow('透析液')"
          title="透析液"
          name="52"
        >
        <template slot="title">
          <div><span v-if="isShow_title('透析液')" class="warn_tip">*</span>透析液</div>
        </template>
          <template #value>
            <div>{{ dialysisPrescription.dialyzate }}</div>
          </template>
          <van-radio-group
            v-model="dialysisPrescription.dialyzate"
            @change="radioChange"
          >
            <van-radio name="请选择" key="-2">请选择</van-radio>
            <van-radio
              :name="item.name"
              v-for="(item, index) in dialyzateList"
              :key="index"
              >{{ item.name }}</van-radio
            >
          </van-radio-group>
        </van-collapse-item>


         <van-cell title='透析备注' v-if="isShow('透析备注') && (dialysisPrescription.mode_id == 2 || dialysisPrescription.mode_id == 3 || dialysisPrescription.mode_id == 4)" @click="teachShow = true" is-link value="请选择"></van-cell>
          <van-popup v-model="teachShow" get-container="#app" class="listBoxPopup newListBoxPopupApp" style="z-index:5000">
              <div class="listBox">
                  <div @click="toTeach('')">请选择</div>
                  <div v-for="(item,index) in teachList" :key="index" @click="toTeach(item.id)">{{ item.text }}</div>
              </div>
          </van-popup>

          <van-field class="bgField" v-if="isShow('透析备注') && (dialysisPrescription.mode_id == 2 || dialysisPrescription.mode_id == 3 || dialysisPrescription.mode_id == 4)" v-model="dialysisPrescription.dialysis_remark" rows="1" autosize type="textarea" placeholder="请输入"/>

          <van-field class="bgField"   label="病情处理"  v-if="isShow('病情处理')" v-model="dialysisPrescription.treatment_remark" rows="1" autosize type="textarea" placeholder="请输入"/>
          <van-field v-model="dialysisPrescription.chaptalization" @focus="inputFocus" v-if="isShow('加糖')" label="加糖" input-align="right"/>
      </van-collapse>

      <van-field
        v-model="dialysisPrescription.remark"
        @focus="inputFocus"
        :formatter="formatter"
        label="备注"
        input-align="right"
        :required="isShow_title('备注')"
      />
    </div>

    <div class="preserveBox">
      <div @click="commitSolutionInfo" v-if="isPermission() && hasPermission">
        保存为长期透析处方
      </div>
      <div @click="commitInfo" v-if="hasPermission">保存</div>
    </div>

    <mt-datetime-picker
      class="datetimePicker"
      ref="picker"
      type="time"
      hourFormat="{value}小时"
      minuteFormat="{value}分钟"
      @confirm="handleTimeConfirm"
      v-model="time"
    ></mt-datetime-picker>
    <mt-datetime-picker
      class="datetimePicker"
      ref="anticoagulant_picker"
      type="time"
      hourFormat="{value}小时"
      minuteFormat="{value}分钟"
      @confirm="handleAnticoagulantTimeConfirm"
      v-model="anticoagulant_time"
    ></mt-datetime-picker>
    <van-popup
      v-model="advice_visibility"
      class="advicePopup"
      get-container="#today_panel"
    >
      <long-advice-sub-menu
        :visibility="advice_visibility"
        v-on:menu-cancle-three="menuCancleThree"
        v-on:menu-comfirm-three="menuComfirmThree"
        :propsForm="advicePropForm"
        :predialysis="predialysis"
      ></long-advice-sub-menu>


    </van-popup>

     <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"
      :propsForm="advicePropForm"
      :predialysis='predialysis'
      >
     </infor-sub-menu>



    </van-popup>
  </div>
</template>

<script>
import { getDataConfig } from "@/utils/data";
import { calculateAnticoagulantZL, replacementFlow } from "@/utils/tools";
import LongAdviceSubMenu from "../dialog/subMenu/LongAdviceSubMenu";
import InforSubMenu from "../dialog/subMenu/InforSubMenu.vue"
import {
  commitDialysisPrescription,
  CreateGroupAdvice,
  GetSolution,
  postSign,
  postSolution,
  saveMobileInformation
} from "@/api/dialysis";
import { Toast } from "vant";
import { Dialog } from "vant";
// import {  } from 'vant';
import { parseTime } from "@/utils";
import request from "@/utils/request";
import checkBoxMenu from "./components/checkBoxMenu";
export default {
  props: {
    admin_users_prop: {
      type: Array,
      default: function () {
        return new Array();
      },
    },
    system_prescription: {
      type: Object,
    },
    predialysis: {
      type: Object,
    },
    last_predialysis: {
      type: Object,
    },
    record: {
      type: Object,
    },
    last_record: {
      type: Object,
    },
    patient_prop: {
      type: Object,
    },
    solution_prop: {
      type: Object,
    },
    config: {
      type: Object,
    },
    schedual: {
      type: Object,
    },
    dry_weight: {
      type: Object,
    },
    operators: {
      type: Array,
      default: function () {
        return new Array();
      },
    },
    types: {
      type: Array,
      default: function () {
        return new Array();
      },
    },
    info: {
      type: Array,
      default: function () {
        return new Array();
      },
    },
    last_prescription: {
      type: Object,
    },
    lastDialysisPrescription:{
      type:Object,
    },
    prescription_prop: {
      type: Object,
    },
    is_open: {
      type: Number,
    },
    his_is_open: {
      type: Number,
    },
    prescription_open: {
      type: Number,
    },
    targetAdvices: {
      type: Array,
      default: function () {
        return new Array();
      },
    },
    waitUploadAdvices: {
      type: Array,
      default: function () {
        return new Array();
      },
    },
    machines_prop: {
      type: Array,
      default: function () {
        return new Array();
      },
    },
    stockType: {
      type: Array,
      default: function () {
        return new Array();
      },
    },
    admins: {
      type: Array,
    },
    admin_map: {
      type: Object,
    },
  },
  components: {
    LongAdviceSubMenu,
    checkBoxMenu,
    InforSubMenu
  },
  data() {
    return {
      showTxt: "",
      hasPermission: true,
      activeNames: "",
      modeOption: [],
      timeValue: "",

      dialysisPrescription: {
        mode_id: "",
        blood_flow_volume: "",
        pre_impulse: "",
        target_ultrafiltration: "",
        is_water: 0,
        single_time: "",
        single_water: "",
        drhy_water: "",
        dry_water_hour: "",
        replacement_flow: "",
        dialysate_formulation: "",
        antioxidant_commodity_name:'',
        no_heparin_remarks: "",
        heparin_sodium: "",
        nucleoprotamine: "",
        push_the_protamine: "",
        anticoagulant: "",
        anticoagulant_shouji: "",
        anticoagulant_weichi: "",
        anticoagulant_zongliang: "",
        anticoagulant_gaimingcheng: "",
        anticoagulant_gaijiliang: "",
        replacement_total: "",
        kalium: "",
        sodium: "",
        calcium: "",
        bicarbonate: "",
        glucose: "",
        dialysate_flow: "",
        dialysate_temperature: "",
        conductivity: "0",
        dialyzer_perfusion_apparatus: "",
        dialysis_dialyszers: "",
        dialysis_irrigation: "",
        plasma_separator: "",
        bilirubin_adsorption_column: "",
        body_fluid: "",
        body_fluid_other: "",
        special_medicine: "",
        special_medicine_other: "",
        displace_liqui_part: "",
        displace_liqui_value: "",
        displace_speed: "",
        target_ktv: "",
        blood_access: "",
        illness: "",
        amylaceum: "",
        oxygen_uptake: "",
        oxygen_flow: "",
        oxygen_time: "",
        hemodialysis_pipelines: "",
        hemodialysis_pipelines_count: "",
        puncture_needle: "",
        puncture_needle_count: "",
        epo: "",
        epo_count: "",
        max_ultrafiltration_rate: "",
        admin_user_id: this.$store.getters.user.admin.id,
        water_machine: "否",
        remark: "",//
        dialysis_duration: "",
        dialysis_duration_hour: "",
        dialysis_duration_minute: "",
        mode_name: "",
        dialyzer: "",
        perfusion_apparatus: "",

        dewater_amount: "",
        displace_liqui: "",

        replacement_way: "",
        no_anticoagulant_shouji: "0",
        no_anticoagulant_weichi: "0",
        no_anticoagulant_zongliang: "0",

        anticoagulant_stop_time_hour: "",
        anticoagulant_stop_time_min: "",

        prescription_doctor: "",
        // dry_weight: "",
        doctor: "",
        ultrafiltration: "",
        niprocart: "",
        jms: "",
        fistula_needle_set: "",
        fistula_needle_set_16: "",
        hemoperfusion: "",
        dialyser_sterilised: "",
        filtryzer: "",
        dialyzers: "",
        // injector: "",
        bloodlines: "",
        tubing_hemodialysis: "",
        package: "",
        a_liquid: "",
        creater: "",
        modifier: "",
        blood: "",
        dialysis_remark:'',
        prescribing_number: '',
        treatment_remark: '',
        prescription_sodium: '',
        start_sodium: '',
        sodium_curve: '',
        dialysis_fluid_flow: '',
        sodium_bicarbonate_flow: '',
        prescription_water: '',
        dialysis_strainer: '',
        chaptalization:"",
        washing_time:"",
        warsh_count:"",
        blood_access_part_id:"",
        anticoagulant_weichi_hour:"",
        dialyzate:"",
        dialysis_dialyszers_id:0,
        dialysis_strainer_id:0,
        dialysis_irrigation_id:0,
        first_super:0,
        is_sequential:0,
        conduct:""
      },
      anticoagulant: {
        id: 0,
        name: "",
        type: 1,
        shouji: 1,
        weichi: 1,
        zongliang: 1,
        gaimingcheng: -1,
        gaijiliang: -1,
        shouji_unit: "mg",
        weichi_unit: "mg/h",
        zongliang_unit: "mg",
        gaimingcheng_unit: "",
        gaijiliang_unit: "",
      },
      dialysateFormulationOptions: [],
      anticoagulantsConfit: [],
      dialyzerPerfusionApparatus: [],
      dialysisDialyszers: [],
      dialysisIrrigation: [],
      dialysisStrainerList: [],
      bodyFluidOptions: [],
      specialMedicineOptions: [],
      displaceLiquiPartOptions: [],
      anticoagulantTimeValue: "",
      anticoagulant_time: "00:00",
      advice_visibility: false,
      advicePropForm: {
        list: [],
        result: [],
        operators: [],
        sch: this.schedual,
      },
      changePrescription: 0,
      illnessList: [],
      propForm: {
        title: "",
        list: [],
        optionList: [],
        isMultiple: 2,
        result: [], // 选中的值
        type: 1, // 用来区分不同子菜单，方便对返回值进行赋值
        selectId: 0,
        isHasOther: 1, // 是否有其他选项  1是 2否
      },
      checkBoxShow: false,
      plasmaSeparatorList: [],
      bilirubinAdsorptionColumn: [],
      oxygenShow: false,

      hemodialysisPipelinesOptions: [],
      punctureNeedleOptions: [],
      epoOptions: [],
      zhiShow: true,
      totalShow: true,
      huShow: true,
      waterList: [
        { id: 1, name: "是" },
        { id: 2, name: "否" },
      ],
      waterListOne: [
        { id: 1, name: "是" },
        { id: 2, name: "否" },
      ],
      waterListTwo: [
        { id: 1, name: "是" },
        { id: 2, name: "否" },
      ],
      dialyzateList:[
         {id:1,name:"碳酸"},
         {id:2,name:"醋酸"}
      ],
      machineList: [
        { id: 1, name: "是" },
        { id: 2, name: "否" },
      ],
      infor_visibility:false,
      teachShow: false,
      teachList: []
    };
  },
  computed: {
    newDialysisPrescription() {
      return JSON.parse(JSON.stringify(this.dialysisPrescription));
    },
  },
  created() {
    console.log("wo'wo'o'o'o'o'o'o'o'o'o'o'o'o'o'o'o'o'o",this.lastDialysisPrescription)
    console.log("hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh",this.solution_prop)
    this.teachList = getDataConfig('dialysis_remark', 'dialysis_remark')
    if (this.prescription_prop != undefined) {
      if (this.prescription_prop.anticoagulant == 1) {
        this.prescription_prop.anticoagulant_shouji = "";
        this.prescription_prop.anticoagulant_zongliang = "";
        this.prescription_prop.anticoagulant_weichi = "";
      }
    }

    this.modeOption = this.$store.getters.treatment_mode;
    this.template_id = this.$store.getters.user.template_info.template_id;
    this.dialysateFormulationOptions = getDataConfig(
      "hemodialysis",
      "dialysate_formulation"
    );
    this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit;
    this.anticoagulantsConfitTwo = this.$store.getters.anticoagulants_confit;
    this.hemodialysisPipelinesOptions = getDataConfig(
      "hemodialysis",
      "hemodialysis_pipelines"
    );
    this.punctureNeedleOptions = getDataConfig(
      "hemodialysis",
      "puncture_needle"
    );
    this.epoOptions = getDataConfig("hemodialysis", "epo");

    this.dialyzerPerfusionApparatus = getDataConfig(
      "hemodialysis",
      "dialyzer_perfusion_apparatus"
    );

    this.illnessList = getDataConfig("hemodialysis", "illness");

  var arr = []
  var arrTwo = []
  var arrThree = []
  var dialyzer = []
  var irrigation = []
  var dialysisStrainer = []
  if (this.stockType.length > 0) {
    for (let i = 0; i < this.stockType.length; i++) {
      if (this.stockType[i].stock_attribute == 2) {
        arr.push(this.stockType[i])
      }
      if (this.stockType[i].stock_attribute == 3) {
        arrTwo.push(this.stockType[i])
      }
      if (this.stockType[i].stock_attribute == 4) {
        arrThree.push(this.stockType[i])
      }
    }

    for (let i = 0; i < arr.length; i++) {
      for (let j = 0; j < arr[i].GoodInfo.length; j++) {
        dialyzer.push(arr[i].GoodInfo[j])
      }
    }

    for (let i = 0; i < arrTwo.length; i++) {
      for (let j = 0; j < arrTwo[i].GoodInfo.length; j++) {
        irrigation.push(arrTwo[i].GoodInfo[j])
      }
    }
    for (let i = 0; i < arrThree.length; i++) {
      for (let j = 0; j < arrThree[i].GoodInfo.length; j++) {
        dialysisStrainer.push(arrThree[i].GoodInfo[j])
      }
    }

    this.dialysisDialyszers = dialyzer
    this.dialysisIrrigation = irrigation
    this.dialysisStrainerList = dialysisStrainer
    console.log("透析器列表-----------------------",this.dialysisDialyszers)
    console.log("灌流器列表-----------------------",this.dialysisIrrigation)
    console.log("滤过器列表=-----------==---------",this.dialysisStrainerList)
    }
    this.bodyFluidOptions = this.$store.getters.body_fluid;
    var special_medicine = [
      { id: 1, name: "无" },
      { id: 2, name: "降压药" },
      { id: 3, name: "抗凝" },
      { id: 4, name: "其他" },
      { id: 5, name: "降糖药" },
    ];
    this.specialMedicineOptions = special_medicine;
    this.displaceLiquiPartOptions = this.$store.getters.displace_liqui;

    this.bloodAccessOptions = getDataConfig(
      "hemodialysis",
      "vascular_access_desc"
    );
    // console.log("血管通路22323232323322323232332",this.bloodAccessOptions)
    this.bloods = getDataConfig("hemodialysis", "blood");
    this.plasmaSeparatorList = getDataConfig(
      "hemodialysis",
      "plasma_separator"
    );
    this.bilirubinAdsorptionColumn = getDataConfig(
      "hemodialysis",
      "bilirubin_adsorption_column"
    );
    if (
      this.prescription_prop != null &&
      typeof this.prescription_prop.id !== "undefined" &&
      this.prescription_prop.id > 0
    ) {
      for (const key in this.prescription_prop) {
        this.dialysisPrescription[key] = this.prescription_prop[key];
      }
    } else if (
      this.solution_prop != null &&
      typeof this.solution_prop.id !== "undefined" &&
      this.solution_prop.id
    ) {
      for (const key in this.solution_prop) {
        if (key != "target_ultrafiltration") {
          this.dialysisPrescription[key] = this.solution_prop[key];
        }
      }
    } else if (
      this.last_prescription != null &&
      typeof this.last_prescription.id !== "undefined" &&
      this.last_prescription.id
    ) {
      for (const key in this.last_prescription) {
        if (key != "target_ultrafiltration") {
          this.dialysisPrescription[key] = this.last_prescription[key];
        }
      }
    } else if (
      this.system_prescription != null &&
      typeof this.system_prescription.id !== "undefined" &&
      this.system_prescription.id
    ) {
      for (const key in this.system_prescription) {
        if (key != "target_ultrafiltration") {
          this.dialysisPrescription[key] = this.system_prescription[key];
        }
      }
    } else {
      this.dialysisPrescription.mode_id = this.schedual.mode_id;
    }

    if (
      this.dialysisPrescription.dialysis_duration_hour.length == 0 ||
      this.dialysisPrescription.dialysis_duration_minute.length == 0
    ) {
      this.timeValue = "";
      this.time = "03:00";
      this.dialysisPrescription.dialysis_duration = 3;
    } else {
      this.timeValue =
        this.dialysisPrescription.dialysis_duration_hour +
        "小时" +
        this.dialysisPrescription.dialysis_duration_minute +
        "分钟";
      this.time =
        (this.dialysisPrescription.dialysis_duration_hour > 10
          ? this.dialysisPrescription.dialysis_duration_hour
          : "0" + this.dialysisPrescription.dialysis_duration_hour) +
        ":" +
        (this.dialysisPrescription.dialysis_duration_minute > 10
          ? this.dialysisPrescription.dialysis_duration_minute
          : "0" + this.dialysisPrescription.dialysis_duration_minute);

      this.dialysisPrescription.dialysis_duration =
        parseFloat(this.dialysisPrescription.dialysis_duration_hour) +
        parseFloat(
          (this.dialysisPrescription.dialysis_duration_minute / 60).toFixed(2)
        );
    }

    if (
      this.dialysisPrescription.anticoagulant_stop_time_hour.length == 0 ||
      this.dialysisPrescription.anticoagulant_stop_time_min.length == 0
    ) {
      this.anticoagulantTimeValue = "";
    } else {
      this.anticoagulantTimeValue =
        this.dialysisPrescription.anticoagulant_stop_time_hour +
        "小时" +
        this.dialysisPrescription.anticoagulant_stop_time_min +
        "分钟";
      this.anticoagulant_time =
        (this.dialysisPrescription.anticoagulant_stop_time_hour > 10
          ? this.dialysisPrescription.anticoagulant_stop_time_hour
          : "0" + this.dialysisPrescription.anticoagulant_stop_time_hour) +
        ":" +
        (this.dialysisPrescription.anticoagulant_stop_time_min > 10
          ? this.dialysisPrescription.anticoagulant_stop_time_min
          : "0" + this.dialysisPrescription.anticoagulant_stop_time_min);
    }
    if (this.$route.query && this.$route.query.date) {
      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();
      if (isNaN(y) || isNaN(m) || isNaN(d)) {
        newDate = new Date();
        y = newDate.getFullYear();
        m = newDate.getMonth() + 1;
        d = newDate.getDate();
      }
      this.record_date =
        y + "-" + (m < 10 ? "0" + m : m) + "-" + (d < 10 ? "0" + d : d);
    } else {
      var date = this.schedual.schedule_date;
      date *= 1000;
      var newDate = new Date(date);

      var y = newDate.getFullYear();
      var m = newDate.getMonth() + 1;
      var d = newDate.getDate();
      if (isNaN(y) || isNaN(m) || isNaN(d)) {
        newDate = new Date();
        y = newDate.getFullYear();
        m = newDate.getMonth() + 1;
        d = newDate.getDate();
      }
      this.record_date =
        y + "-" + (m < 10 ? "0" + m : m) + "-" + (d < 10 ? "0" + d : d);
    }

    // this.patient.id = this.patient_prop.id

    this.dialysisPrescription.kalium = this.getFloat(
      this.dialysisPrescription.kalium
    );
    this.dialysisPrescription.sodium = this.getFloat(
      this.dialysisPrescription.sodium
    );
    console.log("机哪里了232332", this.prescription_prop);
    if (this.prescription_prop != undefined && this.prescription_prop.id == 0) {
      console.log("jinlai22222");
      if (this.$store.getters.user.template_info.org_id == 9671 ||this.$store.getters.user.template_info.org_id == 9675 ||this.$store.getters.user.template_info.org_id == 10340 || this.$store.getters.user.template_info.org_id == 10600) {
        this.dialysisPrescription.sodium = 138;
        this.dialysisPrescription.bicarbonate = 31.1;
        this.dialysisPrescription.dialysate_flow = 500;
        this.dialysisPrescription.dialysate_temperature = 36.5

        console.log("hhh23h32h23h", this.last_prescription);
        if (this.last_prescription != null) {
          this.dialysisPrescription.remark = this.last_prescription.remark;
          this.dialysisPrescription.chaptalization = this.last_prescription.chaptalization
        }
      }


      if(this.$store.getters.user.template_info.org_id == 10558 || this.$store.getters.user.template_info.org_id == 10622 || this.$store.getters.user.template_info.org_id ==10683){
        if(this.predialysis!=undefined){
          if(this.dialysisPrescription.target_ultrafiltration==0 || this.dialysisPrescription.target_ultrafiltration==""){
            this.dialysisPrescription.target_ultrafiltration = this.predialysis.weight_before - this.predialysis.dry_weight
          }
        }

      }


      //针对揭阳
      if(this.$store.getters.user.template_info.org_id == 10597 || this.$store.getters.user.template_info.org_id == 10679 || this.$store.getters.user.template_info.org_id == 10702 || this.$store.getters.user.template_info.org_id == 10635 || this.$store.getters.user.template_info.org_id == 10721|| this.$store.getters.user.template_info.org_id == 10742 || this.$store.getters.user.template_info.org_id == 10751|| this.$store.getters.user.template_info.org_id == 10752 || this.$store.getters.user.template_info.org_id == 10757){
        if(this.predialysis!=undefined){
          if(this.$store.getters.user.template_info.org_id == 10702 || this.$store.getters.user.template_info.org_id == 10752 ){
            if(this.dialysisPrescription.target_ultrafiltration==0 || this.dialysisPrescription.target_ultrafiltration==""){
              this.dialysisPrescription.target_ultrafiltration = (this.predialysis.weight_before - this.predialysis.dry_weight - this.predialysis.additional_weight).toFixed(2)
            }
           
            if(this.dialysisPrescription.prescription_water==0 || this.dialysisPrescription.prescription_water==""){
              this.dialysisPrescription.prescription_water = (this.predialysis.weight_before - this.predialysis.dry_weight - this.predialysis.additional_weight).toFixed(2)
            }
            console.log("hahhahahahhah",this.dialysisPrescription.prescription_water)
          }else if(this.$store.getters.user.template_info.org_id == 10635){
            if(this.dialysisPrescription.target_ultrafiltration==0 || this.dialysisPrescription.target_ultrafiltration==""){
              this.dialysisPrescription.target_ultrafiltration = (this.predialysis.weight_before - this.predialysis.dry_weight - this.predialysis.additional_weight).toFixed(2)
            }
           
            if(this.dialysisPrescription.prescription_water==0 || this.dialysisPrescription.prescription_water==""){
              this.dialysisPrescription.prescription_water = (this.predialysis.weight_before - this.predialysis.dry_weight - this.predialysis.additional_weight).toFixed(2)
            }
          }else if(this.$store.getters.user.template_info.org_id == 10721){
            if(this.dialysisPrescription.target_ultrafiltration<=0 || this.dialysisPrescription.target_ultrafiltration==""){
              this.dialysisPrescription.target_ultrafiltration = (this.predialysis.weight_before - this.predialysis.dry_weight - this.predialysis.additional_weight).toFixed(2)
            }
           
            if(this.dialysisPrescription.prescription_water<=0 || this.dialysisPrescription.prescription_water==""){
              this.dialysisPrescription.prescription_water = (this.predialysis.weight_before - this.predialysis.dry_weight - this.predialysis.additional_weight).toFixed(2)
            }
          }else if(this.$store.getters.user.template_info.org_id == 10727){
            if(this.dialysisPrescription.target_ultrafiltration<=0 || this.dialysisPrescription.target_ultrafiltration==""){
              this.dialysisPrescription.target_ultrafiltration = ((this.predialysis.weight_before - this.predialysis.dry_weight - this.predialysis.additional_weight).toFixed(0))*1000
            }
          }else if(this.$store.getters.user.template_info.org_id == 10751){
            if(this.dialysisPrescription.target_ultrafiltration<=0 || this.dialysisPrescription.target_ultrafiltration==""){
              this.dialysisPrescription.target_ultrafiltration = ((this.predialysis.weight_before - this.predialysis.dry_weight - this.predialysis.additional_weight).toFixed(0))*1000
            }

            if(this.dialysisPrescription.prescription_water<=0 || this.dialysisPrescription.prescription_water==""){
              this.dialysisPrescription.prescription_water = ((this.predialysis.weight_before - this.predialysis.dry_weight - this.predialysis.additional_weight).toFixed(0))*1000
            }
          }else if(this.$store.getters.user.template_info.org_id == 10164){
            if(this.dialysisPrescription.target_ultrafiltration<=0 || this.dialysisPrescription.target_ultrafiltration==""){
              this.dialysisPrescription.target_ultrafiltration = (this.predialysis.weight_before - this.predialysis.dry_weight - this.predialysis.additional_weight)*1000
            }
          }else if(this.$store.getters.user.template_info.org_id == 10742){
            if(this.dialysisPrescription.target_ultrafiltration<=0 || this.dialysisPrescription.target_ultrafiltration==""){
              this.dialysisPrescription.target_ultrafiltration = (this.predialysis.weight_before - this.predialysis.dry_weight - this.predialysis.additional_weight)
            }
            if(this.dialysisPrescription.prescription_water<=0 || this.dialysisPrescription.prescription_water==""){
              this.dialysisPrescription.prescription_water = (this.predialysis.weight_before - this.predialysis.dry_weight - this.predialysis.additional_weight).toFixed(2)
            }
          }else if(this.$store.getters.user.template_info.org_id == 10757){
            if(this.dialysisPrescription.target_ultrafiltration<=0 || this.dialysisPrescription.target_ultrafiltration==""){
              this.dialysisPrescription.target_ultrafiltration = (this.predialysis.weight_before - this.predialysis.dry_weight - this.predialysis.additional_weight)
            }
            if(this.dialysisPrescription.prescription_water<=0 || this.dialysisPrescription.prescription_water==""){
              this.dialysisPrescription.prescription_water = (this.predialysis.weight_before - this.predialysis.dry_weight - this.predialysis.additional_weight).toFixed(2)
            }
          } else{
            if(this.dialysisPrescription.target_ultrafiltration==0 || this.dialysisPrescription.target_ultrafiltration==""){
              this.dialysisPrescription.target_ultrafiltration = this.predialysis.weight_before - this.predialysis.dry_weight
            }
            console.log("hahhahahahhah",this.dialysisPrescription.prescription_water)
            if(this.dialysisPrescription.prescription_water==0 || this.dialysisPrescription.prescription_water==""){
              this.dialysisPrescription.prescription_water = this.predialysis.weight_before - this.predialysis.dry_weight
            }
          }
         
        }
      }



      //针对北方营口
      console.log("org_idwpwpwpwppw",this.$store.getters.user.template_info.org_id )
      if(this.$store.getters.user.template_info.org_id == 10445){
        if(this.lastDialysisPrescription!=undefined){
           this.dialysisPrescription.remark = this.lastDialysisPrescription.remark

        }
      }

      if(this.$store.getters.user.template_info.org_id == 10579 || this.$store.getters.user.template_info.org_id == 10587 ||  this.$store.getters.user.template_info.org_id == 10740 || this.$store.getters.user.template_info.org_id == 10742 || this.$store.getters.user.template_info.org_id == 10745 || this.$store.getters.user.template_info.org_id == 10742){
        console.log("进来2噢噢噢哦",this.lastDialysisPrescription.blood_access_part_id)
        if(this.lastDialysisPrescription!=undefined){

           this.dialysisPrescription.blood_access_part_id = this.lastDialysisPrescription.blood_access_part_id
        }
      }
    }else{
      if(this.$store.getters.user.template_info.org_id == 10702 ||  this.$store.getters.user.template_info.org_id == 10635 || this.$store.getters.user.template_info.org_id==10721 ||  this.$store.getters.user.template_info.org_id == 10740 || this.$store.getters.user.template_info.org_id == 10742  || this.$store.getters.user.template_info.org_id == 10745 || this.$store.getters.user.template_info.org_id == 10752){
        console.log("康桥this.dialysisPrescription",this.dialysisPrescription.prescription_water)
        if(this.dialysisPrescription.prescription_water<=0 || this.dialysisPrescription.prescription_water==""){
            this.dialysisPrescription.prescription_water = (this.predialysis.weight_before - this.predialysis.dry_weight - this.predialysis.additional_weight).toFixed(2)
          }
        if(this.dialysisPrescription.target_ultrafiltration<=0 || this.dialysisPrescription.target_ultrafiltration==""){
            this.dialysisPrescription.target_ultrafiltration = (this.predialysis.weight_before - this.predialysis.dry_weight - this.predialysis.additional_weight).toFixed(2)
        }
      }

      
    }



    if(this.$store.getters.user.template_info.org_id==10579){
        console.log("hhahhahha",this.prescription_prop)
        if(this.prescription_prop != undefined && this.prescription_prop.id == 0){
          this.dialysisPrescription.admin_user_id = this.$store.getters.user.admin.id
        }


        if(this.prescription_prop != undefined && this.prescription_prop.id > 0){
          this.dialysisPrescription.admin_user_id = this.prescription_prop.modifier
        }
    }


    this.dialysisPrescription.calcium = this.getFloat(
      this.dialysisPrescription.calcium
    );
    this.dialysisPrescription.ultrafiltration = this.getFloat(
      this.dialysisPrescription.ultrafiltration
    );
    this.dialysisPrescription.target_ultrafiltration = this.getFloat(
      this.dialysisPrescription.target_ultrafiltration
    );

    if (this.dialysisPrescription.anticoagulant_shouji == "") {
      this.dialysisPrescription.anticoagulant_shouji = "0";
    }

    if (this.dialysisPrescription.anticoagulant_weichi == "") {
      this.dialysisPrescription.anticoagulant_weichi = "0";
    }

    if (this.dialysisPrescription.anticoagulant_zongliang == "") {
      this.dialysisPrescription.anticoagulant_weichi = "0";
    }

    if (this.dialysisPrescription != null) {
      if (this.dialysisPrescription.oxygen_uptake == 1) {
        this.oxygenShow = true;
      }
      if (this.dialysisPrescription.oxygen_uptake == 2) {
        this.oxygenShow = false;
        this.dialysisPrescription.oxygen_flow = "";
        this.dialysisPrescription.oxygen_time = "";
      }
      if (this.dialysisPrescription.is_water == 1) {
        this.dialysisPrescription.is_water = "是";
      }
      if (this.dialysisPrescription.is_water == 2) {
        this.dialysisPrescription.is_water = "否";
      }
      if (this.dialysisPrescription.is_water == 0) {
        this.dialysisPrescription.is_water = "请选择";
      }

      if (this.dialysisPrescription.first_super == 1) {
        this.dialysisPrescription.first_super = "是";
      }
      if (this.dialysisPrescription.first_super == 2) {
        this.dialysisPrescription.first_super = "否";
      }
      if (this.dialysisPrescription.first_super == 0) {
        this.dialysisPrescription.first_super = "请选择";
      }

      if (this.dialysisPrescription.is_sequential == 1) {
        this.dialysisPrescription.is_sequential = "是";
      }
      if (this.dialysisPrescription.is_sequential == 2) {
        this.dialysisPrescription.is_sequential = "否";
      }
      if (this.dialysisPrescription.is_sequential == 0) {
        this.dialysisPrescription.is_sequential = "请选择";
      }
    }


  },
  methods: {
  
    radioChange(val) {},

    formatter(val) {
      return val.replace(/\-/g, "");
    },
    getIllness(id) {
      var name = "";
      for (let i = 0; i < this.illnessList.length; i++) {
        if (id == this.illnessList[i].id) {
          name = this.illnessList[i].name;
        }
      }
      return name;
    },

    inputFocus: function (event) {
      var input = event.target;
      setTimeout(function () {
        input.scrollIntoView();
      }, 0);

      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();
      }
    },
    isPermission() {
      if (
        this.$store.getters.user.user.user_type == 3 &&
        (this.$store.getters.user.template_info.template_id == 2 ||
          this.$store.getters.user.template_info.template_id == 6)
      ) {
        return false;
      } else {
        return true;
      }
    },

    menuCancleThree: function () {
      this.advice_visibility = false;
    },

    getFloat: function (x) {
      if (x != ".") {
        var f = Math.round(x * 100) / 100;
        var s = f.toString();
        var rs = s.indexOf(".");
        if (rs <= 0) {
          rs = s.length;
          s += ".";
        }
        while (s.length <= rs + 1) {
          s += "0";
        }
        return s;
      } else {
        return "0.0";
      }
    },

    isShow(name) {
      var filedList = this.$store.getters.user.fileds;
      // console.log(filedList)

      for (let i = 0; i < filedList.length; i++) {
        if (
          filedList[i].module == 1 &&
          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;
      // console.log(filedList)

      for (let i = 0; i < filedList.length; i++) {
        if (
          filedList[i].module == 1 &&
          filedList[i].filed_name_cn == name &&
          filedList[i].is_show == 1&&
          filedList[i].is_write == 1
        ) {
          return true;
        }
      }
      return false;
    },

    openPicker: function () {
      this.$refs.picker.open();
    },
    handleTimeConfirm: function (val) {
      val = val.replace("小时");
      val = val.replace("分钟");
      let timeArray = val.split(":");
      if (parseInt(timeArray[0].substring(0, 1)) == 0) {
        this.dialysisPrescription.dialysis_duration_hour = timeArray[0].charAt(
          timeArray[0].length - 1
        );
      } else {
        this.dialysisPrescription.dialysis_duration_hour = timeArray[0];
      }

      if (parseInt(timeArray[1].substring(0, 1)) == 0) {
        this.dialysisPrescription.dialysis_duration_minute =
          timeArray[1].charAt(timeArray[1].length - 1);
      } else {
        this.dialysisPrescription.dialysis_duration_minute = timeArray[1];
      }
      this.timeValue =
        this.dialysisPrescription.dialysis_duration_hour +
        "小时" +
        this.dialysisPrescription.dialysis_duration_minute +
        "分钟";

      this.dialysisPrescription.dialysis_duration =
        parseFloat(this.dialysisPrescription.dialysis_duration_hour) +
        parseFloat(
          (this.dialysisPrescription.dialysis_duration_minute / 60).toFixed(2)
        );
    },
    openAnticoagulantPicker: function () {
      this.$refs.anticoagulant_picker.open();
    },
    handleAnticoagulantTimeConfirm: function (val) {
      val = val.replace("小时");
      val = val.replace("分钟");
      let timeArray = val.split(":");
      if (parseInt(timeArray[0].substring(0, 1)) == 0) {
        this.dialysisPrescription.anticoagulant_stop_time_hour =
          timeArray[0].charAt(timeArray[0].length - 1);
      } else {
        this.dialysisPrescription.anticoagulant_stop_time_hour = timeArray[0];
      }

      if (parseInt(timeArray[1].substring(0, 1)) == 0) {
        this.dialysisPrescription.anticoagulant_stop_time_min =
          timeArray[1].charAt(timeArray[1].length - 1);
      } else {
        this.dialysisPrescription.anticoagulant_stop_time_min = timeArray[1];
      }
      this.anticoagulantTimeValue =
        this.dialysisPrescription.anticoagulant_stop_time_hour +
        "小时" +
        this.dialysisPrescription.anticoagulant_stop_time_min +
        "分钟";
    },
    getDialyzerPerfusionApparatus(val) {
      let dialyzer_perfusion_apparatus_name = "";
      let dialyzer_perfusion_apparatus = this.dialyzerPerfusionApparatus;
      for (let i = 0; i < dialyzer_perfusion_apparatus.length; i++) {
        if (dialyzer_perfusion_apparatus[i].name == val) {
          dialyzer_perfusion_apparatus_name =
            dialyzer_perfusion_apparatus[i].id;
        }
      }
      return dialyzer_perfusion_apparatus_name;
    },
    getDialysisDialyszers(val) {
      let dialysis_dialyszers_name = "";
      let dialysis_dialyszers = this.dialysisDialyszers;
      for (let i = 0; i < dialysis_dialyszers.length; i++) {
        if (dialysis_dialyszers[i].specification_name == val) {
          dialysis_dialyszers_name = dialysis_dialyszers[i].id;
        }
      }
      return dialysis_dialyszers_name;
    },
    getDialysisIrrigation(val) {
      let dialysis_irrigation_name = "";
      let dialysis_irrigation = this.dialysisIrrigation;
      for (let i = 0; i < dialysis_irrigation.length; i++) {
        if (dialysis_irrigation[i].specification_name == val) {
          dialysis_irrigation_name = dialysis_irrigation[i].id;
        }
      }
      return dialysis_irrigation_name;
    },
    getPlasmaSeparator(val) {
      let plasma_separator_name = "";
      let plasma_separator = this.plasmaSeparatorList;
      for (let i = 0; i < plasma_separator.length; i++) {
        if (plasma_separator[i].name == val) {
          plasma_separator_name = plasma_separator[i].id;
        }
      }
      return plasma_separator_name;
    },

  //   commitSolutionInfo: function () {
  //     if (this.his_is_open == 1) {
  //       this.is_open = 0;
  //     }
  //     if (this.$store.getters.user.template_info.template_id == 6) {
  //       if (this.dialysisPrescription.mode_id == 2) {
  //         if (
  //           this.dialysisPrescription.displace_liqui_part == 0 ||
  //           this.dialysisPrescription.displace_liqui_part == -2 ||
  //           this.dialysisPrescription.displace_liqui_value == 0 ||
  //           this.dialysisPrescription.displace_liqui_value == ""
  //         ) {
  //           Toast.fail("HDF模式下置换方式和置换液总量不能为空！");
  //           return;
  //         }
  //         if (
  //           this.dialysisPrescription.mode_id != 2 &&
  //           this.dialysisPrescription.mode_id != 5 &&
  //           this.dialysisPrescription.mode_id != 12
  //         ) {
  //           this.dialysisPrescription.displace_liqui_part = 0;
  //           this.dialysisPrescription.displace_liqui_value = 0;
  //         }
  //       }
  //     }
  //     this.is_pre = 2;

  //     if (this.prescription_prop.id == "") {
  //       if (this.is_open == 0) {
  //         var arr = this.dialysisPrescription;

  //         let ParamsQuery = arr;
  //         console.log("ParamsQueryOne", ParamsQuery);
  //         if (this.$route.query.patient_id) {
  //           ParamsQuery["patient"] = this.$route.query.patient_id;
  //         } else {
  //           ParamsQuery["patient"] = this.patient_prop.id;
  //         }
  //         ParamsQuery["record_date"] = this.record_date;
  //         ParamsQuery["mode"] = "1";

  //         // 必填弹窗开始
  //         console.log(ParamsQuery, "提交的参数");
  //         let newParams = ParamsQuery;
  //         if (newParams.anticoagulant == "1") {
  //           delete newParams.anticoagulant_shouji;
  //           delete newParams.anticoagulant_weichi;
  //           delete newParams.anticoagulant_zongliang;
  //         }
  //         if (newParams.oxygen_uptake == 2||newParams.oxygen_uptake == 0) {
  //           delete newParams.oxygen_time;
  //           delete newParams.oxygen_flow;
  //         }
  //         if (newParams.mode_id!=2 && newParams.mode_id!=5 && newParams.mode_id!= 12){
  //           delete newParams.replacement_total;
  //           delete newParams.displace_liqui_part;
  //           delete newParams.displace_liqui_value;
  //           delete newParams.displace_speed;
  //         }
  //         if(newParams.is_water != '是'){
  //           delete newParams.single_time;
  //           delete newParams.single_water;
  //         }
  //         if(newParams.anticoagulant != "1"){
  //           delete newParams.no_heparin_remarks;
  //         }
  //         if(newParams.anticoagulant != '10'){
  //           delete newParams.heparin_sodium;
  //           delete newParams.nucleoprotamine;
  //           delete newParams.push_the_protamine;
  //         }
  //         if(newParams.anticoagulant != '5'){
  //           delete newParams.anticoagulant_gaimingcheng;
  //           delete newParams.anticoagulant_gaijiliang;
  //         }
  //         if(newParams.anticoagulant == '5'){
  //           delete newParams.anticoagulant_shouji;
  //           delete newParams.anticoagulant_zongliang;
  //         }
  //         if (this.isShow('置换液总量')==false) {
  //           delete newParams.displace_liqui_value;
  //         }
  //         let result = [];
  //         let filedList = this.$store.getters.user.fileds;
  //         let new_arr = Object.entries(newParams);
  //         new_arr.forEach((el) => {
  //           if (el[1] == "" || el[1] == 0 || el[1] == "0") {
  //             // result.push(el);
  //             result.unshift(el)
  //           }
  //           if (el[0] == "anticoagulant" && el[1] == "-2") {
  //             // result.push(el);
  //             result.unshift(el)
  //           }
  //           // if(el[0] == "anticoagulant_shouji"){
  //           //   if (el[0] == "anticoagulant" && el[1] != "1") {
  //           //     result.push(el);
  //           // }
  //           // }
  //         });
  //         console.log(result, "提交的参数当中过滤出为空的");
  //         // console.log(this.getArrEqual(filedList, result));
  //         // result.forEach((item,index,result) =>{
  //         //   console.log(item,'item')
  //         //   if(item[0] == 'anticoagulant_shouji'){
  //         //     if()
  //         //   }
  //         // })
  //         let warnarr = [];
  //         warnarr = this.getArrEqual(filedList, result);
  //         if (warnarr.length > 0) {
  //           return this.open_tips(warnarr);
  //           // 必填弹窗结束
  //         } else {
  //           Toast.loading({ forbidClick: true, duration: 0 });
  //           postSolution(ParamsQuery).then((response) => {
  //             if (response.data.state == 0) {
  //               Toast.fail(response.data.msg);
  //               return false;
  //             } else {
  //               Toast.success("提交成功");

  //               this.$emit("advice");
  //               this.$emit("longSolution", response.data.data.solution);
  //               this.$emit("prescription", response.data.data.prescription);
  //               // this.finish()
  //             }
  //           });
  //         }

  //         // 推送医嘱
  //         if (this.prescription_open == 1) {
  //           var date = new Date();
  //           var year = date.getFullYear();
  //           var month = date.getMonth() + 1;
  //           var day = date.getDate();

  //           var hours = date.getHours();
  //           var minites = date.getMinutes();

  //           if (month < 10) {
  //             month = "0" + month;
  //           }
  //           if (day < 10) {
  //             day = "0" + day;
  //           }
  //           if (hours < 10) {
  //             hours = "0" + hours;
  //           }
  //           if (minites < 10) {
  //             minites = "0" + minites;
  //           }
  //           var nowDate =
  //             year + "-" + month + "-" + day + " " + hours + ":" + minites;

  //           let params = {
  //             advices: this.waitUploadAdvices,
  //             advice_date: parseTime(this.$route.query.date, "{y}-{m}-{d}"),
  //             advice_doctor: this.waitUploadAdvices[0].advice_doctor,
  //             advice_type: this.waitUploadAdvices[0].advice_type,
  //             parent_id: this.$route.query.patient_id,
  //             start_time: nowDate,
  //             remark: "",
  //           };
  //           CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(
  //             (rs) => {
  //               var resp = rs.data;
  //               if (resp.state == 1) {
  //                 this.doctorAdvices = resp.data.advices;
  //                 this.$emit(
  //                   "longSolution",
  //                   response.data.data.solution,
  //                   resp.data.advices
  //                 );
  //                 this.$emit(
  //                   "prescription",
  //                   response.data.data.prescription,
  //                   resp.data.advices
  //                 );
  //               } else {
  //               }
  //             }
  //           );
  //         }
  //       } else if (this.is_open == 1) {
  //         if (this.targetAdvices != null && this.targetAdvices.length > 0) {
  //           this.advice_visibility = false;
  //           console.log("进程为长期医嘱");
  //         var arr = this.dialysisPrescription;

  //           let ParamsQuery = arr;
  //           console.log("ParamsQueryOne", ParamsQuery);
  //           if (this.$route.query.patient_id) {
  //             ParamsQuery["patient"] = this.$route.query.patient_id;
  //           } else {
  //             ParamsQuery["patient"] = this.patient_prop.id;
  //           }
  //           ParamsQuery["record_date"] = this.record_date;
  //           ParamsQuery["mode"] = "1";
  //           // 必填弹窗开始
  //         console.log(ParamsQuery, "提交的参数");
  //         let newParams = ParamsQuery;
  //         if (newParams.anticoagulant == "1") {
  //           delete newParams.anticoagulant_shouji;
  //           delete newParams.anticoagulant_weichi;
  //           delete newParams.anticoagulant_zongliang;
  //         }
  //         if (newParams.oxygen_uptake == 2||newParams.oxygen_uptake == 0) {
  //           delete newParams.oxygen_time;
  //           delete newParams.oxygen_flow;
  //         }
  //         if (newParams.mode_id!=2 && newParams.mode_id!=5 && newParams.mode_id!= 12){
  //           delete newParams.replacement_total;
  //           delete newParams.displace_liqui_part;
  //           delete newParams.displace_liqui_value;
  //           delete newParams.displace_speed;
  //         }
  //         if(newParams.is_water != '是'){
  //           delete newParams.single_time;
  //           delete newParams.single_water;
  //         }
  //         if(newParams.anticoagulant != "1"){
  //           delete newParams.no_heparin_remarks;
  //         }
  //         if(newParams.anticoagulant != '10'){
  //           delete newParams.heparin_sodium;
  //           delete newParams.nucleoprotamine;
  //           delete newParams.push_the_protamine;
  //         }
  //         if(newParams.anticoagulant != '5'){
  //           delete newParams.anticoagulant_gaimingcheng;
  //           delete newParams.anticoagulant_gaijiliang;
  //         }
  //         if(newParams.anticoagulant == '5'){
  //           delete newParams.anticoagulant_shouji;
  //           delete newParams.anticoagulant_zongliang;
  //         }
  //         if (this.isShow('置换液总量')==false) {
  //           delete newParams.displace_liqui_value;
  //         }
  //         let result = [];
  //         let filedList = this.$store.getters.user.fileds;
  //         let new_arr = Object.entries(newParams);
  //         new_arr.forEach((el) => {
  //           if (el[1] == "" || el[1] == 0 || el[1] == "0") {
  //             // result.push(el);
  //             result.unshift(el)
  //           }
  //           if (el[0] == "anticoagulant" && el[1] == "-2") {
  //             // result.push(el);
  //             result.unshift(el)
  //           }
  //           // if(el[0] == "anticoagulant_shouji"){
  //           //   if (el[0] == "anticoagulant" && el[1] != "1") {
  //           //     result.push(el);
  //           // }
  //           // }
  //         });
  //         console.log(result, "提交的参数当中过滤出为空的");
  //         // console.log(this.getArrEqual(filedList, result));
  //         // result.forEach((item,index,result) =>{
  //         //   console.log(item,'item')
  //         //   if(item[0] == 'anticoagulant_shouji'){
  //         //     if()
  //         //   }
  //         // })
  //         let warnarr = [];
  //         warnarr = this.getArrEqual(filedList, result);
  //         if (warnarr.length > 0) {
  //           return this.open_tips(warnarr);
  //           // 必填弹窗结束
  //         } else {
  //           // 弹框推送提醒
  //           this.advicePropForm.list = this.targetAdvices;
  //           this.advicePropForm.operators = this.admin_users_prop;
  //           this.advice_visibility = true;
  //           this.isShowDialog = false;

  //           for (let i = 0; i < this.advicePropForm.list.length; i++) {
  //             if (
  //               this.advicePropForm.list[i].parent_id == 0 &&
  //               this.advicePropForm.list[i].isCheck == 1
  //             ) {
  //               this.advicePropForm.result.push(this.advicePropForm.list[i].id);
  //             }
  //           }
  //         }

  //         } else {
  //           Toast.loading({ forbidClick: true, duration: 0 });
  //           var arr = this.dialysisPrescription;

  //           let ParamsQuery = arr;
  //           console.log("ParamsQueryOne", ParamsQuery);
  //           if (this.$route.query.patient_id) {
  //             ParamsQuery["patient"] = this.$route.query.patient_id;
  //           } else {
  //             ParamsQuery["patient"] = this.patient_prop.id;
  //           }
  //           ParamsQuery["record_date"] = this.record_date;
  //           ParamsQuery["mode"] = "1";
  //       // 必填弹窗开始
  //         console.log(ParamsQuery, "提交的参数");
  //         let newParams = ParamsQuery;
  //         if (newParams.anticoagulant == "1") {
  //           delete newParams.anticoagulant_shouji;
  //           delete newParams.anticoagulant_weichi;
  //           delete newParams.anticoagulant_zongliang;
  //         }
  //         if (newParams.oxygen_uptake == 2||newParams.oxygen_uptake == 0) {
  //           delete newParams.oxygen_time;
  //           delete newParams.oxygen_flow;
  //         }
  //         if (newParams.mode_id!=2 && newParams.mode_id!=5 && newParams.mode_id!= 12){
  //           delete newParams.replacement_total;
  //           delete newParams.displace_liqui_part;
  //           delete newParams.displace_liqui_value;
  //           delete newParams.displace_speed;
  //         }
  //         if(newParams.is_water != '是'){
  //           delete newParams.single_time;
  //           delete newParams.single_water;
  //         }
  //         if(newParams.anticoagulant != "1"){
  //           delete newParams.no_heparin_remarks;
  //         }
  //         if(newParams.anticoagulant != '10'){
  //           delete newParams.heparin_sodium;
  //           delete newParams.nucleoprotamine;
  //           delete newParams.push_the_protamine;
  //         }
  //         if(newParams.anticoagulant != '5'){
  //           delete newParams.anticoagulant_gaimingcheng;
  //           delete newParams.anticoagulant_gaijiliang;
  //         }
  //         if(newParams.anticoagulant == '5'){
  //           delete newParams.anticoagulant_shouji;
  //           delete newParams.anticoagulant_zongliang;
  //         }
  //         if (this.isShow('置换液总量')==false) {
  //           delete newParams.displace_liqui_value;
  //         }
  //         let result = [];
  //         let filedList = this.$store.getters.user.fileds;
  //         let new_arr = Object.entries(newParams);
  //         new_arr.forEach((el) => {
  //           if (el[1] == "" || el[1] == 0 || el[1] == "0") {
  //             // result.push(el);
  //             result.unshift(el)
  //           }
  //           if (el[0] == "anticoagulant" && el[1] == "-2") {
  //             // result.push(el);
  //             result.unshift(el)
  //           }
  //           // if(el[0] == "anticoagulant_shouji"){
  //           //   if (el[0] == "anticoagulant" && el[1] != "1") {
  //           //     result.push(el);
  //           // }
  //           // }
  //         });
  //         console.log(result, "提交的参数当中过滤出为空的");
  //         // console.log(this.getArrEqual(filedList, result));
  //         // result.forEach((item,index,result) =>{
  //         //   console.log(item,'item')
  //         //   if(item[0] == 'anticoagulant_shouji'){
  //         //     if()
  //         //   }
  //         // })
  //         let warnarr = [];
  //         warnarr = this.getArrEqual(filedList, result);
  //         if (warnarr.length > 0) {
  //           return this.open_tips(warnarr);
  //           // 必填弹窗结束
  //         } else {
  //           postSolution(ParamsQuery)
  //             .then((response) => {
  //               if (response.data.state == 0) {
  //                 Toast.fail(response.data.msg);
  //                 return false;
  //               } else {
  //                 Toast.success("提交成功");

  //                 this.$emit("advice");
  //                 this.$emit("longSolution", response.data.data.solution);
  //                 this.$emit("prescription", response.data.data.prescription);
  //                 // this.finish()
  //               }
  //             })
  //             .catch((error) => {
  //               Toast.fail("请求失败");
  //             });
  //         }

  //         }
  //       } else if (this.is_open == 2) {
  //         if (this.waitUploadAdvices.length > 0) {
  //           Toast.loading({ forbidClick: true, duration: 0 });
  //           var arr = this.dialysisPrescription;

  //           let ParamsQuery = arr;
  //           console.log("ParamsQueryOne", ParamsQuery);
  //           if (this.$route.query.patient_id) {
  //             ParamsQuery["patient"] = this.$route.query.patient_id;
  //           } else {
  //             ParamsQuery["patient"] = this.patient_prop.id;
  //           }
  //           ParamsQuery["record_date"] = this.record_date;
  //           ParamsQuery["mode"] = "1";
  // // 必填弹窗开始
  //         console.log(ParamsQuery, "提交的参数");
  //         let newParams = ParamsQuery;
  //         if (newParams.anticoagulant == "1") {
  //           delete newParams.anticoagulant_shouji;
  //           delete newParams.anticoagulant_weichi;
  //           delete newParams.anticoagulant_zongliang;
  //         }
  //         if (newParams.oxygen_uptake == 2||newParams.oxygen_uptake == 0) {
  //           delete newParams.oxygen_time;
  //           delete newParams.oxygen_flow;
  //         }
  //         if (newParams.mode_id!=2 && newParams.mode_id!=5 && newParams.mode_id!= 12){
  //           delete newParams.replacement_total;
  //           delete newParams.displace_liqui_part;
  //           delete newParams.displace_liqui_value;
  //           delete newParams.displace_speed;
  //         }
  //         if(newParams.is_water != '是'){
  //           delete newParams.single_time;
  //           delete newParams.single_water;
  //         }
  //         if(newParams.anticoagulant != "1"){
  //           delete newParams.no_heparin_remarks;
  //         }
  //         if(newParams.anticoagulant != '10'){
  //           delete newParams.heparin_sodium;
  //           delete newParams.nucleoprotamine;
  //           delete newParams.push_the_protamine;
  //         }
  //         if(newParams.anticoagulant != '5'){
  //           delete newParams.anticoagulant_gaimingcheng;
  //           delete newParams.anticoagulant_gaijiliang;
  //         }
  //         if(newParams.anticoagulant == '5'){
  //           delete newParams.anticoagulant_shouji;
  //           delete newParams.anticoagulant_zongliang;
  //         }
  //         if (this.isShow('置换液总量')==false) {
  //           delete newParams.displace_liqui_value;
  //         }
  //         let result = [];
  //         let filedList = this.$store.getters.user.fileds;
  //         let new_arr = Object.entries(newParams);
  //         new_arr.forEach((el) => {
  //           if (el[1] == "" || el[1] == 0 || el[1] == "0") {
  //             // result.push(el);
  //             result.unshift(el)
  //           }
  //           if (el[0] == "anticoagulant" && el[1] == "-2") {
  //             // result.push(el);
  //             result.unshift(el)
  //           }
  //           // if(el[0] == "anticoagulant_shouji"){
  //           //   if (el[0] == "anticoagulant" && el[1] != "1") {
  //           //     result.push(el);
  //           // }
  //           // }
  //         });
  //         console.log(result, "提交的参数当中过滤出为空的");
  //         // console.log(this.getArrEqual(filedList, result));
  //         // result.forEach((item,index,result) =>{
  //         //   console.log(item,'item')
  //         //   if(item[0] == 'anticoagulant_shouji'){
  //         //     if()
  //         //   }
  //         // })
  //         let warnarr = [];
  //         warnarr = this.getArrEqual(filedList, result);
  //         if (warnarr.length > 0) {
  //           return this.open_tips(warnarr);
  //           // 必填弹窗结束
  //         } else {
  //           postSolution(ParamsQuery)
  //             .then((response) => {
  //               if (response.data.state == 0) {
  //                 Toast.fail(response.data.msg);
  //                 return false;
  //               } else {
  //                 Toast.success("提交成功");

  //                 var date = new Date();
  //                 var year = date.getFullYear();
  //                 var month = date.getMonth() + 1;
  //                 var day = date.getDate();

  //                 var hours = date.getHours();
  //                 var minites = date.getMinutes();

  //                 if (month < 10) {
  //                   month = "0" + month;
  //                 }
  //                 if (day < 10) {
  //                   day = "0" + day;
  //                 }
  //                 if (hours < 10) {
  //                   hours = "0" + hours;
  //                 }
  //                 if (minites < 10) {
  //                   minites = "0" + minites;
  //                 }
  //                 var nowDate =
  //                   year +
  //                   "-" +
  //                   month +
  //                   "-" +
  //                   day +
  //                   " " +
  //                   hours +
  //                   ":" +
  //                   minites;

  //                 let params = {
  //                   advices: this.waitUploadAdvices,
  //                   advice_date: parseTime(
  //                     this.$route.query.date,
  //                     "{y}-{m}-{d}"
  //                   ),
  //                   advice_doctor: this.waitUploadAdvices[0].advice_doctor,
  //                   advice_type: this.waitUploadAdvices[0].advice_type,
  //                   parent_id: this.$route.query.patient_id,
  //                   start_time: nowDate,
  //                   remark: "",
  //                 };
  //                 CreateGroupAdvice(
  //                   this.$route.query.patient_id,
  //                   0,
  //                   params
  //                 ).then((rs) => {
  //                   var resp = rs.data;
  //                   if (resp.state == 1) {
  //                     this.doctorAdvices = resp.data.advices;
  //                     this.$emit(
  //                       "longSolution",
  //                       response.data.data.solution,
  //                       resp.data.advices
  //                     );
  //                     this.$emit(
  //                       "prescription",
  //                       response.data.data.prescription,
  //                       resp.data.advices
  //                     );
  //                   } else {
  //                   }
  //                 });

  //                 // this.finish()
  //               }
  //             })
  //             .catch((error) => {
  //               Toast.fail("请求失败");
  //             });
  //         }

  //         } else {
  //           Toast.loading({ forbidClick: true, duration: 0 });
  //           var arr = this.dialysisPrescription;

  //           let ParamsQuery = arr;
  //           console.log("ParamsQueryOne", ParamsQuery);
  //           if (this.$route.query.patient_id) {
  //             ParamsQuery["patient"] = this.$route.query.patient_id;
  //           } else {
  //             ParamsQuery["patient"] = this.patient_prop.id;
  //           }
  //           ParamsQuery["record_date"] = this.record_date;
  //           ParamsQuery["mode"] = "1";


  //           // 必填弹窗开始
  //         console.log(ParamsQuery, "提交的参数");
  //         let newParams = ParamsQuery;
  //         if (newParams.anticoagulant == "1") {
  //           delete newParams.anticoagulant_shouji;
  //           delete newParams.anticoagulant_weichi;
  //           delete newParams.anticoagulant_zongliang;
  //         }
  //         if (newParams.oxygen_uptake == 2||newParams.oxygen_uptake == 0) {
  //           delete newParams.oxygen_time;
  //           delete newParams.oxygen_flow;
  //         }
  //         if (newParams.mode_id!=2 && newParams.mode_id!=5 && newParams.mode_id!= 12){
  //           delete newParams.replacement_total;
  //           delete newParams.displace_liqui_part;
  //           delete newParams.displace_liqui_value;
  //           delete newParams.displace_speed;
  //         }
  //         if(newParams.is_water != '是'){
  //           delete newParams.single_time;
  //           delete newParams.single_water;
  //         }
  //         if(newParams.anticoagulant != "1"){
  //           delete newParams.no_heparin_remarks;
  //         }
  //         if(newParams.anticoagulant != '10'){
  //           delete newParams.heparin_sodium;
  //           delete newParams.nucleoprotamine;
  //           delete newParams.push_the_protamine;
  //         }
  //         if(newParams.anticoagulant != '5'){
  //           delete newParams.anticoagulant_gaimingcheng;
  //           delete newParams.anticoagulant_gaijiliang;
  //         }
  //         if(newParams.anticoagulant == '5'){
  //           delete newParams.anticoagulant_shouji;
  //           delete newParams.anticoagulant_zongliang;
  //         }
  //         if (this.isShow('置换液总量')==false) {
  //           delete newParams.displace_liqui_value;
  //         }
  //         let result = [];
  //         let filedList = this.$store.getters.user.fileds;
  //         let new_arr = Object.entries(newParams);
  //         new_arr.forEach((el) => {
  //           if (el[1] == "" || el[1] == 0 || el[1] == "0") {
  //             // result.push(el);
  //             result.unshift(el)
  //           }
  //           if (el[0] == "anticoagulant" && el[1] == "-2") {
  //             // result.push(el);
  //             result.unshift(el)
  //           }
  //           // if(el[0] == "anticoagulant_shouji"){
  //           //   if (el[0] == "anticoagulant" && el[1] != "1") {
  //           //     result.push(el);
  //           // }
  //           // }
  //         });
  //         console.log(result, "提交的参数当中过滤出为空的");
  //         // console.log(this.getArrEqual(filedList, result));
  //         // result.forEach((item,index,result) =>{
  //         //   console.log(item,'item')
  //         //   if(item[0] == 'anticoagulant_shouji'){
  //         //     if()
  //         //   }
  //         // })
  //         let warnarr = [];
  //         warnarr = this.getArrEqual(filedList, result);
  //         if (warnarr.length > 0) {
  //           return this.open_tips(warnarr);
  //           // 必填弹窗结束
  //         } else {
  //            postSolution(ParamsQuery)
  //             .then((response) => {
  //               if (response.data.state == 0) {
  //                 Toast.fail(response.data.msg);
  //                 return false;
  //               } else {
  //                 Toast.success("提交成功");

  //                 this.$emit("longSolution", response.data.data.solution);
  //                 this.$emit("prescription", response.data.data.prescription);
  //                 // this.finish()
  //               }
  //             })
  //             .catch((error) => {
  //               Toast.fail("请求失败");
  //             });
  //         }

  //         }
  //       }
  //     } else {
  //       if (this.prescription_prop.creater == 0) {
  //         if (this.is_open == 0) {
  //           var arr = this.dialysisPrescription;

  //           let ParamsQuery = arr;
  //           console.log("ParamsQueryOne", ParamsQuery);
  //           if (this.$route.query.patient_id) {
  //             ParamsQuery["patient"] = this.$route.query.patient_id;
  //           } else {
  //             ParamsQuery["patient"] = this.patient_prop.id;
  //           }
  //           ParamsQuery["record_date"] = this.record_date;
  //           ParamsQuery["mode"] = "1";
  //           // 必填弹窗开始
  //         console.log(ParamsQuery, "提交的参数");
  //         let newParams = ParamsQuery;
  //         if (newParams.anticoagulant == "1" || newParams.anticoagulant == "12") {
  //           delete newParams.anticoagulant_shouji;
  //           delete newParams.anticoagulant_weichi;
  //           delete newParams.anticoagulant_zongliang;
  //         }
  //         if (newParams.oxygen_uptake == 2||newParams.oxygen_uptake == 0) {
  //           delete newParams.oxygen_time;
  //           delete newParams.oxygen_flow;
  //         }
  //         if (newParams.mode_id!=2 && newParams.mode_id!=5 && newParams.mode_id!= 12){
  //           delete newParams.replacement_total;
  //           delete newParams.displace_liqui_part;
  //           delete newParams.displace_liqui_value;
  //           delete newParams.displace_speed;
  //         }
  //         if(newParams.is_water != '是'){
  //           delete newParams.single_time;
  //           delete newParams.single_water;
  //         }
  //         if(newParams.anticoagulant != "1"){
  //           delete newParams.no_heparin_remarks;
  //         }
  //         if(newParams.anticoagulant != '10'){
  //           delete newParams.heparin_sodium;
  //           delete newParams.nucleoprotamine;
  //           delete newParams.push_the_protamine;
  //         }
  //         if(newParams.anticoagulant != '5'){
  //           delete newParams.anticoagulant_gaimingcheng;
  //           delete newParams.anticoagulant_gaijiliang;
  //         }
  //         if(newParams.anticoagulant == '5'){
  //           delete newParams.anticoagulant_shouji;
  //           delete newParams.anticoagulant_zongliang;
  //         }
  //         if (this.isShow('置换液总量')==false) {
  //           delete newParams.displace_liqui_value;
  //         }
  //         let result = [];
  //         let filedList = this.$store.getters.user.fileds;
  //         let new_arr = Object.entries(newParams);
  //         new_arr.forEach((el) => {
  //           if (el[1] == "" || el[1] == 0 || el[1] == "0") {
  //             // result.push(el);
  //             result.unshift(el)
  //           }
  //           if (el[0] == "anticoagulant" && el[1] == "-2") {
  //             // result.push(el);
  //             result.unshift(el)
  //           }
  //           // if(el[0] == "anticoagulant_shouji"){
  //           //   if (el[0] == "anticoagulant" && el[1] != "1") {
  //           //     result.push(el);
  //           // }
  //           // }
  //         });
  //         console.log(result, "提交的参数当中过滤出为空的");
  //         // console.log(this.getArrEqual(filedList, result));
  //         // result.forEach((item,index,result) =>{
  //         //   console.log(item,'item')
  //         //   if(item[0] == 'anticoagulant_shouji'){
  //         //     if()
  //         //   }
  //         // })
  //         let warnarr = [];
  //         warnarr = this.getArrEqual(filedList, result);
  //         if (warnarr.length > 0) {
  //           return this.open_tips(warnarr);
  //           // 必填弹窗结束
  //           } else {
  //             Toast.loading({ forbidClick: true, duration: 0 });
  //             postSolution(ParamsQuery)
  //               .then((response) => {
  //                 if (response.data.state == 0) {
  //                   Toast.fail(response.data.msg);
  //                   return false;
  //                 } else {
  //                   Toast.success("提交成功");

  //                   this.$emit("longSolution", response.data.data.solution);
  //                   this.$emit("prescription", response.data.data.prescription);
  //                   // this.finish()
  //                 }
  //               })
  //               .catch((error) => {
  //                 Toast.fail("请求失败");
  //               });
  //           }

  //           // 推送医嘱
  //           if (this.prescription_open == 1) {
  //             var date = new Date();
  //             var year = date.getFullYear();
  //             var month = date.getMonth() + 1;
  //             var day = date.getDate();

  //             var hours = date.getHours();
  //             var minites = date.getMinutes();

  //             if (month < 10) {
  //               month = "0" + month;
  //             }
  //             if (day < 10) {
  //               day = "0" + day;
  //             }
  //             if (hours < 10) {
  //               hours = "0" + hours;
  //             }
  //             if (minites < 10) {
  //               minites = "0" + minites;
  //             }
  //             var nowDate =
  //               year + "-" + month + "-" + day + " " + hours + ":" + minites;

  //             let params = {
  //               advices: this.waitUploadAdvices,
  //               advice_date: parseTime(this.$route.query.date, "{y}-{m}-{d}"),
  //               advice_doctor: this.waitUploadAdvices[0].advice_doctor,
  //               advice_type: this.waitUploadAdvices[0].advice_type,
  //               parent_id: this.$route.query.patient_id,
  //               start_time: nowDate,
  //               remark: "",
  //             };
  //             CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(
  //               (rs) => {
  //                 var resp = rs.data;
  //                 if (resp.state == 1) {
  //                   this.doctorAdvices = resp.data.advices;
  //                   this.$emit(
  //                     "longSolution",
  //                     response.data.data.solution,
  //                     resp.data.advices
  //                   );
  //                   this.$emit(
  //                     "prescription",
  //                     response.data.data.prescription,
  //                     resp.data.advices
  //                   );
  //                 } else {
  //                 }
  //               }
  //             );
  //           }
  //         } else if (this.is_open == 1) {
  //           if (this.targetAdvices != null && this.targetAdvices.length > 0) {
  //             // 弹框推送提醒
  //             this.advicePropForm.list = this.targetAdvices;
  //             this.advicePropForm.operators = this.admin_users_prop;
  //             this.advice_visibility = true;
  //             this.isShowDialog = false;

  //             for (let i = 0; i < this.advicePropForm.list.length; i++) {
  //               if (
  //                 this.advicePropForm.list[i].parent_id == 0 &&
  //                 this.advicePropForm.list[i].isCheck == 1
  //               ) {
  //                 this.advicePropForm.result.push(
  //                   this.advicePropForm.list[i].id
  //                 );
  //               }
  //             }
  //           } else {
  //             Toast.loading({ forbidClick: true, duration: 0 });
  //             var arr = this.dialysisPrescription;

  //             let ParamsQuery = arr;
  //             console.log("ParamsQueryOne", ParamsQuery);
  //             if (this.$route.query.patient_id) {
  //               ParamsQuery["patient"] = this.$route.query.patient_id;
  //             } else {
  //               ParamsQuery["patient"] = this.patient_prop.id;
  //             }
  //             ParamsQuery["record_date"] = this.record_date;
  //             ParamsQuery["mode"] = "1";
  // // 必填弹窗开始
  //         console.log(ParamsQuery, "提交的参数");
  //         let newParams = ParamsQuery;
  //         if (newParams.anticoagulant == "1" || newParams.anticoagulant == "12") {
  //           delete newParams.anticoagulant_shouji;
  //           delete newParams.anticoagulant_weichi;
  //           delete newParams.anticoagulant_zongliang;
  //         }
  //         if (newParams.oxygen_uptake == 2||newParams.oxygen_uptake == 0) {
  //           delete newParams.oxygen_time;
  //           delete newParams.oxygen_flow;
  //         }
  //         if (newParams.mode_id!=2 && newParams.mode_id!=5 && newParams.mode_id!= 12){
  //           delete newParams.replacement_total;
  //           delete newParams.displace_liqui_part;
  //           delete newParams.displace_liqui_value;
  //           delete newParams.displace_speed;
  //         }
  //         if(newParams.is_water != '是'){
  //           delete newParams.single_time;
  //           delete newParams.single_water;
  //         }
  //         if(newParams.anticoagulant != "1"){
  //           delete newParams.no_heparin_remarks;
  //         }
  //         if(newParams.anticoagulant != '10'){
  //           delete newParams.heparin_sodium;
  //           delete newParams.nucleoprotamine;
  //           delete newParams.push_the_protamine;
  //         }
  //         if(newParams.anticoagulant != '5'){
  //           delete newParams.anticoagulant_gaimingcheng;
  //           delete newParams.anticoagulant_gaijiliang;
  //         }
  //         if(newParams.anticoagulant == '5'){
  //           delete newParams.anticoagulant_shouji;
  //           delete newParams.anticoagulant_zongliang;
  //         }
  //         if (this.isShow('置换液总量')==false) {
  //           delete newParams.displace_liqui_value;
  //         }
  //         let result = [];
  //         let filedList = this.$store.getters.user.fileds;
  //         let new_arr = Object.entries(newParams);
  //         new_arr.forEach((el) => {
  //           if (el[1] == "" || el[1] == 0 || el[1] == "0") {
  //             // result.push(el);
  //             result.unshift(el)
  //           }
  //           if (el[0] == "anticoagulant" && el[1] == "-2") {
  //             // result.push(el);
  //             result.unshift(el)
  //           }
  //           // if(el[0] == "anticoagulant_shouji"){
  //           //   if (el[0] == "anticoagulant" && el[1] != "1") {
  //           //     result.push(el);
  //           // }
  //           // }
  //         });
  //         console.log(result, "提交的参数当中过滤出为空的");
  //         // console.log(this.getArrEqual(filedList, result));
  //         // result.forEach((item,index,result) =>{
  //         //   console.log(item,'item')
  //         //   if(item[0] == 'anticoagulant_shouji'){
  //         //     if()
  //         //   }
  //         // })
  //         let warnarr = [];
  //         warnarr = this.getArrEqual(filedList, result);
  //         if (warnarr.length > 0) {
  //           return this.open_tips(warnarr);
  //           // 必填弹窗结束
  //         } else {
  //           postSolution(ParamsQuery)
  //               .then((response) => {
  //                 if (response.data.state == 0) {
  //                   Toast.fail(response.data.msg);
  //                   return false;
  //                 } else {
  //                   Toast.success("提交成功");

  //                   this.$emit("longSolution", response.data.data.solution);
  //                   this.$emit("prescription", response.data.data.prescription);
  //                   // this.finish()
  //                 }
  //               })
  //               .catch((error) => {
  //                 Toast.fail("请求失败");
  //               });
  //         }

  //           }
  //         } else if (this.is_open == 2) {
  //           if (this.waitUploadAdvices.length > 0) {
  //             Toast.loading({ forbidClick: true, duration: 0 });
  //             var arr = this.dialysisPrescription;

  //             let ParamsQuery = arr;
  //             console.log("ParamsQueryOne", ParamsQuery);
  //             if (this.$route.query.patient_id) {
  //               ParamsQuery["patient"] = this.$route.query.patient_id;
  //             } else {
  //               ParamsQuery["patient"] = this.patient_prop.id;
  //             }
  //             ParamsQuery["record_date"] = this.record_date;
  //             ParamsQuery["mode"] = "2";
  // // 必填弹窗开始
  //         console.log(ParamsQuery, "提交的参数");
  //         let newParams = ParamsQuery;
  //         if (newParams.anticoagulant == "1" || newParams.anticoagulant == "12") {
  //           delete newParams.anticoagulant_shouji;
  //           delete newParams.anticoagulant_weichi;
  //           delete newParams.anticoagulant_zongliang;
  //         }
  //         if (newParams.oxygen_uptake == 2||newParams.oxygen_uptake == 0) {
  //           delete newParams.oxygen_time;
  //           delete newParams.oxygen_flow;
  //         }
  //         if (newParams.mode_id!=2 && newParams.mode_id!=5 && newParams.mode_id!= 12){
  //           delete newParams.replacement_total;
  //           delete newParams.displace_liqui_part;
  //           delete newParams.displace_liqui_value;
  //           delete newParams.displace_speed;
  //         }
  //         if(newParams.is_water != '是'){
  //           delete newParams.single_time;
  //           delete newParams.single_water;
  //         }
  //         if(newParams.anticoagulant != "1"){
  //           delete newParams.no_heparin_remarks;
  //         }
  //         if(newParams.anticoagulant != '10'){
  //           delete newParams.heparin_sodium;
  //           delete newParams.nucleoprotamine;
  //           delete newParams.push_the_protamine;
  //         }
  //         if(newParams.anticoagulant != '5'){
  //           delete newParams.anticoagulant_gaimingcheng;
  //           delete newParams.anticoagulant_gaijiliang;
  //         }
  //         if(newParams.anticoagulant == '5'){
  //           delete newParams.anticoagulant_shouji;
  //           delete newParams.anticoagulant_zongliang;
  //         }
  //         if (this.isShow('置换液总量')==false) {
  //           delete newParams.displace_liqui_value;
  //         }
  //         let result = [];
  //         let filedList = this.$store.getters.user.fileds;
  //         let new_arr = Object.entries(newParams);
  //         new_arr.forEach((el) => {
  //           if (el[1] == "" || el[1] == 0 || el[1] == "0") {
  //             // result.push(el);
  //             result.unshift(el)
  //           }
  //           if (el[0] == "anticoagulant" && el[1] == "-2") {
  //             // result.push(el);
  //             result.unshift(el)
  //           }
  //           // if(el[0] == "anticoagulant_shouji"){
  //           //   if (el[0] == "anticoagulant" && el[1] != "1") {
  //           //     result.push(el);
  //           // }
  //           // }
  //         });
  //         console.log(result, "提交的参数当中过滤出为空的");
  //         // console.log(this.getArrEqual(filedList, result));
  //         // result.forEach((item,index,result) =>{
  //         //   console.log(item,'item')
  //         //   if(item[0] == 'anticoagulant_shouji'){
  //         //     if()
  //         //   }
  //         // })
  //         let warnarr = [];
  //         warnarr = this.getArrEqual(filedList, result);
  //         if (warnarr.length > 0) {
  //           return this.open_tips(warnarr);
  //           // 必填弹窗结束
  //         } else {
  //           postSolution(ParamsQuery)
  //               .then((response) => {
  //                 if (response.data.state == 0) {
  //                   Toast.fail(response.data.msg);
  //                   return false;
  //                 } else {
  //                   this.advice_visibility = false;

  //                   var date = new Date();
  //                   var year = date.getFullYear();
  //                   var month = date.getMonth() + 1;
  //                   var day = date.getDate();

  //                   var hours = date.getHours();
  //                   var minites = date.getMinutes();

  //                   if (month < 10) {
  //                     month = "0" + month;
  //                   }
  //                   if (day < 10) {
  //                     day = "0" + day;
  //                   }
  //                   if (hours < 10) {
  //                     hours = "0" + hours;
  //                   }
  //                   if (minites < 10) {
  //                     minites = "0" + minites;
  //                   }
  //                   var nowDate =
  //                     year +
  //                     "-" +
  //                     month +
  //                     "-" +
  //                     day +
  //                     " " +
  //                     hours +
  //                     ":" +
  //                     minites;

  //                   let params = {
  //                     advices: this.waitUploadAdvices,
  //                     advice_date: parseTime(
  //                       this.$route.query.date,
  //                       "{y}-{m}-{d}"
  //                     ),
  //                     advice_doctor: this.waitUploadAdvices[0].advice_doctor,
  //                     advice_type: this.waitUploadAdvices[0].advice_type,
  //                     parent_id: this.$route.query.patient_id,
  //                     start_time: nowDate,
  //                     remark: "",
  //                   };
  //                   CreateGroupAdvice(
  //                     this.$route.query.patient_id,
  //                     0,
  //                     params
  //                   ).then((rs) => {
  //                     var resp = rs.data;
  //                     if (resp.state == 1) {
  //                       console.log("中国人民33333333333333");
  //                       this.doctorAdvices = resp.data.advices;
  //                       this.$emit(
  //                         "longSolution",
  //                         response.data.data.solution,
  //                         resp.data.advices
  //                       );
  //                       this.$emit(
  //                         "prescription",
  //                         response.data.data.prescription,
  //                         resp.data.advices
  //                       );
  //                     } else {
  //                     }
  //                   });
  //                   Toast.success("提交成功");
  //                   // this.finish()
  //                 }
  //               })
  //               .catch((error) => {
  //                 Toast.fail("请求失败");
  //               });
  //         }

  //           } else {
  //             Toast.loading({ forbidClick: true, duration: 0 });
  //             var arr = this.dialysisPrescription;

  //             let ParamsQuery = arr;
  //             console.log("ParamsQueryOne", ParamsQuery);
  //             if (this.$route.query.patient_id) {
  //               ParamsQuery["patient"] = this.$route.query.patient_id;
  //             } else {
  //               ParamsQuery["patient"] = this.patient_prop.id;
  //             }
  //             ParamsQuery["record_date"] = this.record_date;
  //             ParamsQuery["mode"] = "1";
  //               // 必填弹窗开始
  //         console.log(ParamsQuery, "提交的参数");
  //         let newParams = ParamsQuery;
  //         if (newParams.anticoagulant == "1" || newParams.anticoagulant == "12") {
  //           delete newParams.anticoagulant_shouji;
  //           delete newParams.anticoagulant_weichi;
  //           delete newParams.anticoagulant_zongliang;
  //         }
  //         if (newParams.oxygen_uptake == 2||newParams.oxygen_uptake == 0) {
  //           delete newParams.oxygen_time;
  //           delete newParams.oxygen_flow;
  //         }
  //         if (newParams.mode_id!=2 && newParams.mode_id!=5 && newParams.mode_id!= 12){
  //           delete newParams.replacement_total;
  //           delete newParams.displace_liqui_part;
  //           delete newParams.displace_liqui_value;
  //           delete newParams.displace_speed;
  //         }
  //         if(newParams.is_water != '是'){
  //           delete newParams.single_time;
  //           delete newParams.single_water;
  //         }
  //         if(newParams.anticoagulant != "1"){
  //           delete newParams.no_heparin_remarks;
  //         }
  //         if(newParams.anticoagulant != '10'){
  //           delete newParams.heparin_sodium;
  //           delete newParams.nucleoprotamine;
  //           delete newParams.push_the_protamine;
  //         }
  //         if(newParams.anticoagulant != '5'){
  //           delete newParams.anticoagulant_gaimingcheng;
  //           delete newParams.anticoagulant_gaijiliang;
  //         }
  //         if(newParams.anticoagulant == '5'){
  //           delete newParams.anticoagulant_shouji;
  //           delete newParams.anticoagulant_zongliang;
  //         }
  //         if (this.isShow('置换液总量')==false) {
  //           delete newParams.displace_liqui_value;
  //         }
  //         let result = [];
  //         let filedList = this.$store.getters.user.fileds;
  //         let new_arr = Object.entries(newParams);
  //         new_arr.forEach((el) => {
  //           if (el[1] == "" || el[1] == 0 || el[1] == "0") {
  //             // result.push(el);
  //             result.unshift(el)
  //           }
  //           if (el[0] == "anticoagulant" && el[1] == "-2") {
  //             // result.push(el);
  //             result.unshift(el)
  //           }
  //           // if(el[0] == "anticoagulant_shouji"){
  //           //   if (el[0] == "anticoagulant" && el[1] != "1") {
  //           //     result.push(el);
  //           // }
  //           // }
  //         });
  //         console.log(result, "提交的参数当中过滤出为空的");
  //         // console.log(this.getArrEqual(filedList, result));
  //         // result.forEach((item,index,result) =>{
  //         //   console.log(item,'item')
  //         //   if(item[0] == 'anticoagulant_shouji'){
  //         //     if()
  //         //   }
  //         // })
  //         let warnarr = [];
  //         warnarr = this.getArrEqual(filedList, result);
  //         if (warnarr.length > 0) {
  //           return this.open_tips(warnarr);
  //           // 必填弹窗结束
  //         } else {
  //           postSolution(ParamsQuery)
  //               .then((response) => {
  //                 if (response.data.state == 0) {
  //                   Toast.fail(response.data.msg);
  //                   return false;
  //                 } else {
  //                   Toast.success("提交成功");
  //                   this.$emit("advice");
  //                   this.$emit("longSolution", response.data.data.solution);
  //                   this.$emit("prescription", response.data.data.prescription);
  //                   // this.finish()
  //                 }
  //               })
  //               .catch((error) => {
  //                 Toast.fail("请求失败");
  //               });
  //         }

  //           }
  //         }
  //       } else {
  //         var arr = this.dialysisPrescription;

  //         let ParamsQuery = arr;
  //         console.log("ParamsQueryOne", ParamsQuery);
  //         if (this.$route.query.patient_id) {
  //           ParamsQuery["patient"] = this.$route.query.patient_id;
  //         } else {
  //           ParamsQuery["patient"] = this.patient_prop.id;
  //         }
  //         ParamsQuery["record_date"] = this.record_date;
  //         ParamsQuery["mode"] = "1";

  //         // 必填弹窗开始
  //         console.log(ParamsQuery, "提交的参数");
  //         let newParams = ParamsQuery;
  //         if (newParams.anticoagulant == "1" || newParams.anticoagulant == "12") {
  //           delete newParams.anticoagulant_shouji;
  //           delete newParams.anticoagulant_weichi;
  //           delete newParams.anticoagulant_zongliang;
  //         }
  //         if (newParams.oxygen_uptake == 2||newParams.oxygen_uptake == 0) {
  //           delete newParams.oxygen_time;
  //           delete newParams.oxygen_flow;
  //         }
  //         if (newParams.mode_id!=2 && newParams.mode_id!=5 && newParams.mode_id!= 12){
  //           delete newParams.replacement_total;
  //           delete newParams.displace_liqui_part;
  //           delete newParams.displace_liqui_value;
  //           delete newParams.displace_speed;
  //         }
  //         if(newParams.is_water != '是'){
  //           delete newParams.single_time;
  //           delete newParams.single_water;
  //         }
  //         if(newParams.anticoagulant != "1"){
  //           delete newParams.no_heparin_remarks;
  //         }
  //         if(newParams.anticoagulant != '10'){
  //           delete newParams.heparin_sodium;
  //           delete newParams.nucleoprotamine;
  //           delete newParams.push_the_protamine;
  //         }
  //         if(newParams.anticoagulant != '5'){
  //           delete newParams.anticoagulant_gaimingcheng;
  //           delete newParams.anticoagulant_gaijiliang;
  //         }
  //         if(newParams.anticoagulant == '5'){
  //           delete newParams.anticoagulant_shouji;
  //           delete newParams.anticoagulant_zongliang;
  //         }
  //         if (this.isShow('置换液总量')==false) {
  //           delete newParams.displace_liqui_value;
  //         }
  //         let result = [];
  //         let filedList = this.$store.getters.user.fileds;
  //         let new_arr = Object.entries(newParams);
  //         new_arr.forEach((el) => {
  //           if (el[1] == "" || el[1] == 0 || el[1] == "0") {
  //             // result.push(el);
  //             result.unshift(el)
  //           }
  //           if (el[0] == "anticoagulant" && el[1] == "-2") {
  //             // result.push(el);
  //             result.unshift(el)
  //           }
  //           // if(el[0] == "anticoagulant_shouji"){
  //           //   if (el[0] == "anticoagulant" && el[1] != "1") {
  //           //     result.push(el);
  //           // }
  //           // }
  //         });
  //         console.log(result, "提交的参数当中过滤出为空的");
  //         // console.log(this.getArrEqual(filedList, result));
  //         // result.forEach((item,index,result) =>{
  //         //   console.log(item,'item')
  //         //   if(item[0] == 'anticoagulant_shouji'){
  //         //     if()
  //         //   }
  //         // })
  //         let warnarr = [];
  //         warnarr = this.getArrEqual(filedList, result);
  //         if (warnarr.length > 0) {
  //           return this.open_tips(warnarr);
  //           // 必填弹窗结束
  //         } else {
  //           Toast.loading({ forbidClick: true, duration: 0 });
  //           postSolution(ParamsQuery)
  //             .then((response) => {
  //               if (response.data.state == 0) {
  //                 Toast.fail(response.data.msg);
  //                 return false;
  //               } else {
  //                 Toast.success("提交成功");
  //                 this.$emit("longSolution", response.data.data.solution);

  //                 this.$emit("prescription", response.data.data.prescription);
  //                 // this.finish()
  //               }
  //             })
  //             .catch((error) => {
  //               Toast.fail("请求失败");
  //             });
  //         }
  //       }
  //     }
  //   },

    commitSolutionInfo: function () {
      Dialog.confirm({
        title: '提示',
        message:
          '确认保存为长期透析处方',
      }).then(() => {
          // on confirm
          // console.log('确认');
             
         
          if (this.his_is_open == 1) {
            this.is_open = 0;
          }
          if(this.$store.getters.user.template_info.org_id == 10340 || this.$store.getters.user.template_info.org_id == 3877){

                if(this.dialysisPrescription.anticoagulant!=1){
                  if(this.dialysisPrescription.prescribing_number == 0){
                      Toast.fail('请填写开药数量!')
                      return
                  }
                }


              if(this.dialysisPrescription.anticoagulant == 0){
                Toast.fail('请填写抗凝剂!')
                return
              }
            }
          if(this.dialysisPrescription.mode_id != 2){
            this.dialysisPrescription.replacement_flow = ""
          }
          if(this.$store.getters.user.template_info.org_id == 10721){
            if(this.dialysisPrescription.prescription_water == 0){
              Toast.fail('请填写处方脱水量!')
              return
           }
          }
          if(this.$store.getters.user.template_info.org_id!=9671){
            if (this.$store.getters.user.template_info.template_id == 6) {
            console.log(" this.dialysisPrescription.mode_id", this.dialysisPrescription.mode_id)
            if (this.dialysisPrescription.mode_id == 2) {
              if ( this.dialysisPrescription.displace_liqui_part == 0 || this.dialysisPrescription.displace_liqui_part == -2 ||this.dialysisPrescription.displace_liqui_value == 0 || this.dialysisPrescription.displace_liqui_value == "") {
                Toast.fail("HDF模式下置换方式和置换液总量不能为空！");
                return;
              }
              if (
                this.dialysisPrescription.mode_id != 2 &&
                this.dialysisPrescription.mode_id != 5 &&
                this.dialysisPrescription.mode_id != 12 &&
                this.dialysisPrescription.mode_id != 28 &&
                this.dialysisPrescription.mode_id != 34 &&
                this.dialysisPrescription.mode_id != 35&&
                this.dialysisPrescription.mode_id != 36&&
                this.dialysisPrescription.mode_id != 37&&
                this.dialysisPrescription.mode_id != 38 &&
                this.dialysisPrescription.mode_id != 10 &&
                this.dialysisPrescription.mode_id != 26 &&
                this.dialysisPrescription.mode_id != 41
              ) {
                this.dialysisPrescription.displace_liqui_part = 0;
                this.dialysisPrescription.displace_liqui_value = 0;
              }
            }
          }
        }
       
          this.is_pre = 2;

          if (this.prescription_prop.id == "") {
            if (this.is_open == 0) {
              var arr = this.dialysisPrescription;

              let ParamsQuery = arr;
              console.log("ParamsQueryOne", ParamsQuery);

              if (this.$route.query.patient_id) {
                ParamsQuery["patient"] = this.$route.query.patient_id;
              } else {
                ParamsQuery["patient"] = this.patient_prop.id;
              }
              ParamsQuery["record_date"] = this.record_date;
              ParamsQuery["mode"] = "1";

              // 必填弹窗开始
              console.log(ParamsQuery, "提交的参数");
              let newParams = ParamsQuery;
              if (newParams.anticoagulant == "1" || newParams.anticoagulant == "12") {
                delete newParams.anticoagulant_shouji;
                delete newParams.anticoagulant_weichi;
                delete newParams.anticoagulant_zongliang;
              }
              if (newParams.oxygen_uptake == 2||newParams.oxygen_uptake == 0) {
                delete newParams.oxygen_time;
                delete newParams.oxygen_flow;
              }
              if (newParams.mode_id!=2 && newParams.mode_id!=5 && newParams.mode_id!= 12 && newParams.mode_id!= 28 && newParams.mode_id!= 26&& newParams.mode_id!= 34&& newParams.mode_id!= 35&& newParams.mode_id!= 36&& newParams.mode_id!= 37 && newParams.mode_id!= 10 && newParams.mode_id!= 41){
                delete newParams.replacement_total;
                delete newParams.displace_liqui_part;
                delete newParams.displace_liqui_value;
                delete newParams.displace_speed;
              }
              if(newParams.is_water != '是'){
                delete newParams.single_time;
                delete newParams. single_water;
              }
              if(newParams.anticoagulant != "1"){
                delete newParams.no_heparin_remarks;
              }
              if(newParams.anticoagulant != '10'){
                delete newParams.heparin_sodium;
                delete newParams.nucleoprotamine;
                delete newParams.push_the_protamine;
              }
              if(newParams.anticoagulant != '5'){
                delete newParams.anticoagulant_gaimingcheng;
                delete newParams.anticoagulant_gaijiliang;
              }
              if (this.isShow('置换液总量')==false) {
                delete newParams.displace_liqui_value;
              }
              let result = [];
              let filedList = this.$store.getters.user.fileds;
              
              
             
              let new_arr = Object.entries(newParams);
              new_arr.forEach((el) => {
                if (el[1] === "" || el[1] === 0 ) {
                  // result.push(el);
                  result.unshift(el)
                } else if(el[1] == "0" && el[1].length<=0){
                  result.unshift(el)
                }
                else if(el[0] =='pre_impulse' && el[1].length<=0) {
                  result.unshift(el)//欲冲量
                }
                else if(el[0] =='target_ultrafiltration' && el[1].length<=0) {
                  result.unshift(el)//目标超滤量
                }
                else if (el[0]=='is_water' && el[1] =='请选择'){
                  result.unshift(el)//是否单超脱水
                }
                else if(el[0] =='drhy_water' && el[1].length<=0) {
                  result.unshift(el)//曲线脱水
                }
                else if(el[0] =='dry_water_hour' && el[1].length<=0) {
                  result.unshift(el)//曲线脱水时长
                }
                else if(el[0] =='replacement_flow' && el[1].length<=0) {
                  result.unshift(el)//置换流量
                }
                else if(el[0] =='kalium' && el[1].length<=0) {
                  result.unshift(el)//钾
                }
                else if (el[0]=='sodium' && el[1] =='请选择'){
                  result.unshift(el)//钠
                }
                else if(el[0] =='calcium' && el[1].length<=0) {
                  result.unshift(el)//钙
                }
                else if(el[0] =='bicarbonate' && el[1].length<=0) {
                  result.unshift(el)//碳酸氢盐
                }
                else if(el[0] =='dialysate_flow' && el[1].length<=0) {
                  result.unshift(el)//透析液流量
                }
                else if(el[0] =='dialysate_temperature' && el[1].length<=0) {
                  result.unshift(el)//透析液温度
                }
                else if (el[0]=='conductivity' && el[1] =='请选择'){
                  result.unshift(el)//电导率
                }
                else if(el[0] =='amylaceum' && el[1].length<=0) {
                  result.unshift(el)//葡萄糖
                }
                else if(el[0] =='hemodialysis_pipelines_count' && el[1].length<=0) {
                  result.unshift(el)//透析管路支数
                }
                else if(el[0] =='puncture_needle_count' && el[1].length<=0) {
                  result.unshift(el)//穿刺针支数
                }
                else if(el[0] =='epo_count' && el[1].length<=0) {
                  result.unshift(el)//促红素支数
                }
                else if(el[0] =='max_ultrafiltration_rate' && el[1].length<=0) {
                  result.unshift(el)//最大超滤率
                }
                else if(el[0] =='blood_access' && el[1]=='0') {
                  result.unshift(el)//血管通路
                }
              });
              console.log(result, "提交的参数当中过滤出为空的");

              let warnarr = [];
              warnarr = this.getArrEqual(filedList, result);
              if (warnarr.length > 0) {
                return this.open_tips(warnarr);
                // 必填弹窗结束
              } else {
                Toast.loading({ forbidClick: true, duration: 0 });
                postSolution(ParamsQuery).then((response) => {
                  if (response.data.state == 0) {
                    Toast.fail(response.data.msg);
                    if(response.data.code == 600000008){
                      this.advice_visibility = false
                      this.infor_visibility = true

                    }else{
                      this.advice_visibility = false
                    }
                    return false;
                  } else {
                    Toast.success("提交成功");

                    this.$emit("advice");
                    this.$emit("longSolution", response.data.data.solution);
                    this.$emit("prescription", response.data.data.prescription);
                    // this.finish()
                  }
                });
              }

              // 推送医嘱
              if (this.prescription_open == 1) {
                var date = new Date();
                var year = date.getFullYear();
                var month = date.getMonth() + 1;
                var day = date.getDate();

                var hours = date.getHours();
                var minites = date.getMinutes();

                if (month < 10) {
                  month = "0" + month;
                }
                if (day < 10) {
                  day = "0" + day;
                }
                if (hours < 10) {
                  hours = "0" + hours;
                }
                if (minites < 10) {
                  minites = "0" + minites;
                }
                var nowDate =
                  year + "-" + month + "-" + day + " " + hours + ":" + minites;

                let params = {
                  advices: this.waitUploadAdvices,
                  advice_date: parseTime(this.$route.query.date, "{y}-{m}-{d}"),
                  advice_doctor: this.waitUploadAdvices[0].advice_doctor,
                  advice_type: this.waitUploadAdvices[0].advice_type,
                  parent_id: this.$route.query.patient_id,
                  start_time: nowDate,
                  remark: "",
                };
                  console.log("今啦hahhahah",params)
                CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(
                  (rs) => {
                    var resp = rs.data;
                    if (resp.state == 1) {
                      this.doctorAdvices = resp.data.advices;
                      this.$emit(
                        "longSolution",
                        resp.data.solution,
                        resp.data.advices
                      );
                      this.$emit(
                        "prescription",
                        resp.data.prescription,
                        resp.data.advices
                      );
                      this.advice_visibility = false
                    } else {
                      console.log("缉拿111111",resp.code)
                      if(resp.code == 600000008){

                        this.advice_visibility = false
                        this.infor_visibility = true

                      }else{
                        this.advice_visibility = false
                      }
                    }
                  }
                );
              }
            } else if (this.is_open == 1) {
              if (this.targetAdvices != null && this.targetAdvices.length > 0) {
                this.advice_visibility = false;
                console.log("进程为长期医嘱");
              var arr = this.dialysisPrescription;

                let ParamsQuery = arr;
                console.log("ParamsQueryOne", ParamsQuery);

                if (this.$route.query.patient_id) {
                  ParamsQuery["patient"] = this.$route.query.patient_id;
                } else {
                  ParamsQuery["patient"] = this.patient_prop.id;
                }
                ParamsQuery["record_date"] = this.record_date;
                ParamsQuery["mode"] = "1";
                // 必填弹窗开始
              console.log(ParamsQuery, "提交的参数");
              let newParams = ParamsQuery;
              if (newParams.anticoagulant == "1") {
                delete newParams.anticoagulant_shouji;
                delete newParams.anticoagulant_weichi;
                delete newParams.anticoagulant_zongliang;
              }
              if (newParams.oxygen_uptake == 2||newParams.oxygen_uptake == 0) {
                delete newParams.oxygen_time;
                delete newParams.oxygen_flow;
              }
              if (newParams.mode_id!=2 && newParams.mode_id!=5 && newParams.mode_id!= 12  && newParams.mode_id!= 28 && newParams.mode_id!= 26&& newParams.mode_id!= 34&& newParams.mode_id!= 35&& newParams.mode_id!= 36&& newParams.mode_id!= 37 && newParams.mode_id!= 10 && newParams.mode_id!= 41){
                delete newParams.replacement_total;
                delete newParams.displace_liqui_part;
                delete newParams.displace_liqui_value;
                delete newParams.displace_speed;
              }
              if(newParams.is_water != '是'){
                delete newParams.single_time;
                delete newParams. single_water;
              }
              if(newParams.anticoagulant != "1"){
                delete newParams.no_heparin_remarks;
              }
              if(newParams.anticoagulant != '10'){
                delete newParams.heparin_sodium;
                delete newParams.nucleoprotamine;
                delete newParams.push_the_protamine;
              }
              if(newParams.anticoagulant != '5'){
                delete newParams.anticoagulant_gaimingcheng;
                delete newParams.anticoagulant_gaijiliang;
              }
              if (this.isShow('置换液总量')==false) {
                delete newParams.displace_liqui_value;
              }
              let result = [];
              let filedList = this.$store.getters.user.fileds;
              let new_arr = Object.entries(newParams);
              new_arr.forEach((el) => {
                if (el[1] === "" || el[1] === 0 ) {
                  // result.push(el);
                  result.unshift(el)
                } else if(el[1] == "0" && el[1].length<=0){
                  result.unshift(el)
                }
                else if(el[0] =='pre_impulse' && el[1].length<=0) {
                  result.unshift(el)//欲冲量
                }
                else if(el[0] =='target_ultrafiltration' && el[1].length<=0) {
                  result.unshift(el)//目标超滤量
                }
                else if (el[0]=='is_water' && el[1] =='请选择'){
                  result.unshift(el)//是否单超脱水
                }
                else if(el[0] =='drhy_water' && el[1].length<=0) {
                  result.unshift(el)//曲线脱水
                }
                else if(el[0] =='dry_water_hour' && el[1].length<=0) {
                  result.unshift(el)//曲线脱水时长
                }
                else if(el[0] =='replacement_flow' && el[1].length<=0) {
                  result.unshift(el)//置换流量
                }
                else if(el[0] =='kalium' && el[1].length<=0) {
                  result.unshift(el)//钾
                }
                else if (el[0]=='sodium' && el[1] =='请选择'){
                  result.unshift(el)//钠
                }
                else if(el[0] =='calcium' && el[1].length<=0) {
                  result.unshift(el)//钙
                }
                else if(el[0] =='bicarbonate' && el[1].length<=0) {
                  result.unshift(el)//碳酸氢盐
                }
                else if(el[0] =='dialysate_flow' && el[1].length<=0) {
                  result.unshift(el)//透析液流量
                }
                else if(el[0] =='dialysate_temperature' && el[1].length<=0) {
                  result.unshift(el)//透析液温度
                }
                else if (el[0]=='conductivity' && el[1] =='请选择'){
                  result.unshift(el)//电导率
                }
                else if(el[0] =='amylaceum' && el[1].length<=0) {
                  result.unshift(el)//葡萄糖
                }
                else if(el[0] =='hemodialysis_pipelines_count' && el[1].length<=0) {
                  result.unshift(el)//透析管路支数
                }
                else if(el[0] =='puncture_needle_count' && el[1].length<=0) {
                  result.unshift(el)//穿刺针支数
                }
                else if(el[0] =='epo_count' && el[1].length<=0) {
                  result.unshift(el)//促红素支数
                }
                else if(el[0] =='max_ultrafiltration_rate' && el[1].length<=0) {
                  result.unshift(el)//最大超滤率
                }
                else if(el[0] =='blood_access' && el[1]=='0') {
                  result.unshift(el)//血管通路
                }
              });
              console.log(result, "提交的参数当中过滤出为空的");

              let warnarr = [];
              warnarr = this.getArrEqual(filedList, result);
              if (warnarr.length > 0) {
                return this.open_tips(warnarr);
                // 必填弹窗结束
              } else {
                // 弹框推送提醒
                this.advicePropForm.list = this.targetAdvices;
                this.advicePropForm.operators = this.admin_users_prop;
                this.advice_visibility = true;
                this.isShowDialog = false;

                for (let i = 0; i < this.advicePropForm.list.length; i++) {
                  if (
                    this.advicePropForm.list[i].parent_id == 0 &&
                    this.advicePropForm.list[i].isCheck == 1
                  ) {
                    this.advicePropForm.result.push(this.advicePropForm.list[i].id);
                  }
                }
              }

              } else {
                Toast.loading({ forbidClick: true, duration: 0 });
                var arr = this.dialysisPrescription;

                let ParamsQuery = arr;
                console.log("ParamsQueryOne", ParamsQuery);

                if (this.$route.query.patient_id) {
                  ParamsQuery["patient"] = this.$route.query.patient_id;
                } else {
                  ParamsQuery["patient"] = this.patient_prop.id;
                }
                ParamsQuery["record_date"] = this.record_date;
                ParamsQuery["mode"] = "1";
            // 必填弹窗开始
              console.log(ParamsQuery, "提交的参数");
              let newParams = ParamsQuery;
              if (newParams.anticoagulant == "1") {
                delete newParams.anticoagulant_shouji;
                delete newParams.anticoagulant_weichi;
                delete newParams.anticoagulant_zongliang;
              }
              if (newParams.oxygen_uptake == 2||newParams.oxygen_uptake == 0) {
                delete newParams.oxygen_time;
                delete newParams.oxygen_flow;
              }
              if (newParams.mode_id!=2 && newParams.mode_id!=5 && newParams.mode_id!= 12 && newParams.mode_id!= 28 && newParams.mode_id!= 26&& newParams.mode_id!= 34&& newParams.mode_id!= 35&& newParams.mode_id!= 36&& newParams.mode_id!= 37 && newParams.mode_id!= 10 && newParams.mode_id!= 41){
                delete newParams.replacement_total;
                delete newParams.displace_liqui_part;
                delete newParams.displace_liqui_value;
                delete newParams.displace_speed;
              }
              if(newParams.is_water != '是'){
                delete newParams.single_time;
                delete newParams. single_water;
              }
              if(newParams.anticoagulant != "1"){
                delete newParams.no_heparin_remarks;
              }
              if(newParams.anticoagulant != '10'){
                delete newParams.heparin_sodium;
                delete newParams.nucleoprotamine;
                delete newParams.push_the_protamine;
              }
              if(newParams.anticoagulant != '5'){
                delete newParams.anticoagulant_gaimingcheng;
                delete newParams.anticoagulant_gaijiliang;
              }
              if (this.isShow('置换液总量')==false) {
                delete newParams.displace_liqui_value;
              }
              let result = [];
              let filedList = this.$store.getters.user.fileds;
              let new_arr = Object.entries(newParams);
              new_arr.forEach((el) => {
                if (el[1] === "" || el[1] === 0 ) {
                  // result.push(el);
                  result.unshift(el)
                } else if(el[1] == "0" && el[1].length<=0){
                  result.unshift(el)
                }
                else if(el[0] =='pre_impulse' && el[1].length<=0) {
                  result.unshift(el)//欲冲量
                }
                else if(el[0] =='target_ultrafiltration' && el[1].length<=0) {
                  result.unshift(el)//目标超滤量
                }
                else if (el[0]=='is_water' && el[1] =='请选择'){
                  result.unshift(el)//是否单超脱水
                }
                else if(el[0] =='drhy_water' && el[1].length<=0) {
                  result.unshift(el)//曲线脱水
                }
                else if(el[0] =='dry_water_hour' && el[1].length<=0) {
                  result.unshift(el)//曲线脱水时长
                }
                else if(el[0] =='replacement_flow' && el[1].length<=0) {
                  result.unshift(el)//置换流量
                }
                else if(el[0] =='kalium' && el[1].length<=0) {
                  result.unshift(el)//钾
                }
                else if (el[0]=='sodium' && el[1] =='请选择'){
                  result.unshift(el)//钠
                }
                else if(el[0] =='calcium' && el[1].length<=0) {
                  result.unshift(el)//钙
                }
                else if(el[0] =='bicarbonate' && el[1].length<=0) {
                  result.unshift(el)//碳酸氢盐
                }
                else if(el[0] =='dialysate_flow' && el[1].length<=0) {
                  result.unshift(el)//透析液流量
                }
                else if(el[0] =='dialysate_temperature' && el[1].length<=0) {
                  result.unshift(el)//透析液温度
                }
                else if (el[0]=='conductivity' && el[1] =='请选择'){
                  result.unshift(el)//电导率
                }
                else if(el[0] =='amylaceum' && el[1].length<=0) {
                  result.unshift(el)//葡萄糖
                }
                else if(el[0] =='hemodialysis_pipelines_count' && el[1].length<=0) {
                  result.unshift(el)//透析管路支数
                }
                else if(el[0] =='puncture_needle_count' && el[1].length<=0) {
                  result.unshift(el)//穿刺针支数
                }
                else if(el[0] =='epo_count' && el[1].length<=0) {
                  result.unshift(el)//促红素支数
                }
                else if(el[0] =='max_ultrafiltration_rate' && el[1].length<=0) {
                  result.unshift(el)//最大超滤率
                }
                else if(el[0] =='blood_access' && el[1]=='0') {
                  result.unshift(el)//血管通路
                }
              });
              console.log(result, "提交的参数当中过滤出为空的");

              let warnarr = [];
              warnarr = this.getArrEqual(filedList, result);
              if (warnarr.length > 0) {
                return this.open_tips(warnarr);
                // 必填弹窗结束
              } else {
                postSolution(ParamsQuery)
                  .then((response) => {
                    if (response.data.state == 0) {
                      Toast.fail(response.data.msg);
                      if(response.data.code == 600000008){
                        this.advice_visibility = false
                        this.infor_visibility = true

                      }else{
                        this.advice_visibility = false
                      }
                      return false;
                    } else {
                      Toast.success("提交成功");

                      this.$emit("advice");
                      this.$emit("longSolution", response.data.data.solution);
                      this.$emit("prescription", response.data.data.prescription);
                      // this.finish()
                    }
                  })
                  .catch((error) => {
                    Toast.fail("请求失败");
                  });
              }

              }
            } else if (this.is_open == 2) {
              if (this.waitUploadAdvices.length > 0) {
                Toast.loading({ forbidClick: true, duration: 0 });
                var arr = this.dialysisPrescription;

                let ParamsQuery = arr;
                console.log("ParamsQueryOne", ParamsQuery);

                if (this.$route.query.patient_id) {
                  ParamsQuery["patient"] = this.$route.query.patient_id;
                } else {
                  ParamsQuery["patient"] = this.patient_prop.id;
                }
                ParamsQuery["record_date"] = this.record_date;
                ParamsQuery["mode"] = "1";
      // 必填弹窗开始
              console.log(ParamsQuery, "提交的参数");
              let newParams = ParamsQuery;
              if (newParams.anticoagulant == "1") {
                delete newParams.anticoagulant_shouji;
                delete newParams.anticoagulant_weichi;
                delete newParams.anticoagulant_zongliang;
              }
              if (newParams.oxygen_uptake == 2||newParams.oxygen_uptake == 0) {
                delete newParams.oxygen_time;
                delete newParams.oxygen_flow;
              }
              if (newParams.mode_id!=2 && newParams.mode_id!=5 && newParams.mode_id!= 12  && newParams.mode_id!= 28 && newParams.mode_id!= 26&& newParams.mode_id!= 34&& newParams.mode_id!= 35&& newParams.mode_id!= 36&& newParams.mode_id!= 37 && newParams.mode_id!= 10 && newParams.mode_id!= 41){
                delete newParams.replacement_total;
                delete newParams.displace_liqui_part;
                delete newParams.displace_liqui_value;
                delete newParams.displace_speed;
              }
              if(newParams.is_water != '是'){
                delete newParams.single_time;
                delete newParams. single_water;
              }
              if(newParams.anticoagulant != "1"){
                delete newParams.no_heparin_remarks;
              }
              if(newParams.anticoagulant != '10'){
                delete newParams.heparin_sodium;
                delete newParams.nucleoprotamine;
                delete newParams.push_the_protamine;
              }
              if(newParams.anticoagulant != '5'){
                delete newParams.anticoagulant_gaimingcheng;
                delete newParams.anticoagulant_gaijiliang;
              }
              if (this.isShow('置换液总量')==false) {
                delete newParams.displace_liqui_value;
              }
              let result = [];
              let filedList = this.$store.getters.user.fileds;
              let new_arr = Object.entries(newParams);
              new_arr.forEach((el) => {
                if (el[1] === "" || el[1] === 0 ) {
                  // result.push(el);
                  result.unshift(el)
                } else if(el[1] == "0" && el[1].length<=0){
                  result.unshift(el)
                }
                else if(el[0] =='pre_impulse' && el[1].length<=0) {
                  result.unshift(el)//欲冲量
                }
                else if(el[0] =='target_ultrafiltration' && el[1].length<=0) {
                  result.unshift(el)//目标超滤量
                }
                else if (el[0]=='is_water' && el[1] =='请选择'){
                  result.unshift(el)//是否单超脱水
                }
                else if(el[0] =='drhy_water' && el[1].length<=0) {
                  result.unshift(el)//曲线脱水
                }
                else if(el[0] =='dry_water_hour' && el[1].length<=0) {
                  result.unshift(el)//曲线脱水时长
                }
                else if(el[0] =='replacement_flow' && el[1].length<=0) {
                  result.unshift(el)//置换流量
                }
                else if(el[0] =='kalium' && el[1].length<=0) {
                  result.unshift(el)//钾
                }
                else if (el[0]=='sodium' && el[1] =='请选择'){
                  result.unshift(el)//钠
                }
                else if(el[0] =='calcium' && el[1].length<=0) {
                  result.unshift(el)//钙
                }
                else if(el[0] =='bicarbonate' && el[1].length<=0) {
                  result.unshift(el)//碳酸氢盐
                }
                else if(el[0] =='dialysate_flow' && el[1].length<=0) {
                  result.unshift(el)//透析液流量
                }
                else if(el[0] =='dialysate_temperature' && el[1].length<=0) {
                  result.unshift(el)//透析液温度
                }
                else if (el[0]=='conductivity' && el[1] =='请选择'){
                  result.unshift(el)//电导率
                }
                else if(el[0] =='amylaceum' && el[1].length<=0) {
                  result.unshift(el)//葡萄糖
                }
                else if(el[0] =='hemodialysis_pipelines_count' && el[1].length<=0) {
                  result.unshift(el)//透析管路支数
                }
                else if(el[0] =='puncture_needle_count' && el[1].length<=0) {
                  result.unshift(el)//穿刺针支数
                }
                else if(el[0] =='epo_count' && el[1].length<=0) {
                  result.unshift(el)//促红素支数
                }
                else if(el[0] =='max_ultrafiltration_rate' && el[1].length<=0) {
                  result.unshift(el)//最大超滤率
                }
                else if(el[0] =='blood_access' && el[1]=='0') {
                  result.unshift(el)//血管通路
                }
              });
              console.log(result, "提交的参数当中过滤出为空的");

              let warnarr = [];
              warnarr = this.getArrEqual(filedList, result);
              if (warnarr.length > 0) {
                return this.open_tips(warnarr);
                // 必填弹窗结束
              } else {
                postSolution(ParamsQuery)
                  .then((response) => {
                    if (response.data.state == 0) {
                      Toast.fail(response.data.msg);
                      if(response.data.code == 600000008){
                      this.advice_visibility = false
                      this.infor_visibility = true

                      }else{
                       this.advice_visibility = false
                      }
                      return false;
                    } else {
                      Toast.success("提交成功");

                      var date = new Date();
                      var year = date.getFullYear();
                      var month = date.getMonth() + 1;
                      var day = date.getDate();

                      var hours = date.getHours();
                      var minites = date.getMinutes();

                      if (month < 10) {
                        month = "0" + month;
                      }
                      if (day < 10) {
                        day = "0" + day;
                      }
                      if (hours < 10) {
                        hours = "0" + hours;
                      }
                      if (minites < 10) {
                        minites = "0" + minites;
                      }
                      var nowDate =
                        year +
                        "-" +
                        month +
                        "-" +
                        day +
                        " " +
                        hours +
                        ":" +
                        minites;

                      let params = {
                        advices: this.waitUploadAdvices,
                        advice_date: parseTime(
                          this.$route.query.date,
                          "{y}-{m}-{d}"
                        ),
                        advice_doctor: this.waitUploadAdvices[0].advice_doctor,
                        advice_type: this.waitUploadAdvices[0].advice_type,
                        parent_id: this.$route.query.patient_id,
                        start_time: nowDate,
                        remark: "",
                      };
                        console.log("今啦w2322333323")
                      CreateGroupAdvice(
                        this.$route.query.patient_id,
                        0,
                        params
                      ).then((rs) => {
                        var resp = rs.data;
                        if (resp.state == 1) {
                          this.doctorAdvices = resp.data.advices;
                          this.$emit(
                            "longSolution",
                            response.data.data.solution,
                            resp.data.advices
                          );
                          this.$emit(
                            "prescription",
                            response.data.data.prescription,
                            resp.data.advices
                          );
                          this.advice_visibility = false
                        } else {
                          console.log("缉拿222222",resp.code)
                          if(resp.code == 600000008){
                            this.advice_visibility = false
                            this.infor_visibility = true

                          }else{
                            this.advice_visibility = false
                          }
                        }
                      });

                      // this.finish()
                    }
                  })
                  .catch((error) => {
                    Toast.fail("请求失败");
                  });
              }

              } else {
                Toast.loading({ forbidClick: true, duration: 0 });
                var arr = this.dialysisPrescription;

                let ParamsQuery = arr;
                console.log("ParamsQueryOne5555", ParamsQuery);

                if (this.$route.query.patient_id) {
                  ParamsQuery["patient"] = this.$route.query.patient_id;
                } else {
                  ParamsQuery["patient"] = this.patient_prop.id;
                }
                ParamsQuery["record_date"] = this.record_date;
                ParamsQuery["mode"] = "1";
      // 必填弹窗开始
              console.log(ParamsQuery, "提交的参数");
              let newParams = ParamsQuery;
              if (newParams.anticoagulant == "1") {
                delete newParams.anticoagulant_shouji;
                delete newParams.anticoagulant_weichi;
                delete newParams.anticoagulant_zongliang;
              }
              if (newParams.oxygen_uptake == 2||newParams.oxygen_uptake == 0) {
                delete newParams.oxygen_time;
                delete newParams.oxygen_flow;
              }
              if (newParams.mode_id!=2 && newParams.mode_id!=5 && newParams.mode_id!= 12 && newParams.mode_id!= 28 && newParams.mode_id!= 26&& newParams.mode_id!= 34&& newParams.mode_id!= 35&& newParams.mode_id!= 36&& newParams.mode_id!= 37 && newParams.mode_id!= 10 && newParams.mode_id!= 41){
                delete newParams.replacement_total;
                delete newParams.displace_liqui_part;
                delete newParams.displace_liqui_value;
                delete newParams.displace_speed;
              }
              if(newParams.is_water != '是'){
                delete newParams.single_time;
                delete newParams. single_water;
              }
              if(newParams.anticoagulant != "1"){
                delete newParams.no_heparin_remarks;
              }
              if(newParams.anticoagulant != '10'){
                delete newParams.heparin_sodium;
                delete newParams.nucleoprotamine;
                delete newParams.push_the_protamine;
              }
              if(newParams.anticoagulant != '5'){
                delete newParams.anticoagulant_gaimingcheng;
                delete newParams.anticoagulant_gaijiliang;
              }
              if (this.isShow('置换液总量')==false) {
                delete newParams.displace_liqui_value;
              }
              let result = [];
              let filedList = this.$store.getters.user.fileds;
              let new_arr = Object.entries(newParams);
              new_arr.forEach((el) => {
                if (el[1] === "" || el[1] === 0 ) {
                  // result.push(el);
                  result.unshift(el)
                } else if(el[1] == "0" && el[1].length<=0){
                  result.unshift(el)
                }
                else if(el[0] =='pre_impulse' && el[1].length<=0) {
                  result.unshift(el)//欲冲量
                }
                else if(el[0] =='target_ultrafiltration' && el[1].length<=0) {
                  result.unshift(el)//目标超滤量
                }
                else if (el[0]=='is_water' && el[1] =='请选择'){
                  result.unshift(el)//是否单超脱水
                }
                else if(el[0] =='drhy_water' && el[1].length<=0) {
                  result.unshift(el)//曲线脱水
                }
                else if(el[0] =='dry_water_hour' && el[1].length<=0) {
                  result.unshift(el)//曲线脱水时长
                }
                else if(el[0] =='replacement_flow' && el[1].length<=0) {
                  result.unshift(el)//置换流量
                }
                else if(el[0] =='kalium' && el[1].length<=0) {
                  result.unshift(el)//钾
                }
                else if (el[0]=='sodium' && el[1] =='请选择'){
                  result.unshift(el)//钠
                }
                else if(el[0] =='calcium' && el[1].length<=0) {
                  result.unshift(el)//钙
                }
                else if(el[0] =='bicarbonate' && el[1].length<=0) {
                  result.unshift(el)//碳酸氢盐
                }
                else if(el[0] =='dialysate_flow' && el[1].length<=0) {
                  result.unshift(el)//透析液流量
                }
                else if(el[0] =='dialysate_temperature' && el[1].length<=0) {
                  result.unshift(el)//透析液温度
                }
                else if (el[0]=='conductivity' && el[1] =='请选择'){
                  result.unshift(el)//电导率
                }
                else if(el[0] =='amylaceum' && el[1].length<=0) {
                  result.unshift(el)//葡萄糖
                }
                else if(el[0] =='hemodialysis_pipelines_count' && el[1].length<=0) {
                  result.unshift(el)//透析管路支数
                }
                else if(el[0] =='puncture_needle_count' && el[1].length<=0) {
                  result.unshift(el)//穿刺针支数
                }
                else if(el[0] =='epo_count' && el[1].length<=0) {
                  result.unshift(el)//促红素支数
                }
                else if(el[0] =='max_ultrafiltration_rate' && el[1].length<=0) {
                  result.unshift(el)//最大超滤率
                }
                else if(el[0] =='blood_access' && el[1]=='0') {
                  result.unshift(el)//血管通路
                }
              });
              console.log(result, "提交的参数当中过滤出为空的");

              let warnarr = [];
              warnarr = this.getArrEqual(filedList, result);
              if (warnarr.length > 0) {
                return this.open_tips(warnarr);
                // 必填弹窗结束
              } else {
                postSolution(ParamsQuery)
                  .then((response) => {
                    if (response.data.state == 0) {
                      Toast.fail(response.data.msg);
                      if(response.data.code == 600000008){
                      this.advice_visibility = false
                      this.infor_visibility = true

                    }else{
                      this.advice_visibility = false
                    }
                      return false;
                    } else {
                      Toast.success("提交成功");

                      this.$emit("longSolution", response.data.data.solution);
                      this.$emit("prescription", response.data.data.prescription);
                      // this.finish()
                    }
                  })
                  .catch((error) => {
                    Toast.fail("请求失败");
                  });
              }

              }
            }
          } else {
            if (this.prescription_prop.creater == 0) {
              if (this.is_open == 0) {
                var arr = this.dialysisPrescription;

                let ParamsQuery = arr;
                console.log("ParamsQueryOne", ParamsQuery);

                if (this.$route.query.patient_id) {
                  ParamsQuery["patient"] = this.$route.query.patient_id;
                } else {
                  ParamsQuery["patient"] = this.patient_prop.id;
                }
                ParamsQuery["record_date"] = this.record_date;
                ParamsQuery["mode"] = "1";
                // 必填弹窗开始
              console.log(ParamsQuery, "提交的参数");
              let newParams = ParamsQuery;
              if (newParams.anticoagulant == "1" || newParams.anticoagulant == "12") {
                delete newParams.anticoagulant_shouji;
                delete newParams.anticoagulant_weichi;
                delete newParams.anticoagulant_zongliang;
              }
              if (newParams.oxygen_uptake == 2||newParams.oxygen_uptake == 0) {
                delete newParams.oxygen_time;
                delete newParams.oxygen_flow;
              }
              if (newParams.mode_id!=2 && newParams.mode_id!=5 && newParams.mode_id!= 12 && newParams.mode_id!= 28 && newParams.mode_id!= 26 && newParams.mode_id!= 34&& newParams.mode_id!= 35&& newParams.mode_id!= 36&& newParams.mode_id!= 37 && newParams.mode_id!= 10 && newParams.mode_id!= 41){
                delete newParams.replacement_total;
                delete newParams.displace_liqui_part;
                delete newParams.displace_liqui_value;
                delete newParams.displace_speed;
              }
              if(newParams.is_water != '是'){
                delete newParams.single_time;
                delete newParams. single_water;
              }
              if(newParams.anticoagulant != "1"){
                delete newParams.no_heparin_remarks;
              }
              if(newParams.anticoagulant != '10'){
                delete newParams.heparin_sodium;
                delete newParams.nucleoprotamine;
                delete newParams.push_the_protamine;
              }
              if(newParams.anticoagulant != '5'){
                delete newParams.anticoagulant_gaimingcheng;
                delete newParams.anticoagulant_gaijiliang;
              }
              if (this.isShow('置换液总量')==false) {
                delete newParams.displace_liqui_value;
              }
              let result = [];
              let filedList = this.$store.getters.user.fileds;
              let new_arr = Object.entries(newParams);
              new_arr.forEach((el) => {
                if (el[1] === "" || el[1] === 0 ) {
                  // result.push(el);
                  result.unshift(el)
                } else if(el[1] == "0" && el[1].length<=0){
                  result.unshift(el)
                }
                else if(el[0] =='pre_impulse' && el[1].length<=0) {
                  result.unshift(el)//欲冲量
                }
                else if(el[0] =='target_ultrafiltration' && el[1].length<=0) {
                  result.unshift(el)//目标超滤量
                }
                else if (el[0]=='is_water' && el[1] =='请选择'){
                  result.unshift(el)//是否单超脱水
                }
                else if(el[0] =='drhy_water' && el[1].length<=0) {
                  result.unshift(el)//曲线脱水
                }
                else if(el[0] =='dry_water_hour' && el[1].length<=0) {
                  result.unshift(el)//曲线脱水时长
                }
                else if(el[0] =='replacement_flow' && el[1].length<=0) {
                  result.unshift(el)//置换流量
                }
                else if(el[0] =='kalium' && el[1].length<=0) {
                  result.unshift(el)//钾
                }
                else if (el[0]=='sodium' && el[1] =='请选择'){
                  result.unshift(el)//钠
                }
                else if(el[0] =='calcium' && el[1].length<=0) {
                  result.unshift(el)//钙
                }
                else if(el[0] =='bicarbonate' && el[1].length<=0) {
                  result.unshift(el)//碳酸氢盐
                }
                else if(el[0] =='dialysate_flow' && el[1].length<=0) {
                  result.unshift(el)//透析液流量
                }
                else if(el[0] =='dialysate_temperature' && el[1].length<=0) {
                  result.unshift(el)//透析液温度
                }
                else if (el[0]=='conductivity' && el[1] =='请选择'){
                  result.unshift(el)//电导率
                }
                else if(el[0] =='amylaceum' && el[1].length<=0) {
                  result.unshift(el)//葡萄糖
                }
                else if(el[0] =='hemodialysis_pipelines_count' && el[1].length<=0) {
                  result.unshift(el)//透析管路支数
                }
                else if(el[0] =='puncture_needle_count' && el[1].length<=0) {
                  result.unshift(el)//穿刺针支数
                }
                else if(el[0] =='epo_count' && el[1].length<=0) {
                  result.unshift(el)//促红素支数
                }
                else if(el[0] =='max_ultrafiltration_rate' && el[1].length<=0) {
                  result.unshift(el)//最大超滤率
                }
                else if(el[0] =='blood_access' && el[1]=='0') {
                  result.unshift(el)//血管通路
                }
              });
              console.log(result, "提交的参数当中过滤出为空的");

              let warnarr = [];
              warnarr = this.getArrEqual(filedList, result);
              if (warnarr.length > 0) {
                return this.open_tips(warnarr);
                // 必填弹窗结束
                } else {
                  Toast.loading({ forbidClick: true, duration: 0 });
                  postSolution(ParamsQuery)
                    .then((response) => {
                      if (response.data.state == 0) {
                        Toast.fail(response.data.msg);
                        if(response.data.code == 600000008){
                          this.advice_visibility = false
                          this.infor_visibility = true

                        }else{
                          this.advice_visibility = false
                        }
                        return false;
                      } else {
                        Toast.success("提交成功");

                        this.$emit("longSolution", response.data.data.solution);
                        this.$emit("prescription", response.data.data.prescription);
                        // this.finish()
                      }
                    })
                    .catch((error) => {
                      Toast.fail("请求失败");
                    });
                }

                // 推送医嘱
                if (this.prescription_open == 1) {
                  var date = new Date();
                  var year = date.getFullYear();
                  var month = date.getMonth() + 1;
                  var day = date.getDate();

                  var hours = date.getHours();
                  var minites = date.getMinutes();

                  if (month < 10) {
                    month = "0" + month;
                  }
                  if (day < 10) {
                    day = "0" + day;
                  }
                  if (hours < 10) {
                    hours = "0" + hours;
                  }
                  if (minites < 10) {
                    minites = "0" + minites;
                  }
                  var nowDate =
                    year + "-" + month + "-" + day + " " + hours + ":" + minites;

                  let params = {
                    advices: this.waitUploadAdvices,
                    advice_date: parseTime(this.$route.query.date, "{y}-{m}-{d}"),
                    advice_doctor: this.waitUploadAdvices[0].advice_doctor,
                    advice_type: this.waitUploadAdvices[0].advice_type,
                    parent_id: this.$route.query.patient_id,
                    start_time: nowDate,
                    remark: "",
                  };
                    console.log("abe")
                  CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(
                    (rs) => {
                      var resp = rs.data;
                      if (resp.state == 1) {
                        this.doctorAdvices = resp.data.advices;
                        this.$emit(
                          "longSolution",
                          response.data.data.solution,
                          resp.data.advices
                        );
                        this.$emit(
                          "prescription",
                          response.data.data.prescription,
                          resp.data.advices
                        );
                        this.advice_visibility = false
                      } else {
                        console.log("缉拿333333",resp.code)
                        if(resp.code == 600000008){
                          this.advice_visibility = false
                          this.infor_visibility = true

                        }else{
                          this.advice_visibility = false
                        }
                      }
                    }
                  );
                }
              } else if (this.is_open == 1) {
                if (this.targetAdvices != null && this.targetAdvices.length > 0) {
                  // 弹框推送提醒
                  this.advicePropForm.list = this.targetAdvices;
                  this.advicePropForm.operators = this.admin_users_prop;
                  this.advice_visibility = true;
                  this.isShowDialog = false;

                  for (let i = 0; i < this.advicePropForm.list.length; i++) {
                    if (
                      this.advicePropForm.list[i].parent_id == 0 &&
                      this.advicePropForm.list[i].isCheck == 1
                    ) {
                      this.advicePropForm.result.push(
                        this.advicePropForm.list[i].id
                      );
                    }
                  }
                } else {
                  Toast.loading({ forbidClick: true, duration: 0 });
                  var arr = this.dialysisPrescription;

                  let ParamsQuery = arr;
                  console.log("ParamsQueryOne", ParamsQuery);

                  if (this.$route.query.patient_id) {
                    ParamsQuery["patient"] = this.$route.query.patient_id;
                  } else {
                    ParamsQuery["patient"] = this.patient_prop.id;
                  }
                  ParamsQuery["record_date"] = this.record_date;
                  ParamsQuery["mode"] = "1";
      // 必填弹窗开始
              console.log(ParamsQuery, "提交的参数");
              let newParams = ParamsQuery;
              if (newParams.anticoagulant == "1" || newParams.anticoagulant == "12") {
                delete newParams.anticoagulant_shouji;
                delete newParams.anticoagulant_weichi;
                delete newParams.anticoagulant_zongliang;
              }
              if (newParams.oxygen_uptake == 2||newParams.oxygen_uptake == 0) {
                delete newParams.oxygen_time;
                delete newParams.oxygen_flow;
              }
              if (newParams.mode_id!=2 && newParams.mode_id!=5 && newParams.mode_id!= 12  && newParams.mode_id!= 28  && newParams.mode_id!= 26&& newParams.mode_id!= 34&& newParams.mode_id!= 35&& newParams.mode_id!= 36&& newParams.mode_id!= 37 && newParams.mode_id!= 10  && newParams.mode_id!= 41){
                delete newParams.replacement_total;
                delete newParams.displace_liqui_part;
                delete newParams.displace_liqui_value;
                delete newParams.displace_speed;
              }
              if(newParams.is_water != '是'){
                delete newParams.single_time;
                delete newParams. single_water;
              }
              if(newParams.anticoagulant != "1"){
                delete newParams.no_heparin_remarks;
              }
              if(newParams.anticoagulant != '10'){
                delete newParams.heparin_sodium;
                delete newParams.nucleoprotamine;
                delete newParams.push_the_protamine;
              }
              if(newParams.anticoagulant != '5'){
                delete newParams.anticoagulant_gaimingcheng;
                delete newParams.anticoagulant_gaijiliang;
              }
              if (this.isShow('置换液总量')==false) {
                delete newParams.displace_liqui_value;
              }
              let result = [];
              let filedList = this.$store.getters.user.fileds;
              let new_arr = Object.entries(newParams);
              new_arr.forEach((el) => {
                if (el[1] === "" || el[1] === 0 ) {
                  // result.push(el);
                  result.unshift(el)
                } else if(el[1] == "0" && el[1].length<=0){
                  result.unshift(el)
                }
                else if(el[0] =='pre_impulse' && el[1].length<=0) {
                  result.unshift(el)//欲冲量
                }
                else if(el[0] =='target_ultrafiltration' && el[1].length<=0) {
                  result.unshift(el)//目标超滤量
                }
                else if (el[0]=='is_water' && el[1] =='请选择'){
                  result.unshift(el)//是否单超脱水
                }
                else if(el[0] =='drhy_water' && el[1].length<=0) {
                  result.unshift(el)//曲线脱水
                }
                else if(el[0] =='dry_water_hour' && el[1].length<=0) {
                  result.unshift(el)//曲线脱水时长
                }
                else if(el[0] =='replacement_flow' && el[1].length<=0) {
                  result.unshift(el)//置换流量
                }
                else if(el[0] =='kalium' && el[1].length<=0) {
                  result.unshift(el)//钾
                }
                else if (el[0]=='sodium' && el[1] =='请选择'){
                  result.unshift(el)//钠
                }
                else if(el[0] =='calcium' && el[1].length<=0) {
                  result.unshift(el)//钙
                }
                else if(el[0] =='bicarbonate' && el[1].length<=0) {
                  result.unshift(el)//碳酸氢盐
                }
                else if(el[0] =='dialysate_flow' && el[1].length<=0) {
                  result.unshift(el)//透析液流量
                }
                else if(el[0] =='dialysate_temperature' && el[1].length<=0) {
                  result.unshift(el)//透析液温度
                }
                else if (el[0]=='conductivity' && el[1] =='请选择'){
                  result.unshift(el)//电导率
                }
                else if(el[0] =='amylaceum' && el[1].length<=0) {
                  result.unshift(el)//葡萄糖
                }
                else if(el[0] =='hemodialysis_pipelines_count' && el[1].length<=0) {
                  result.unshift(el)//透析管路支数
                }
                else if(el[0] =='puncture_needle_count' && el[1].length<=0) {
                  result.unshift(el)//穿刺针支数
                }
                else if(el[0] =='epo_count' && el[1].length<=0) {
                  result.unshift(el)//促红素支数
                }
                else if(el[0] =='max_ultrafiltration_rate' && el[1].length<=0) {
                  result.unshift(el)//最大超滤率
                }
                else if(el[0] =='blood_access' && el[1]=='0') {
                  result.unshift(el)//血管通路
                }
              });
              console.log(result, "提交的参数当中过滤出为空的");

              let warnarr = [];
              warnarr = this.getArrEqual(filedList, result);
              if (warnarr.length > 0) {
                return this.open_tips(warnarr);
                // 必填弹窗结束
              } else {
                postSolution(ParamsQuery)
                    .then((response) => {
                      if (response.data.state == 0) {
                        Toast.fail(response.data.msg);
                      if(response.data.code == 600000008){
                        this.advice_visibility = false
                        this.infor_visibility = true

                        }else{
                          this.advice_visibility = false
                        }
                        return false;
                      } else {
                        Toast.success("提交成功");

                        this.$emit("longSolution", response.data.data.solution);
                        this.$emit("prescription", response.data.data.prescription);
                        // this.finish()
                      }
                    })
                    .catch((error) => {
                      Toast.fail("请求失败");
                    });
              }

                }
              } else if (this.is_open == 2) {
                if (this.waitUploadAdvices.length > 0) {
                  Toast.loading({ forbidClick: true, duration: 0 });
                  var arr = this.dialysisPrescription;

                  let ParamsQuery = arr;
                  console.log("ParamsQueryOne", ParamsQuery);

                  if (this.$route.query.patient_id) {
                    ParamsQuery["patient"] = this.$route.query.patient_id;
                  } else {
                    ParamsQuery["patient"] = this.patient_prop.id;
                  }
                  ParamsQuery["record_date"] = this.record_date;
                  ParamsQuery["mode"] = "2";
      // 必填弹窗开始
              console.log(ParamsQuery, "提交的参数");
              let newParams = ParamsQuery;
              if (newParams.anticoagulant == "1" || newParams.anticoagulant == "12") {
                delete newParams.anticoagulant_shouji;
                delete newParams.anticoagulant_weichi;
                delete newParams.anticoagulant_zongliang;
              }
              if (newParams.oxygen_uptake == 2||newParams.oxygen_uptake == 0) {
                delete newParams.oxygen_time;
                delete newParams.oxygen_flow;
              }
              if (newParams.mode_id!=2 && newParams.mode_id!=5 && newParams.mode_id!= 12 && newParams.mode_id!= 28 && newParams.mode_id!= 26 && newParams.mode_id!= 34&& newParams.mode_id!= 35&& newParams.mode_id!= 36&& newParams.mode_id!= 37 && newParams.mode_id!= 10 && newParams.mode_id!= 41){
                delete newParams.replacement_total;
                delete newParams.displace_liqui_part;
                delete newParams.displace_liqui_value;
                delete newParams.displace_speed;
              }
              if(newParams.is_water != '是'){
                delete newParams.single_time;
                delete newParams. single_water;
              }
              if(newParams.anticoagulant != "1"){
                delete newParams.no_heparin_remarks;
              }
              if(newParams.anticoagulant != '10'){
                delete newParams.heparin_sodium;
                delete newParams.nucleoprotamine;
                delete newParams.push_the_protamine;
              }
              if(newParams.anticoagulant != '5'){
                delete newParams.anticoagulant_gaimingcheng;
                delete newParams.anticoagulant_gaijiliang;
              }
              if (this.isShow('置换液总量')==false) {
                delete newParams.displace_liqui_value;
              }
              let result = [];
              let filedList = this.$store.getters.user.fileds;
              let new_arr = Object.entries(newParams);
              new_arr.forEach((el) => {
                if (el[1] === "" || el[1] === 0 ) {
                  // result.push(el);
                  result.unshift(el)
                } else if(el[1] == "0" && el[1].length<=0){
                  result.unshift(el)
                }
                else if(el[0] =='pre_impulse' && el[1].length<=0) {
                  result.unshift(el)//欲冲量
                }
                else if(el[0] =='target_ultrafiltration' && el[1].length<=0) {
                  result.unshift(el)//目标超滤量
                }
                else if (el[0]=='is_water' && el[1] =='请选择'){
                  result.unshift(el)//是否单超脱水
                }
                else if(el[0] =='drhy_water' && el[1].length<=0) {
                  result.unshift(el)//曲线脱水
                }
                else if(el[0] =='dry_water_hour' && el[1].length<=0) {
                  result.unshift(el)//曲线脱水时长
                }
                else if(el[0] =='replacement_flow' && el[1].length<=0) {
                  result.unshift(el)//置换流量
                }
                else if(el[0] =='kalium' && el[1].length<=0) {
                  result.unshift(el)//钾
                }
                else if (el[0]=='sodium' && el[1] =='请选择'){
                  result.unshift(el)//钠
                }
                else if(el[0] =='calcium' && el[1].length<=0) {
                  result.unshift(el)//钙
                }
                else if(el[0] =='bicarbonate' && el[1].length<=0) {
                  result.unshift(el)//碳酸氢盐
                }
                else if(el[0] =='dialysate_flow' && el[1].length<=0) {
                  result.unshift(el)//透析液流量
                }
                else if(el[0] =='dialysate_temperature' && el[1].length<=0) {
                  result.unshift(el)//透析液温度
                }
                else if (el[0]=='conductivity' && el[1] =='请选择'){
                  result.unshift(el)//电导率
                }
                else if(el[0] =='amylaceum' && el[1].length<=0) {
                  result.unshift(el)//葡萄糖
                }
                else if(el[0] =='hemodialysis_pipelines_count' && el[1].length<=0) {
                  result.unshift(el)//透析管路支数
                }
                else if(el[0] =='puncture_needle_count' && el[1].length<=0) {
                  result.unshift(el)//穿刺针支数
                }
                else if(el[0] =='epo_count' && el[1].length<=0) {
                  result.unshift(el)//促红素支数
                }
                else if(el[0] =='max_ultrafiltration_rate' && el[1].length<=0) {
                  result.unshift(el)//最大超滤率
                }
                else if(el[0] =='blood_access' && el[1]=='0') {
                  result.unshift(el)//血管通路
                }
              });
              console.log(result, "提交的参数当中过滤出为空的");

              let warnarr = [];
              warnarr = this.getArrEqual(filedList, result);
              if (warnarr.length > 0) {
                return this.open_tips(warnarr);
                // 必填弹窗结束
              } else {
                postSolution(ParamsQuery)
                    .then((response) => {
                      if (response.data.state == 0) {
                        Toast.fail(response.data.msg);
                      if(response.data.code == 600000008){
                        this.advice_visibility = false
                        this.infor_visibility = true

                        }else{
                          this.advice_visibility = false
                        }
                        return false;
                      } else {
                        this.advice_visibility = false;

                        var date = new Date();
                        var year = date.getFullYear();
                        var month = date.getMonth() + 1;
                        var day = date.getDate();

                        var hours = date.getHours();
                        var minites = date.getMinutes();

                        if (month < 10) {
                          month = "0" + month;
                        }
                        if (day < 10) {
                          day = "0" + day;
                        }
                        if (hours < 10) {
                          hours = "0" + hours;
                        }
                        if (minites < 10) {
                          minites = "0" + minites;
                        }
                        var nowDate =
                          year +
                          "-" +
                          month +
                          "-" +
                          day +
                          " " +
                          hours +
                          ":" +
                          minites;

                        let params = {
                          advices: this.waitUploadAdvices,
                          advice_date: parseTime(
                            this.$route.query.date,
                            "{y}-{m}-{d}"
                          ),
                          advice_doctor: this.waitUploadAdvices[0].advice_doctor,
                          advice_type: this.waitUploadAdvices[0].advice_type,
                          parent_id: this.$route.query.patient_id,
                          start_time: nowDate,
                          remark: "",
                        };
                          console.log("今啦232323")
                        CreateGroupAdvice(
                          this.$route.query.patient_id,
                          0,
                          params
                        ).then((rs) => {
                          var resp = rs.data;
                          if (resp.state == 1) {
                            console.log("中国人民33333333333333");
                            this.doctorAdvices = resp.data.advices;
                            this.$emit(
                              "longSolution",
                              response.data.data.solution,
                              resp.data.advices
                            );
                            this.$emit(
                              "prescription",
                              response.data.data.prescription,
                              resp.data.advices
                            );
                            this.advice_visibility = false
                          } else {
                            console.log("缉拿444444",resp.code)

                            if(resp.code == 600000008){
                              this.advice_visibility = false
                              this.infor_visibility = true
                            }else{
                              this.advice_visibility = false
                            }
                          }
                        });
                        Toast.success("提交成功");
                        // this.finish()
                      }
                    })
                    .catch((error) => {
                      Toast.fail("请求失败");
                    });
              }

                } else {
                  Toast.loading({ forbidClick: true, duration: 0 });
                  var arr = this.dialysisPrescription;

                  let ParamsQuery = arr;
                  console.log("ParamsQueryOne", ParamsQuery);

                  if (this.$route.query.patient_id) {
                    ParamsQuery["patient"] = this.$route.query.patient_id;
                  } else {
                    ParamsQuery["patient"] = this.patient_prop.id;
                  }
                  ParamsQuery["record_date"] = this.record_date;
                  ParamsQuery["mode"] = "1";
                    // 必填弹窗开始
              console.log(ParamsQuery, "提交的参数");
              let newParams = ParamsQuery;
              if (newParams.anticoagulant == "1" || newParams.anticoagulant == "12") {
                delete newParams.anticoagulant_shouji;
                delete newParams.anticoagulant_weichi;
                delete newParams.anticoagulant_zongliang;
              }
              if (newParams.oxygen_uptake == 2||newParams.oxygen_uptake == 0) {
                delete newParams.oxygen_time;
                delete newParams.oxygen_flow;
              }
              if (newParams.mode_id!=2 && newParams.mode_id!=5 && newParams.mode_id!= 12 && newParams.mode_id!= 28 && newParams.mode_id!= 26&& newParams.mode_id!= 34&& newParams.mode_id!= 35&& newParams.mode_id!= 36&& newParams.mode_id!= 37 && newParams.mode_id!= 10 && newParams.mode_id!= 41){
                delete newParams.replacement_total;
                delete newParams.displace_liqui_part;
                delete newParams.displace_liqui_value;
                delete newParams.displace_speed;
              }
              if(newParams.is_water != '是'){
                delete newParams.single_time;
                delete newParams. single_water;
              }
              if(newParams.anticoagulant != "1"){
                delete newParams.no_heparin_remarks;
              }
              if(newParams.anticoagulant != '10'){
                delete newParams.heparin_sodium;
                delete newParams.nucleoprotamine;
                delete newParams.push_the_protamine;
              }
              if(newParams.anticoagulant != '5'){
                delete newParams.anticoagulant_gaimingcheng;
                delete newParams.anticoagulant_gaijiliang;
              }
              if (this.isShow('置换液总量')==false) {
                delete newParams.displace_liqui_value;
              }
              let result = [];
              let filedList = this.$store.getters.user.fileds;
              let new_arr = Object.entries(newParams);
              new_arr.forEach((el) => {
                if (el[1] === "" || el[1] === 0 ) {
                  // result.push(el);
                  result.unshift(el)
                } else if(el[1] == "0" && el[1].length<=0){
                  result.unshift(el)
                }
                else if(el[0] =='pre_impulse' && el[1].length<=0) {
                  result.unshift(el)//欲冲量
                }
                else if(el[0] =='target_ultrafiltration' && el[1].length<=0) {
                  result.unshift(el)//目标超滤量
                }
                else if (el[0]=='is_water' && el[1] =='请选择'){
                  result.unshift(el)//是否单超脱水
                }
                else if(el[0] =='drhy_water' && el[1].length<=0) {
                  result.unshift(el)//曲线脱水
                }
                else if(el[0] =='dry_water_hour' && el[1].length<=0) {
                  result.unshift(el)//曲线脱水时长
                }
                else if(el[0] =='replacement_flow' && el[1].length<=0) {
                  result.unshift(el)//置换流量
                }
                else if(el[0] =='kalium' && el[1].length<=0) {
                  result.unshift(el)//钾
                }
                else if (el[0]=='sodium' && el[1] =='请选择'){
                  result.unshift(el)//钠
                }
                else if(el[0] =='calcium' && el[1].length<=0) {
                  result.unshift(el)//钙
                }
                else if(el[0] =='bicarbonate' && el[1].length<=0) {
                  result.unshift(el)//碳酸氢盐
                }
                else if(el[0] =='dialysate_flow' && el[1].length<=0) {
                  result.unshift(el)//透析液流量
                }
                else if(el[0] =='dialysate_temperature' && el[1].length<=0) {
                  result.unshift(el)//透析液温度
                }
                else if (el[0]=='conductivity' && el[1] =='请选择'){
                  result.unshift(el)//电导率
                }
                else if(el[0] =='amylaceum' && el[1].length<=0) {
                  result.unshift(el)//葡萄糖
                }
                else if(el[0] =='hemodialysis_pipelines_count' && el[1].length<=0) {
                  result.unshift(el)//透析管路支数
                }
                else if(el[0] =='puncture_needle_count' && el[1].length<=0) {
                  result.unshift(el)//穿刺针支数
                }
                else if(el[0] =='epo_count' && el[1].length<=0) {
                  result.unshift(el)//促红素支数
                }
                else if(el[0] =='max_ultrafiltration_rate' && el[1].length<=0) {
                  result.unshift(el)//最大超滤率
                }
                else if(el[0] =='blood_access' && el[1]=='0') {
                  result.unshift(el)//血管通路
                }
              });
              console.log(result, "提交的参数当中过滤出为空的");

              let warnarr = [];
              warnarr = this.getArrEqual(filedList, result);
              if (warnarr.length > 0) {
                return this.open_tips(warnarr);
                // 必填弹窗结束
              } else {
                postSolution(ParamsQuery)
                    .then((response) => {
                      if (response.data.state == 0) {
                        Toast.fail(response.data.msg);
                        if(response.data.code == 600000008){
                          this.advice_visibility = false
                          this.infor_visibility = true

                        }else{
                          this.advice_visibility = false
                        }
                        return false;
                      } else {
                        Toast.success("提交成功");
                        this.$emit("advice");
                        this.$emit("longSolution", response.data.data.solution);
                        this.$emit("prescription", response.data.data.prescription);
                        // this.finish()
                      }
                    })
                    .catch((error) => {
                      Toast.fail("请求失败");
                    });
              }

                }
              }
            } else {
              var arr = this.dialysisPrescription;

              let ParamsQuery = arr;
              console.log("ParamsQueryOne", ParamsQuery);
              if (this.$route.query.patient_id) {
                ParamsQuery["patient"] = this.$route.query.patient_id;
              } else {
                ParamsQuery["patient"] = this.patient_prop.id;
              }
              ParamsQuery["record_date"] = this.record_date;
              ParamsQuery["mode"] = "1";

              // 必填弹窗开始
              console.log(ParamsQuery, "提交的参数");
              let newParams = ParamsQuery;
              if (newParams.anticoagulant == "1" || newParams.anticoagulant == "12") {
                delete newParams.anticoagulant_shouji;
                delete newParams.anticoagulant_weichi;
                delete newParams.anticoagulant_zongliang;
              }
              if (newParams.oxygen_uptake == 2||newParams.oxygen_uptake == 0) {
                delete newParams.oxygen_time;
                delete newParams.oxygen_flow;
              }
              if (newParams.mode_id!=2 && newParams.mode_id!=5 && newParams.mode_id!= 12 && newParams.mode_id!= 28  && newParams.mode_id!= 26 && newParams.mode_id!= 34&& newParams.mode_id!= 35&& newParams.mode_id!= 36&& newParams.mode_id!= 37 && newParams.mode_id!= 10 && newParams.mode_id!= 41){
                delete newParams.replacement_total;
                delete newParams.displace_liqui_part;
                delete newParams.displace_liqui_value;
                delete newParams.displace_speed;
              }
              if(newParams.is_water != '是'){
                delete newParams.single_time;
                delete newParams. single_water;
              }
              if(newParams.anticoagulant != "1"){
                delete newParams.no_heparin_remarks;
              }
              if(newParams.anticoagulant != '10'){
                delete newParams.heparin_sodium;
                delete newParams.nucleoprotamine;
                delete newParams.push_the_protamine;
              }
              if(newParams.anticoagulant != '5'){
                delete newParams.anticoagulant_gaimingcheng;
                delete newParams.anticoagulant_gaijiliang;
              }
              if (this.isShow('置换液总量')==false) {
                delete newParams.displace_liqui_value;
              }
              let result = [];
              let filedList = this.$store.getters.user.fileds;
              let new_arr = Object.entries(newParams);
              new_arr.forEach((el) => {
                if (el[1] === "" || el[1] === 0 ) {
                  // result.push(el);
                  result.unshift(el)
                } else if(el[1] == "0" && el[1].length<=0){
                  result.unshift(el)
                }
                else if(el[0] =='pre_impulse' && el[1].length<=0) {
                  result.unshift(el)//欲冲量
                }
                else if(el[0] =='target_ultrafiltration' && el[1].length<=0) {
                  result.unshift(el)//目标超滤量
                }
                else if (el[0]=='is_water' && el[1] =='请选择'){
                  result.unshift(el)//是否单超脱水
                }
                else if(el[0] =='drhy_water' && el[1].length<=0) {
                  result.unshift(el)//曲线脱水
                }
                else if(el[0] =='dry_water_hour' && el[1].length<=0) {
                  result.unshift(el)//曲线脱水时长
                }
                else if(el[0] =='replacement_flow' && el[1].length<=0) {
                  result.unshift(el)//置换流量
                }
                else if(el[0] =='kalium' && el[1].length<=0) {
                  result.unshift(el)//钾
                }
                else if (el[0]=='sodium' && el[1] =='请选择'){
                  result.unshift(el)//钠
                }
                else if(el[0] =='calcium' && el[1].length<=0) {
                  result.unshift(el)//钙
                }
                else if(el[0] =='bicarbonate' && el[1].length<=0) {
                  result.unshift(el)//碳酸氢盐
                }
                else if(el[0] =='dialysate_flow' && el[1].length<=0) {
                  result.unshift(el)//透析液流量
                }
                else if(el[0] =='dialysate_temperature' && el[1].length<=0) {
                  result.unshift(el)//透析液温度
                }
                else if (el[0]=='conductivity' && el[1] =='请选择'){
                  result.unshift(el)//电导率
                }
                else if(el[0] =='amylaceum' && el[1].length<=0) {
                  result.unshift(el)//葡萄糖
                }
                else if(el[0] =='hemodialysis_pipelines_count' && el[1].length<=0) {
                  result.unshift(el)//透析管路支数
                }
                else if(el[0] =='puncture_needle_count' && el[1].length<=0) {
                  result.unshift(el)//穿刺针支数
                }
                else if(el[0] =='epo_count' && el[1].length<=0) {
                  result.unshift(el)//促红素支数
                }
                else if(el[0] =='max_ultrafiltration_rate' && el[1].length<=0) {
                  result.unshift(el)//最大超滤率
                }
                else if(el[0] =='blood_access' && el[1]=='0') {
                  result.unshift(el)//血管通路
                }
              });
              console.log(result, "提交的参数当中过滤出为空的");

              let warnarr = [];
              warnarr = this.getArrEqual(filedList, result);
              if (warnarr.length > 0) {
                return this.open_tips(warnarr);
                // 必填弹窗结束
              } else {
                Toast.loading({ forbidClick: true, duration: 0 });
                postSolution(ParamsQuery)
                  .then((response) => {
                    if (response.data.state == 0) {
                      Toast.fail(response.data.msg);
                    if(response.data.code == 600000008){
                      this.advice_visibility = false
                      this.infor_visibility = true

                    }else{
                      this.advice_visibility = false
                    }
                      return false;
                    } else {
                      Toast.success("提交成功");
                      this.$emit("longSolution", response.data.data.solution);

                      this.$emit("prescription", response.data.data.prescription);
                      // this.finish()
                    }
                  })
                  .catch((error) => {
                    Toast.fail("请求失败");
                  });
              }
            }
          }
        })
        .catch(() => {
          // console.log('取消');
          // on cancel
        });

    },

    commitInfo: function () {
      console.log("this.dialysisPrescription.mode_id", this.dialysisPrescription.mode_id)
      this.changePrescription = 0
      if (this.his_is_open == 1) {
        this.is_open = 0;
      }
      if(this.$store.getters.user.template_info.org_id == 10340 || this.$store.getters.user.template_info.org_id == 3877){

        if(this.dialysisPrescription.anticoagulant!=1){
          if(this.dialysisPrescription.prescribing_number == 0){
            Toast.fail('请填写开药数量!')
             return
         }
        }

         if(this.dialysisPrescription.anticoagulant == 0){
          Toast.fail('请填写抗凝剂!')
          return
         }
       }
      
      if(this.$store.getters.user.template_info.org_id == 10721){
         if(this.dialysisPrescription.prescription_water == 0){
          Toast.fail('请填写处方脱水量!')
          return
         }
      } 
      if(this.dialysisPrescription.mode_id != 2){
        this.dialysisPrescription.replacement_flow = ""
      }

      if(this.$store.getters.user.template_info.org_id != 9671){
        if (this.$store.getters.user.template_info.template_id == 6) {
        if (this.dialysisPrescription.mode_id == 2) {
          if (
            this.dialysisPrescription.displace_liqui_part == 0 ||
            this.dialysisPrescription.displace_liqui_part == -2 ||
            this.dialysisPrescription.displace_liqui_value == 0 ||
            this.dialysisPrescription.displace_liqui_value == ""
          ) {
            Toast.fail("HDF模式下置换方式和置换液总量不能为空！");
            return;
          }
          if (
            this.dialysisPrescription.mode_id != 2 &&
            this.dialysisPrescription.mode_id != 5 &&
            this.dialysisPrescription.mode_id != 12 &&
            this.dialysisPrescription.mode_id !=28 &&
            this.dialysisPrescription.mode_id !=34 &&
            this.dialysisPrescription.mode_id !=35&&
            this.dialysisPrescription.mode_id !=36&&
            this.dialysisPrescription.mode_id !=37&&
            this.dialysisPrescription.mode_id !=38&&
            this.dialysisPrescription.mode_id !=10&&
            this.dialysisPrescription.mode_id !=26&&
            this.dialysisPrescription.mode_id !=41
          ) {
            this.dialysisPrescription.displace_liqui_part = 0;
            this.dialysisPrescription.displace_liqui_value = 0;
          }
        }
      }
      }
     
      this.is_pre = 1;

      if (this.prescription_prop.id == "") {
        if (this.is_open == 0) {
          var arr = this.dialysisPrescription;

          let ParamsQuery = arr;
          console.log("ParamsQueryOne", ParamsQuery);

          if (this.$route.query.patient_id) {
            ParamsQuery["patient"] = this.$route.query.patient_id;
          } else {
            ParamsQuery["patient"] = this.patient_prop.id;
          }
          ParamsQuery["record_date"] = this.record_date;
          ParamsQuery["mode"] = "1";
          // 必填弹窗开始
          console.log(ParamsQuery, "提交的参数");
          let newParams = ParamsQuery;
          if (newParams.anticoagulant == "1" || newParams.anticoagulant == "12") {
            delete newParams.anticoagulant_shouji;
            delete newParams.anticoagulant_weichi;
            delete newParams.anticoagulant_zongliang;
          }
          if (newParams.oxygen_uptake == 2||newParams.oxygen_uptake == 0) {
            delete newParams.oxygen_time;
            delete newParams.oxygen_flow;
          }
          if (newParams.mode_id!=2 && newParams.mode_id!=5 && newParams.mode_id!= 12 && newParams.mode_id!= 26 && newParams.mode_id!= 34 && newParams.mode_id!= 35 && newParams.mode_id!= 36&& newParams.mode_id!= 37 && newParams.mode_id!= 10 && newParams.mode_id!= 41){
            delete newParams.replacement_total;
            delete newParams.displace_liqui_part;
            delete newParams.displace_liqui_value;
            delete newParams.displace_speed;
          }
          if(newParams.is_water != '是'){
            delete newParams.single_time;
            delete newParams. single_water;
          }
          if(newParams.anticoagulant != "1"){
            delete newParams.no_heparin_remarks;
          }
          if(newParams.anticoagulant != '10'){
            delete newParams.heparin_sodium;
            delete newParams.nucleoprotamine;
            delete newParams.push_the_protamine;
          }
          if(newParams.anticoagulant != '5'){
            delete newParams.anticoagulant_gaimingcheng;
            delete newParams.anticoagulant_gaijiliang;
          }
          if (this.isShow('置换液总量')==false) {
            delete newParams.displace_liqui_value;
          }
          let result = [];
          let filedList = this.$store.getters.user.fileds;
          let new_arr = Object.entries(newParams);
          new_arr.forEach((el) => {
            if (el[1] === "" || el[1] === 0 ) {
              // result.push(el);
              result.unshift(el)
            } else if(el[1] == "0" && el[1].length<=0){
              result.unshift(el)
            }
            else if(el[0] =='pre_impulse' && el[1].length<=0) {
              result.unshift(el)//欲冲量
            }
            else if(el[0] =='target_ultrafiltration' && el[1].length<=0) {
              result.unshift(el)//目标超滤量
            }
            else if (el[0]=='is_water' && el[1] =='请选择'){
              result.unshift(el)//是否单超脱水
            }
            else if(el[0] =='drhy_water' && el[1].length<=0) {
              result.unshift(el)//曲线脱水
            }
            else if(el[0] =='dry_water_hour' && el[1].length<=0) {
              result.unshift(el)//曲线脱水时长
            }
            else if(el[0] =='replacement_flow' && el[1].length<=0) {
              result.unshift(el)//置换流量
            }
            else if(el[0] =='kalium' && el[1].length<=0) {
              result.unshift(el)//钾
            }
            else if (el[0]=='sodium' && el[1] =='请选择'){
              result.unshift(el)//钠
            }
            else if(el[0] =='calcium' && el[1].length<=0) {
              result.unshift(el)//钙
            }
            else if(el[0] =='bicarbonate' && el[1].length<=0) {
              result.unshift(el)//碳酸氢盐
            }
            else if(el[0] =='dialysate_flow' && el[1].length<=0) {
              result.unshift(el)//透析液流量
            }
            else if(el[0] =='dialysate_temperature' && el[1].length<=0) {
              result.unshift(el)//透析液温度
            }
            else if (el[0]=='conductivity' && el[1] =='请选择'){
              result.unshift(el)//电导率
            }
            else if(el[0] =='amylaceum' && el[1].length<=0) {
              result.unshift(el)//葡萄糖
            }
            else if(el[0] =='hemodialysis_pipelines_count' && el[1].length<=0) {
              result.unshift(el)//透析管路支数
            }
            else if(el[0] =='puncture_needle_count' && el[1].length<=0) {
              result.unshift(el)//穿刺针支数
            }
            else if(el[0] =='epo_count' && el[1].length<=0) {
              result.unshift(el)//促红素支数
            }
            else if(el[0] =='max_ultrafiltration_rate' && el[1].length<=0) {
              result.unshift(el)//最大超滤率
            }
            else if(el[0] =='blood_access' && el[1]=='0') {
              result.unshift(el)//血管通路
            }
          });
          console.log(result, "提交的参数当中过滤出为空的");

          let warnarr = [];
          warnarr = this.getArrEqual(filedList, result);
          if (warnarr.length > 0) {
            return this.open_tips(warnarr);
            // 必填弹窗结束
          } else {
            Toast.loading({ forbidClick: true, duration: 0 });
            commitDialysisPrescription(ParamsQuery).then((response) => {
              if (response.data.state == 0) {
                Toast.fail(response.data.msg);
                if(response.data.code == 600000008){
                   this.infor_visibility = true
                 }
                return false;

              } else {
                Toast.success("提交成功");

                this.$emit("advice");
                this.$emit("longSolution", response.data.data.solution);
                this.$emit("prescription", response.data.data.prescription);
                // this.finish()
              }
              this.changePrescription = 0
            });
          }
          // 推送医嘱
          if (this.prescription_open == 1) {
            var date = new Date();
            var year = date.getFullYear();
            var month = date.getMonth() + 1;
            var day = date.getDate();

            var hours = date.getHours();
            var minites = date.getMinutes();

            if (month < 10) {
              month = "0" + month;
            }
            if (day < 10) {
              day = "0" + day;
            }
            if (hours < 10) {
              hours = "0" + hours;
            }
            if (minites < 10) {
              minites = "0" + minites;
            }
            var nowDate =
              year + "-" + month + "-" + day + " " + hours + ":" + minites;

            let params = {
              advices: this.waitUploadAdvices,
              advice_date: parseTime(this.$route.query.date, "{y}-{m}-{d}"),
              advice_doctor: this.waitUploadAdvices[0].advice_doctor,
              advice_type: this.waitUploadAdvices[0].advice_type,
              parent_id: this.$route.query.patient_id,
              start_time: nowDate,
              remark: "",
            };
            CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(
              (rs) => {
                var resp = rs.data;
                if (resp.state == 1) {
                  this.doctorAdvices = resp.data.advices;
                  this.$emit(
                    "longSolution",
                    response.data.data.solution,
                    resp.data.advices
                  );
                  this.$emit(
                    "prescription",
                    response.data.data.prescription,
                    resp.data.advices
                  );
                  this.advice_visibility = false
                } else {
                  if(resp.code == 600000008){
                    this.infor_visibility = true
                    this.advice_visibility = false
                  }else{
                    this.advice_visibility = false
                  }
                }
              }
            );
          }
        } else if (this.is_open == 1) {
          console.log('111111111',this.is_open);
          if (this.targetAdvices != null && this.targetAdvices.length > 0) {
            console.log('444444444565',this.changePrescription);
            this.advice_visibility = false;
            console.log("进程为长期医嘱");
            var arr = this.dialysisPrescription;

            let ParamsQuery = arr;
            console.log("ParamsQueryOne", ParamsQuery);

            if (this.$route.query.patient_id) {
              ParamsQuery["patient"] = this.$route.query.patient_id;
            } else {
              ParamsQuery["patient"] = this.patient_prop.id;
            }
            ParamsQuery["record_date"] = this.record_date;
            ParamsQuery["mode"] = "1";
            // 必填弹窗开始
          console.log(ParamsQuery, "提交的参数");
          let newParams = ParamsQuery;
          if (newParams.anticoagulant == "1") {
            delete newParams.anticoagulant_shouji;
            delete newParams.anticoagulant_weichi;
            delete newParams.anticoagulant_zongliang;
          }
          if (newParams.oxygen_uptake == 2||newParams.oxygen_uptake == 0) {
            delete newParams.oxygen_time;
            delete newParams.oxygen_flow;
          }
          if (newParams.mode_id!=2 && newParams.mode_id!=5 && newParams.mode_id!= 12 && newParams.mode_id!= 28 &&newParams.mode_id!= 26  &&newParams.mode_id!= 10 &&newParams.mode_id!= 41){
            delete newParams.replacement_total;
            delete newParams.displace_liqui_part;
            delete newParams.displace_liqui_value;
            delete newParams.displace_speed;
          }
          if(newParams.is_water != '是'){
            delete newParams.single_time;
            delete newParams. single_water;
          }
          if(newParams.anticoagulant != "1"){
            delete newParams.no_heparin_remarks;
          }
          if(newParams.anticoagulant != '10'){
            delete newParams.heparin_sodium;
            delete newParams.nucleoprotamine;
            delete newParams.push_the_protamine;
          }
          if(newParams.anticoagulant != '5'){
            delete newParams.anticoagulant_gaimingcheng;
            delete newParams.anticoagulant_gaijiliang;
          }
          if (this.isShow('置换液总量')==false) {
            delete newParams.displace_liqui_value;
          }
          let result = [];
          let filedList = this.$store.getters.user.fileds;
          let new_arr = Object.entries(newParams);
          new_arr.forEach((el) => {
            if (el[1] === "" || el[1] === 0 ) {
              // result.push(el);
              result.unshift(el)
            } else if(el[1] == "0" && el[1].length<=0){
              result.unshift(el)
            }
            else if(el[0] =='pre_impulse' && el[1].length<=0) {
              result.unshift(el)//欲冲量
            }
            else if(el[0] =='target_ultrafiltration' && el[1].length<=0) {
              result.unshift(el)//目标超滤量
            }
            else if (el[0]=='is_water' && el[1] =='请选择'){
              result.unshift(el)//是否单超脱水
            }
            else if(el[0] =='drhy_water' && el[1].length<=0) {
              result.unshift(el)//曲线脱水
            }
            else if(el[0] =='dry_water_hour' && el[1].length<=0) {
              result.unshift(el)//曲线脱水时长
            }
            else if(el[0] =='replacement_flow' && el[1].length<=0) {
              result.unshift(el)//置换流量
            }
            else if(el[0] =='kalium' && el[1].length<=0) {
              result.unshift(el)//钾
            }
            else if (el[0]=='sodium' && el[1] =='请选择'){
              result.unshift(el)//钠
            }
            else if(el[0] =='calcium' && el[1].length<=0) {
              result.unshift(el)//钙
            }
            else if(el[0] =='bicarbonate' && el[1].length<=0) {
              result.unshift(el)//碳酸氢盐
            }
            else if(el[0] =='dialysate_flow' && el[1].length<=0) {
              result.unshift(el)//透析液流量
            }
            else if(el[0] =='dialysate_temperature' && el[1].length<=0) {
              result.unshift(el)//透析液温度
            }
            else if (el[0]=='conductivity' && el[1] =='请选择'){
              result.unshift(el)//电导率
            }
            else if(el[0] =='amylaceum' && el[1].length<=0) {
              result.unshift(el)//葡萄糖
            }
            else if(el[0] =='hemodialysis_pipelines_count' && el[1].length<=0) {
              result.unshift(el)//透析管路支数
            }
            else if(el[0] =='puncture_needle_count' && el[1].length<=0) {
              result.unshift(el)//穿刺针支数
            }
            else if(el[0] =='epo_count' && el[1].length<=0) {
              result.unshift(el)//促红素支数
            }
            else if(el[0] =='max_ultrafiltration_rate' && el[1].length<=0) {
              result.unshift(el)//最大超滤率
            }
            else if(el[0] =='blood_access' && el[1]=='0') {
              result.unshift(el)//血管通路
            }
          });
          console.log(result, "提交的参数当中过滤出为空的");

          let warnarr = [];
          warnarr = this.getArrEqual(filedList, result);
          if (warnarr.length > 0) {
            return this.open_tips(warnarr);
            // 必填弹窗结束
          } else {
            // 弹框推送提醒
            this.advicePropForm.list = this.targetAdvices;
            this.advicePropForm.operators = this.admin_users_prop;
            this.advice_visibility = true;
            this.isShowDialog = false;

            for (let i = 0; i < this.advicePropForm.list.length; i++) {
              if (
                this.advicePropForm.list[i].parent_id == 0 &&
                this.advicePropForm.list[i].isCheck == 1
              ) {
                this.advicePropForm.result.push(this.advicePropForm.list[i].id);
              }
            }
            console.log('qweretryuertyer',this.changePrescription);
            this.changePrescription = 0
          }

          } else {

            Toast.loading({ forbidClick: true, duration: 0 });
            var arr = this.dialysisPrescription;

            let ParamsQuery = arr;
            console.log("ParamsQueryOne", ParamsQuery);

            if (this.$route.query.patient_id) {
              ParamsQuery["patient"] = this.$route.query.patient_id;
            } else {
              ParamsQuery["patient"] = this.patient_prop.id;
            }
            ParamsQuery["record_date"] = this.record_date;
            ParamsQuery["mode"] = "1";
        // 必填弹窗开始
          console.log(ParamsQuery, "提交的参数");
          let newParams = ParamsQuery;
          if (newParams.anticoagulant == "1") {
            delete newParams.anticoagulant_shouji;
            delete newParams.anticoagulant_weichi;
            delete newParams.anticoagulant_zongliang;
          }
          if (newParams.oxygen_uptake == 2||newParams.oxygen_uptake == 0) {
            delete newParams.oxygen_time;
            delete newParams.oxygen_flow;
          }
          if (newParams.mode_id!=2 && newParams.mode_id!=5 && newParams.mode_id!= 12 && newParams.mode_id!= 28 && newParams.mode_id!= 26 && newParams.mode_id!= 34&& newParams.mode_id!= 35&& newParams.mode_id!= 36&& newParams.mode_id!= 37 && newParams.mode_id!= 10 && newParams.mode_id!= 41){
            delete newParams.replacement_total;
            delete newParams.displace_liqui_part;
            delete newParams.displace_liqui_value;
            delete newParams.displace_speed;
          }
          if(newParams.is_water != '是'){
            delete newParams.single_time;
            delete newParams. single_water;
          }
          if(newParams.anticoagulant != "1"){
            delete newParams.no_heparin_remarks;
          }
          if(newParams.anticoagulant != '10'){
            delete newParams.heparin_sodium;
            delete newParams.nucleoprotamine;
            delete newParams.push_the_protamine;
          }
          if(newParams.anticoagulant != '5'){
            delete newParams.anticoagulant_gaimingcheng;
            delete newParams.anticoagulant_gaijiliang;
          }
          if (this.isShow('置换液总量')==false) {
            delete newParams.displace_liqui_value;
          }
          let result = [];
          let filedList = this.$store.getters.user.fileds;
          let new_arr = Object.entries(newParams);
          new_arr.forEach((el) => {
            if (el[1] === "" || el[1] === 0 ) {
              // result.push(el);
              result.unshift(el)
            } else if(el[1] == "0" && el[1].length<=0){
              result.unshift(el)
            }
            else if(el[0] =='pre_impulse' && el[1].length<=0) {
              result.unshift(el)//欲冲量
            }
            else if(el[0] =='target_ultrafiltration' && el[1].length<=0) {
              result.unshift(el)//目标超滤量
            }
            else if (el[0]=='is_water' && el[1] =='请选择'){
              result.unshift(el)//是否单超脱水
            }
            else if(el[0] =='drhy_water' && el[1].length<=0) {
              result.unshift(el)//曲线脱水
            }
            else if(el[0] =='dry_water_hour' && el[1].length<=0) {
              result.unshift(el)//曲线脱水时长
            }
            else if(el[0] =='replacement_flow' && el[1].length<=0) {
              result.unshift(el)//置换流量
            }
            else if(el[0] =='kalium' && el[1].length<=0) {
              result.unshift(el)//钾
            }
            else if (el[0]=='sodium' && el[1] =='请选择'){
              result.unshift(el)//钠
            }
            else if(el[0] =='calcium' && el[1].length<=0) {
              result.unshift(el)//钙
            }
            else if(el[0] =='bicarbonate' && el[1].length<=0) {
              result.unshift(el)//碳酸氢盐
            }
            else if(el[0] =='dialysate_flow' && el[1].length<=0) {
              result.unshift(el)//透析液流量
            }
            else if(el[0] =='dialysate_temperature' && el[1].length<=0) {
              result.unshift(el)//透析液温度
            }
            else if (el[0]=='conductivity' && el[1] =='请选择'){
              result.unshift(el)//电导率
            }
            else if(el[0] =='amylaceum' && el[1].length<=0) {
              result.unshift(el)//葡萄糖
            }
            else if(el[0] =='hemodialysis_pipelines_count' && el[1].length<=0) {
              result.unshift(el)//透析管路支数
            }
            else if(el[0] =='puncture_needle_count' && el[1].length<=0) {
              result.unshift(el)//穿刺针支数
            }
            else if(el[0] =='epo_count' && el[1].length<=0) {
              result.unshift(el)//促红素支数
            }
            else if(el[0] =='max_ultrafiltration_rate' && el[1].length<=0) {
              result.unshift(el)//最大超滤率
            }
            else if(el[0] =='blood_access' && el[1]=='0') {
              result.unshift(el)//血管通路
            }
          });
          console.log(result, "提交的参数当中过滤出为空的");

          let warnarr = [];
          warnarr = this.getArrEqual(filedList, result);
          if (warnarr.length > 0) {
            return this.open_tips(warnarr);
            // 必填弹窗结束
          } else {
            commitDialysisPrescription(ParamsQuery)
              .then((response) => {
                if (response.data.state == 0) {
                  Toast.fail(response.data.msg);
                  if(response.data.code == 600000008){
                    this.infor_visibility = true
                  }
                  return false;
                } else {
                  Toast.success("提交成功");

                  this.$emit("advice");
                  this.$emit("longSolution", response.data.data.solution);
                  this.$emit("prescription", response.data.data.prescription);
                  // this.finish()
                }
                this.changePrescription = 0
              })
              .catch((error) => {
                this.changePrescription = 0
                Toast.fail("请求失败");
              });
          }

          }
        } else if (this.is_open == 2) {
          if (this.waitUploadAdvices.length > 0) {
            Toast.loading({ forbidClick: true, duration: 0 });
            var arr = this.dialysisPrescription;

            let ParamsQuery = arr;
            console.log("ParamsQueryOne", ParamsQuery);

            if (this.$route.query.patient_id) {
              ParamsQuery["patient"] = this.$route.query.patient_id;
            } else {
              ParamsQuery["patient"] = this.patient_prop.id;
            }
            ParamsQuery["record_date"] = this.record_date;
            ParamsQuery["mode"] = "1";
  // 必填弹窗开始
          console.log(ParamsQuery, "提交的参数");
          let newParams = ParamsQuery;
          if (newParams.anticoagulant == "1") {
            delete newParams.anticoagulant_shouji;
            delete newParams.anticoagulant_weichi;
            delete newParams.anticoagulant_zongliang;
          }
          if (newParams.oxygen_uptake == 2||newParams.oxygen_uptake == 0) {
            delete newParams.oxygen_time;
            delete newParams.oxygen_flow;
          }
          if (newParams.mode_id!=2 && newParams.mode_id!=5 && newParams.mode_id!= 12 && newParams.mode_id!= 28 && newParams.mode_id!= 26 && newParams.mode_id!= 34&& newParams.mode_id!= 35&& newParams.mode_id!= 36&& newParams.mode_id!= 37 && newParams.mode_id!= 10 && newParams.mode_id!= 41){
            delete newParams.replacement_total;
            delete newParams.displace_liqui_part;
            delete newParams.displace_liqui_value;
            delete newParams.displace_speed;
          }
          if(newParams.is_water != '是'){
            delete newParams.single_time;
            delete newParams. single_water;
          }
          if(newParams.anticoagulant != "1"){
            delete newParams.no_heparin_remarks;
          }
          if(newParams.anticoagulant != '10'){
            delete newParams.heparin_sodium;
            delete newParams.nucleoprotamine;
            delete newParams.push_the_protamine;
          }
          if(newParams.anticoagulant != '5'){
            delete newParams.anticoagulant_gaimingcheng;
            delete newParams.anticoagulant_gaijiliang;
          }
          if (this.isShow('置换液总量')==false) {
            delete newParams.displace_liqui_value;
          }
          let result = [];
          let filedList = this.$store.getters.user.fileds;
          let new_arr = Object.entries(newParams);
          new_arr.forEach((el) => {
            if (el[1] === "" || el[1] === 0 ) {
              // result.push(el);
              result.unshift(el)
            } else if(el[1] == "0" && el[1].length<=0){
              result.unshift(el)
            }
            else if(el[0] =='pre_impulse' && el[1].length<=0) {
              result.unshift(el)//欲冲量
            }
            else if(el[0] =='target_ultrafiltration' && el[1].length<=0) {
              result.unshift(el)//目标超滤量
            }
            else if (el[0]=='is_water' && el[1] =='请选择'){
              result.unshift(el)//是否单超脱水
            }
            else if(el[0] =='drhy_water' && el[1].length<=0) {
              result.unshift(el)//曲线脱水
            }
            else if(el[0] =='dry_water_hour' && el[1].length<=0) {
              result.unshift(el)//曲线脱水时长
            }
            else if(el[0] =='replacement_flow' && el[1].length<=0) {
              result.unshift(el)//置换流量
            }
            else if(el[0] =='kalium' && el[1].length<=0) {
              result.unshift(el)//钾
            }
            else if (el[0]=='sodium' && el[1] =='请选择'){
              result.unshift(el)//钠
            }
            else if(el[0] =='calcium' && el[1].length<=0) {
              result.unshift(el)//钙
            }
            else if(el[0] =='bicarbonate' && el[1].length<=0) {
              result.unshift(el)//碳酸氢盐
            }
            else if(el[0] =='dialysate_flow' && el[1].length<=0) {
              result.unshift(el)//透析液流量
            }
            else if(el[0] =='dialysate_temperature' && el[1].length<=0) {
              result.unshift(el)//透析液温度
            }
            else if (el[0]=='conductivity' && el[1] =='请选择'){
              result.unshift(el)//电导率
            }
            else if(el[0] =='amylaceum' && el[1].length<=0) {
              result.unshift(el)//葡萄糖
            }
            else if(el[0] =='hemodialysis_pipelines_count' && el[1].length<=0) {
              result.unshift(el)//透析管路支数
            }
            else if(el[0] =='puncture_needle_count' && el[1].length<=0) {
              result.unshift(el)//穿刺针支数
            }
            else if(el[0] =='epo_count' && el[1].length<=0) {
              result.unshift(el)//促红素支数
            }
            else if(el[0] =='max_ultrafiltration_rate' && el[1].length<=0) {
              result.unshift(el)//最大超滤率
            }
            else if(el[0] =='blood_access' && el[1]=='0') {
              result.unshift(el)//血管通路
            }
          });
          console.log(result, "提交的参数当中过滤出为空的");

          let warnarr = [];
          warnarr = this.getArrEqual(filedList, result);
            if (warnarr.length > 0) {
              return this.open_tips(warnarr);
              // 必填弹窗结束
            } else {
              commitDialysisPrescription(ParamsQuery)
                .then((response) => {
                  if (response.data.state == 0) {
                    Toast.fail(response.data.msg);
                    if(response.data.code == 600000008){
                     this.infor_visibility = true
                    }
                    return false;
                  } else {
                    Toast.success("提交成功");

                    var date = new Date();
                    var year = date.getFullYear();
                    var month = date.getMonth() + 1;
                    var day = date.getDate();

                    var hours = date.getHours();
                    var minites = date.getMinutes();

                    if (month < 10) {
                      month = "0" + month;
                    }
                    if (day < 10) {
                      day = "0" + day;
                    }
                    if (hours < 10) {
                      hours = "0" + hours;
                    }
                    if (minites < 10) {
                      minites = "0" + minites;
                    }
                    var nowDate =
                      year +
                      "-" +
                      month +
                      "-" +
                      day +
                      " " +
                      hours +
                      ":" +
                      minites;

                    let params = {
                      advices: this.waitUploadAdvices,
                      advice_date: parseTime(
                        this.$route.query.date,
                        "{y}-{m}-{d}"
                      ),
                      advice_doctor: this.waitUploadAdvices[0].advice_doctor,
                      advice_type: this.waitUploadAdvices[0].advice_type,
                      parent_id: this.$route.query.patient_id,
                      start_time: nowDate,
                      remark: "",
                    };
                    CreateGroupAdvice(
                      this.$route.query.patient_id,
                      0,
                      params
                    ).then((rs) => {
                      var resp = rs.data;
                      if (resp.state == 1) {
                        this.doctorAdvices = resp.data.advices;
                        this.$emit(
                          "longSolution",
                          response.data.data.solution,
                          resp.data.advices
                        );
                        this.$emit(
                          "prescription",
                          response.data.data.prescription,
                          resp.data.advices
                        );
                        this.advice_visibility = false
                      } else {
                        this.advice_visibility = false
                      }
                    });

                    // this.finish()
                  }
                })
                .catch((error) => {
                  Toast.fail("请求失败");
                });
            }

          } else {
            Toast.loading({ forbidClick: true, duration: 0 });
            var arr = this.dialysisPrescription;

            let ParamsQuery = arr;


            if (this.$route.query.patient_id) {
              ParamsQuery["patient"] = this.$route.query.patient_id;
            } else {
              ParamsQuery["patient"] = this.patient_prop.id;
            }
            ParamsQuery["record_date"] = this.record_date;
            ParamsQuery["mode"] = "1";
  // 必填弹窗开始
          console.log(ParamsQuery, "提交的参数");
          let newParams = ParamsQuery;
          if (newParams.anticoagulant == "1") {
            delete newParams.anticoagulant_shouji;
            delete newParams.anticoagulant_weichi;
            delete newParams.anticoagulant_zongliang;
          }
          if (newParams.oxygen_uptake == 2||newParams.oxygen_uptake == 0) {
            delete newParams.oxygen_time;
            delete newParams.oxygen_flow;
          }
          if (newParams.mode_id!=2 && newParams.mode_id!=5 && newParams.mode_id!= 12  && newParams.mode_id!= 28 && newParams.mode_id!= 26&& newParams.mode_id!= 34&& newParams.mode_id!= 35&& newParams.mode_id!= 36&& newParams.mode_id!= 37 && newParams.mode_id!= 10 && newParams.mode_id!= 41){
            delete newParams.replacement_total;
            delete newParams.displace_liqui_part;
            delete newParams.displace_liqui_value;
            delete newParams.displace_speed;
          }
          if(newParams.is_water != '是'){
            delete newParams.single_time;
            delete newParams. single_water;
          }
          if(newParams.anticoagulant != "1"){
            delete newParams.no_heparin_remarks;
          }
          if(newParams.anticoagulant != '10'){
            delete newParams.heparin_sodium;
            delete newParams.nucleoprotamine;
            delete newParams.push_the_protamine;
          }
          if(newParams.anticoagulant != '5'){
            delete newParams.anticoagulant_gaimingcheng;
            delete newParams.anticoagulant_gaijiliang;
          }
          if (this.isShow('置换液总量')==false) {
            delete newParams.displace_liqui_value;
          }
          let result = [];
          let filedList = this.$store.getters.user.fileds;
          let new_arr = Object.entries(newParams);
          new_arr.forEach((el) => {
            if (el[1] === "" || el[1] === 0 ) {
              // result.push(el);
              result.unshift(el)
            } else if(el[1] == "0" && el[1].length<=0){
              result.unshift(el)
            }
            else if(el[0] =='pre_impulse' && el[1].length<=0) {
              result.unshift(el)//欲冲量
            }
            else if(el[0] =='target_ultrafiltration' && el[1].length<=0) {
              result.unshift(el)//目标超滤量
            }
            else if (el[0]=='is_water' && el[1] =='请选择'){
              result.unshift(el)//是否单超脱水
            }
            else if(el[0] =='drhy_water' && el[1].length<=0) {
              result.unshift(el)//曲线脱水
            }
            else if(el[0] =='dry_water_hour' && el[1].length<=0) {
              result.unshift(el)//曲线脱水时长
            }
            else if(el[0] =='replacement_flow' && el[1].length<=0) {
              result.unshift(el)//置换流量
            }
            else if(el[0] =='kalium' && el[1].length<=0) {
              result.unshift(el)//钾
            }
            else if (el[0]=='sodium' && el[1] =='请选择'){
              result.unshift(el)//钠
            }
            else if(el[0] =='calcium' && el[1].length<=0) {
              result.unshift(el)//钙
            }
            else if(el[0] =='bicarbonate' && el[1].length<=0) {
              result.unshift(el)//碳酸氢盐
            }
            else if(el[0] =='dialysate_flow' && el[1].length<=0) {
              result.unshift(el)//透析液流量
            }
            else if(el[0] =='dialysate_temperature' && el[1].length<=0) {
              result.unshift(el)//透析液温度
            }
            else if (el[0]=='conductivity' && el[1] =='请选择'){
              result.unshift(el)//电导率
            }
            else if(el[0] =='amylaceum' && el[1].length<=0) {
              result.unshift(el)//葡萄糖
            }
            else if(el[0] =='hemodialysis_pipelines_count' && el[1].length<=0) {
              result.unshift(el)//透析管路支数
            }
            else if(el[0] =='puncture_needle_count' && el[1].length<=0) {
              result.unshift(el)//穿刺针支数
            }
            else if(el[0] =='epo_count' && el[1].length<=0) {
              result.unshift(el)//促红素支数
            }
            else if(el[0] =='max_ultrafiltration_rate' && el[1].length<=0) {
              result.unshift(el)//最大超滤率
            }
            else if(el[0] =='blood_access' && el[1]=='0') {
              result.unshift(el)//血管通路
            }
          });
          console.log(result, "提交的参数当中过滤出为空的");

          let warnarr = [];
          warnarr = this.getArrEqual(filedList, result);
          if (warnarr.length > 0) {
            return this.open_tips(warnarr);
            // 必填弹窗结束
          } else {
            commitDialysisPrescription(ParamsQuery)
              .then((response) => {
                if (response.data.state == 0) {
                  Toast.fail(response.data.msg);
                  if(response.data.code == 600000008){
                    this.infor_visibility = true
                  }
                  return false;
                } else {
                  Toast.success("提交成功");

                  this.$emit("longSolution", response.data.data.solution);
                  this.$emit("prescription", response.data.data.prescription);
                  // this.finish()
                }
                this.changePrescription = 0
              })
              .catch((error) => {
                this.changePrescription = 0
                Toast.fail("请求失败");
              });
          }

          }
        }
      } else {
        if (this.prescription_prop.creater == 0) {
          if (this.is_open == 0) {
            var arr = this.dialysisPrescription;

            let ParamsQuery = arr;
            console.log("ParamsQueryOne", ParamsQuery);
            if (this.$route.query.patient_id) {
              ParamsQuery["patient"] = this.$route.query.patient_id;
            } else {
              ParamsQuery["patient"] = this.patient_prop.id;
            }
            ParamsQuery["record_date"] = this.record_date;
            ParamsQuery["mode"] = "1";
            // 必填弹窗开始
          console.log(ParamsQuery, "提交的参数");
          let newParams = ParamsQuery;
          if (newParams.anticoagulant == "1" || newParams.anticoagulant == "12") {
            delete newParams.anticoagulant_shouji;
            delete newParams.anticoagulant_weichi;
            delete newParams.anticoagulant_zongliang;
          }
          if (newParams.oxygen_uptake == 2||newParams.oxygen_uptake == 0) {
            delete newParams.oxygen_time;
            delete newParams.oxygen_flow;
          }
          if (newParams.mode_id!=2 && newParams.mode_id!=5 && newParams.mode_id!= 12 && newParams.mode_id!= 28 && newParams.mode_id!= 26&& newParams.mode_id!= 34&& newParams.mode_id!= 35&& newParams.mode_id!= 36&& newParams.mode_id!= 37 && newParams.mode_id!= 10  && newParams.mode_id!= 41){
            delete newParams.replacement_total;
            delete newParams.displace_liqui_part;
            delete newParams.displace_liqui_value;
            delete newParams.displace_speed;
          }
          if(newParams.is_water != '是'){
            delete newParams.single_time;
            delete newParams. single_water;
          }
          if(newParams.anticoagulant != "1"){
            delete newParams.no_heparin_remarks;
          }
          if(newParams.anticoagulant != '10'){
            delete newParams.heparin_sodium;
            delete newParams.nucleoprotamine;
            delete newParams.push_the_protamine;
          }
          if(newParams.anticoagulant != '5'){
            delete newParams.anticoagulant_gaimingcheng;
            delete newParams.anticoagulant_gaijiliang;
          }
          if (this.isShow('置换液总量')==false) {
            delete newParams.displace_liqui_value;
          }
          let result = [];
          let filedList = this.$store.getters.user.fileds;
          let new_arr = Object.entries(newParams);
          new_arr.forEach((el) => {
            if (el[1] === "" || el[1] === 0 ) {
              // result.push(el);
              result.unshift(el)
            } else if(el[1] == "0" && el[1].length<=0){
              result.unshift(el)
            }
            else if(el[0] =='pre_impulse' && el[1].length<=0) {
              result.unshift(el)//欲冲量
            }
            else if(el[0] =='target_ultrafiltration' && el[1].length<=0) {
              result.unshift(el)//目标超滤量
            }
            else if (el[0]=='is_water' && el[1] =='请选择'){
              result.unshift(el)//是否单超脱水
            }
            else if(el[0] =='drhy_water' && el[1].length<=0) {
              result.unshift(el)//曲线脱水
            }
            else if(el[0] =='dry_water_hour' && el[1].length<=0) {
              result.unshift(el)//曲线脱水时长
            }
            else if(el[0] =='replacement_flow' && el[1].length<=0) {
              result.unshift(el)//置换流量
            }
            else if(el[0] =='kalium' && el[1].length<=0) {
              result.unshift(el)//钾
            }
            else if (el[0]=='sodium' && el[1] =='请选择'){
              result.unshift(el)//钠
            }
            else if(el[0] =='calcium' && el[1].length<=0) {
              result.unshift(el)//钙
            }
            else if(el[0] =='bicarbonate' && el[1].length<=0) {
              result.unshift(el)//碳酸氢盐
            }
            else if(el[0] =='dialysate_flow' && el[1].length<=0) {
              result.unshift(el)//透析液流量
            }
            else if(el[0] =='dialysate_temperature' && el[1].length<=0) {
              result.unshift(el)//透析液温度
            }
            else if (el[0]=='conductivity' && el[1] =='请选择'){
              result.unshift(el)//电导率
            }
            else if(el[0] =='amylaceum' && el[1].length<=0) {
              result.unshift(el)//葡萄糖
            }
            else if(el[0] =='hemodialysis_pipelines_count' && el[1].length<=0) {
              result.unshift(el)//透析管路支数
            }
            else if(el[0] =='puncture_needle_count' && el[1].length<=0) {
              result.unshift(el)//穿刺针支数
            }
            else if(el[0] =='epo_count' && el[1].length<=0) {
              result.unshift(el)//促红素支数
            }
            else if(el[0] =='max_ultrafiltration_rate' && el[1].length<=0) {
              result.unshift(el)//最大超滤率
            }
            else if(el[0] =='blood_access' && el[1]=='0') {
              result.unshift(el)//血管通路
            }
          });
          console.log(result, "提交的参数当中过滤出为空的");

          let warnarr = [];
          warnarr = this.getArrEqual(filedList, result);
          if (warnarr.length > 0) {
            return this.open_tips(warnarr);
            // 必填弹窗结束
            } else {
              Toast.loading({ forbidClick: true, duration: 0 });
              commitDialysisPrescription(ParamsQuery)
                .then((response) => {
                  if (response.data.state == 0) {
                    Toast.fail(response.data.msg);
                    if(response.data.code == 600000008){
                     this.infor_visibility = true
                    }
                    return false;
                  } else {
                    Toast.success("提交成功");

                    this.$emit("longSolution", response.data.data.solution);
                    this.$emit("prescription", response.data.data.prescription);
                    // this.finish()
                  }
                  this.changePrescription = 0
                })
                .catch((error) => {
                  this.changePrescription = 0
                  Toast.fail("请求失败");
                });
            }

            // 推送医嘱
            if (this.prescription_open == 1) {
              var date = new Date();
              var year = date.getFullYear();
              var month = date.getMonth() + 1;
              var day = date.getDate();

              var hours = date.getHours();
              var minites = date.getMinutes();

              if (month < 10) {
                month = "0" + month;
              }
              if (day < 10) {
                day = "0" + day;
              }
              if (hours < 10) {
                hours = "0" + hours;
              }
              if (minites < 10) {
                minites = "0" + minites;
              }
              var nowDate =
                year + "-" + month + "-" + day + " " + hours + ":" + minites;

              let params = {
                advices: this.waitUploadAdvices,
                advice_date: parseTime(this.$route.query.date, "{y}-{m}-{d}"),
                advice_doctor: this.waitUploadAdvices[0].advice_doctor,
                advice_type: this.waitUploadAdvices[0].advice_type,
                parent_id: this.$route.query.patient_id,
                start_time: nowDate,
                remark: "",
              };
              CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(
                (rs) => {
                  var resp = rs.data;
                  if (resp.state == 1) {
                    this.doctorAdvices = resp.data.advices;
                    this.$emit(
                      "longSolution",
                      response.data.data.solution,
                      resp.data.advices
                    );
                    this.$emit(
                      "prescription",
                      response.data.data.prescription,
                      resp.data.advices
                    );
                    this.advice_visibility = false
                  } else {
                    this.advice_visibility = false
                  }
                }
              );
            }
          } else if (this.is_open == 1) {
            console.log('2222222',this.is_open);
            if (this.targetAdvices != null && this.targetAdvices.length > 0) {
              console.log('3333333',this.is_open);
            this.advice_visibility = false;
            console.log("进程为长期医嘱");
            var arr = this.dialysisPrescription;

            let ParamsQuery = arr;
            console.log("ParamsQueryOne", ParamsQuery);
            if (this.$route.query.patient_id) {
              ParamsQuery["patient"] = this.$route.query.patient_id;
            } else {
              ParamsQuery["patient"] = this.patient_prop.id;
            }
            ParamsQuery["record_date"] = this.record_date;
            ParamsQuery["mode"] = "1";
            // 必填弹窗开始
            console.log(ParamsQuery, "提交的参数");
            let newParams = ParamsQuery;
            if (newParams.anticoagulant == "1") {
              delete newParams.anticoagulant_shouji;
              delete newParams.anticoagulant_weichi;
              delete newParams.anticoagulant_zongliang;
            }
            if (newParams.oxygen_uptake == 2||newParams.oxygen_uptake == 0) {
              delete newParams.oxygen_time;
              delete newParams.oxygen_flow;
            }
            if (newParams.mode_id!=2 && newParams.mode_id!=5 && newParams.mode_id!= 12 && newParams.mode_id!= 28 && newParams.mode_id!= 26&& newParams.mode_id!= 34&& newParams.mode_id!= 35&& newParams.mode_id!= 36&& newParams.mode_id!= 37 && newParams.mode_id!= 10 && newParams.mode_id!= 41){
              delete newParams.replacement_total;
              delete newParams.displace_liqui_part;
              delete newParams.displace_liqui_value;
              delete newParams.displace_speed;
            }
            if(newParams.is_water != '是'){
              delete newParams.single_time;
              delete newParams. single_water;
            }
            if(newParams.anticoagulant != "1"){
              delete newParams.no_heparin_remarks;
            }
            if(newParams.anticoagulant != '10'){
              delete newParams.heparin_sodium;
              delete newParams.nucleoprotamine;
              delete newParams.push_the_protamine;
            }
            if(newParams.anticoagulant != '5'){
              delete newParams.anticoagulant_gaimingcheng;
              delete newParams.anticoagulant_gaijiliang;
            }
            if (this.isShow('置换液总量')==false) {
              delete newParams.displace_liqui_value;
            }
            let result = [];
            let filedList = this.$store.getters.user.fileds;
            let new_arr = Object.entries(newParams);
            new_arr.forEach((el) => {
              if (el[1] === "" || el[1] === 0 ) {
                // result.push(el);
                result.unshift(el)
              } else if(el[1] == "0" && el[1].length<=0){
                result.unshift(el)
              }
              else if(el[0] =='pre_impulse' && el[1].length<=0) {
                result.unshift(el)//欲冲量
              }
              else if(el[0] =='target_ultrafiltration' && el[1].length<=0) {
                result.unshift(el)//目标超滤量
              }
              else if (el[0]=='is_water' && el[1] =='请选择'){
                result.unshift(el)//是否单超脱水
              }
              else if(el[0] =='drhy_water' && el[1].length<=0) {
                result.unshift(el)//曲线脱水
              }
              else if(el[0] =='dry_water_hour' && el[1].length<=0) {
                result.unshift(el)//曲线脱水时长
              }
              else if(el[0] =='replacement_flow' && el[1].length<=0) {
                result.unshift(el)//置换流量
              }
              else if(el[0] =='kalium' && el[1].length<=0) {
                result.unshift(el)//钾
              }
              else if (el[0]=='sodium' && el[1] =='请选择'){
                result.unshift(el)//钠
              }
              else if(el[0] =='calcium' && el[1].length<=0) {
                result.unshift(el)//钙
              }
              else if(el[0] =='bicarbonate' && el[1].length<=0) {
                result.unshift(el)//碳酸氢盐
              }
              else if(el[0] =='dialysate_flow' && el[1].length<=0) {
                result.unshift(el)//透析液流量
              }
              else if(el[0] =='dialysate_temperature' && el[1].length<=0) {
                result.unshift(el)//透析液温度
              }
              else if (el[0]=='conductivity' && el[1] =='请选择'){
                result.unshift(el)//电导率
              }
              else if(el[0] =='amylaceum' && el[1].length<=0) {
                result.unshift(el)//葡萄糖
              }
              else if(el[0] =='hemodialysis_pipelines_count' && el[1].length<=0) {
                result.unshift(el)//透析管路支数
              }
              else if(el[0] =='puncture_needle_count' && el[1].length<=0) {
                result.unshift(el)//穿刺针支数
              }
              else if(el[0] =='epo_count' && el[1].length<=0) {
                result.unshift(el)//促红素支数
              }
              else if(el[0] =='max_ultrafiltration_rate' && el[1].length<=0) {
                result.unshift(el)//最大超滤率
              }
              else if(el[0] =='blood_access' && el[1]=='0') {
                result.unshift(el)//血管通路
              }
            });
            console.log(result, "提交的参数当中过滤出为空的");

            let warnarr = [];
            warnarr = this.getArrEqual(filedList, result);
            if (warnarr.length > 0) {
              return this.open_tips(warnarr);
              // 必填弹窗结束
            } else {
              // 弹框推送提醒
              this.advicePropForm.list = this.targetAdvices;
              this.advicePropForm.operators = this.admin_users_prop;
              this.advice_visibility = true;
              this.isShowDialog = false;

              for (let i = 0; i < this.advicePropForm.list.length; i++) {
                if (
                  this.advicePropForm.list[i].parent_id == 0 &&
                  this.advicePropForm.list[i].isCheck == 1
                ) {
                  this.advicePropForm.result.push(this.advicePropForm.list[i].id);
                }
              }
            }

            } else {
              console.log('3333333333',this.is_open);
              Toast.loading({ forbidClick: true, duration: 0 });
              var arr = this.dialysisPrescription;

              let ParamsQuery = arr;
              console.log("ParamsQueryOne", ParamsQuery);
              if (this.$route.query.patient_id) {
                ParamsQuery["patient"] = this.$route.query.patient_id;
              } else {
                ParamsQuery["patient"] = this.patient_prop.id;
              }
              ParamsQuery["record_date"] = this.record_date;
              ParamsQuery["mode"] = "1";
          // 必填弹窗开始
            console.log(ParamsQuery, "提交的参数");
            let newParams = ParamsQuery;
            if (newParams.anticoagulant == "1") {
              delete newParams.anticoagulant_shouji;
              delete newParams.anticoagulant_weichi;
              delete newParams.anticoagulant_zongliang;
            }
            if (newParams.oxygen_uptake == 2||newParams.oxygen_uptake == 0) {
              delete newParams.oxygen_time;
              delete newParams.oxygen_flow;
            }
            if (newParams.mode_id!=2 && newParams.mode_id!=5 && newParams.mode_id!= 12 && newParams.mode_id!= 28&& newParams.mode_id!= 26&& newParams.mode_id!= 34&& newParams.mode_id!= 35&& newParams.mode_id!= 36&& newParams.mode_id!= 37 && newParams.mode_id!= 10 && newParams.mode_id!= 41){
              delete newParams.replacement_total;
              delete newParams.displace_liqui_part;
              delete newParams.displace_liqui_value;
              delete newParams.displace_speed;
            }
            if(newParams.is_water != '是'){
              delete newParams.single_time;
              delete newParams. single_water;
            }
            if(newParams.anticoagulant != "1"){
              delete newParams.no_heparin_remarks;
            }
            if(newParams.anticoagulant != '10'){
              delete newParams.heparin_sodium;
              delete newParams.nucleoprotamine;
              delete newParams.push_the_protamine;
            }
            if(newParams.anticoagulant != '5'){
              delete newParams.anticoagulant_gaimingcheng;
              delete newParams.anticoagulant_gaijiliang;
            }
            if (this.isShow('置换液总量')==false) {
              delete newParams.displace_liqui_value;
            }
            let result = [];
            let filedList = this.$store.getters.user.fileds;
            let new_arr = Object.entries(newParams);
            new_arr.forEach((el) => {
              if (el[1] === "" || el[1] === 0 ) {
                // result.push(el);
                result.unshift(el)
              } else if(el[1] == "0" && el[1].length<=0){
                result.unshift(el)
              }
              else if(el[0] =='pre_impulse' && el[1].length<=0) {
                result.unshift(el)//欲冲量
              }
              else if(el[0] =='target_ultrafiltration' && el[1].length<=0) {
                result.unshift(el)//目标超滤量
              }
              else if (el[0]=='is_water' && el[1] =='请选择'){
                result.unshift(el)//是否单超脱水
              }
              else if(el[0] =='drhy_water' && el[1].length<=0) {
                result.unshift(el)//曲线脱水
              }
              else if(el[0] =='dry_water_hour' && el[1].length<=0) {
                result.unshift(el)//曲线脱水时长
              }
              else if(el[0] =='replacement_flow' && el[1].length<=0) {
                result.unshift(el)//置换流量
              }
              else if(el[0] =='kalium' && el[1].length<=0) {
                result.unshift(el)//钾
              }
              else if (el[0]=='sodium' && el[1] =='请选择'){
                result.unshift(el)//钠
              }
              else if(el[0] =='calcium' && el[1].length<=0) {
                result.unshift(el)//钙
              }
              else if(el[0] =='bicarbonate' && el[1].length<=0) {
                result.unshift(el)//碳酸氢盐
              }
              else if(el[0] =='dialysate_flow' && el[1].length<=0) {
                result.unshift(el)//透析液流量
              }
              else if(el[0] =='dialysate_temperature' && el[1].length<=0) {
                result.unshift(el)//透析液温度
              }
              else if (el[0]=='conductivity' && el[1] =='请选择'){
                result.unshift(el)//电导率
              }
              else if(el[0] =='amylaceum' && el[1].length<=0) {
                result.unshift(el)//葡萄糖
              }
              else if(el[0] =='hemodialysis_pipelines_count' && el[1].length<=0) {
                result.unshift(el)//透析管路支数
              }
              else if(el[0] =='puncture_needle_count' && el[1].length<=0) {
                result.unshift(el)//穿刺针支数
              }
              else if(el[0] =='epo_count' && el[1].length<=0) {
                result.unshift(el)//促红素支数
              }
              else if(el[0] =='max_ultrafiltration_rate' && el[1].length<=0) {
                result.unshift(el)//最大超滤率
              }
              else if(el[0] =='blood_access' && el[1]=='0') {
                result.unshift(el)//血管通路
              }
            });
            console.log(result, "提交的参数当中过滤出为空的");

            let warnarr = [];
            warnarr = this.getArrEqual(filedList, result);
            if (warnarr.length > 0) {
              return this.open_tips(warnarr);
              // 必填弹窗结束
            } else {
              commitDialysisPrescription(ParamsQuery)
                .then((response) => {
                  if (response.data.state == 0) {
                    Toast.fail(response.data.msg);
                    if(response.data.code == 600000008){
                      this.infor_visibility = true
                    }
                    return false;
                  } else {
                    Toast.success("提交成功");

                    this.$emit("advice");
                    this.$emit("longSolution", response.data.data.solution);
                    this.$emit("prescription", response.data.data.prescription);
                    // this.finish()
                  }
                  this.changePrescription = 0
                })
                this.changePrescription = 0
                .catch((error) => {
                  Toast.fail("请求失败");
                });
            }

            }
          } else if (this.is_open == 2) {
            if (this.waitUploadAdvices.length > 0) {
              Toast.loading({ forbidClick: true, duration: 0 });
              var arr = this.dialysisPrescription;

              let ParamsQuery = arr;
              console.log("ParamsQueryOne", ParamsQuery);
              if (this.$route.query.patient_id) {
                ParamsQuery["patient"] = this.$route.query.patient_id;
              } else {
                ParamsQuery["patient"] = this.patient_prop.id;
              }
              ParamsQuery["record_date"] = this.record_date;
              ParamsQuery["mode"] = "2";
  // 必填弹窗开始
          console.log(ParamsQuery, "提交的参数");
          let newParams = ParamsQuery;
          if (newParams.anticoagulant == "1" || newParams.anticoagulant == "12") {
            delete newParams.anticoagulant_shouji;
            delete newParams.anticoagulant_weichi;
            delete newParams.anticoagulant_zongliang;
          }
          if (newParams.oxygen_uptake == 2||newParams.oxygen_uptake == 0) {
            delete newParams.oxygen_time;
            delete newParams.oxygen_flow;
          }
          if (newParams.mode_id!=2 && newParams.mode_id!=5 && newParams.mode_id!= 12 && newParams.mode_id!= 28&& newParams.mode_id!= 26&& newParams.mode_id!= 34&& newParams.mode_id!= 35&& newParams.mode_id!= 36&& newParams.mode_id!= 37 && newParams.mode_id!= 10 && newParams.mode_id!= 41){
            delete newParams.replacement_total;
            delete newParams.displace_liqui_part;
            delete newParams.displace_liqui_value;
            delete newParams.displace_speed;
          }
          if(newParams.is_water != '是'){
            delete newParams.single_time;
            delete newParams. single_water;
          }
          if(newParams.anticoagulant != "1"){
            delete newParams.no_heparin_remarks;
          }
          if(newParams.anticoagulant != '10'){
            delete newParams.heparin_sodium;
            delete newParams.nucleoprotamine;
            delete newParams.push_the_protamine;
          }
          if(newParams.anticoagulant != '5'){
            delete newParams.anticoagulant_gaimingcheng;
            delete newParams.anticoagulant_gaijiliang;
          }
          if (this.isShow('置换液总量')==false) {
            delete newParams.displace_liqui_value;
          }
          let result = [];
          let filedList = this.$store.getters.user.fileds;
          let new_arr = Object.entries(newParams);
          new_arr.forEach((el) => {
            if (el[1] === "" || el[1] === 0 ) {
              // result.push(el);
              result.unshift(el)
            } else if(el[1] == "0" && el[1].length<=0){
              result.unshift(el)
            }
            else if(el[0] =='pre_impulse' && el[1].length<=0) {
              result.unshift(el)//欲冲量
            }
            else if(el[0] =='target_ultrafiltration' && el[1].length<=0) {
              result.unshift(el)//目标超滤量
            }
            else if (el[0]=='is_water' && el[1] =='请选择'){
              result.unshift(el)//是否单超脱水
            }
            else if(el[0] =='drhy_water' && el[1].length<=0) {
              result.unshift(el)//曲线脱水
            }
            else if(el[0] =='dry_water_hour' && el[1].length<=0) {
              result.unshift(el)//曲线脱水时长
            }
            else if(el[0] =='replacement_flow' && el[1].length<=0) {
              result.unshift(el)//置换流量
            }
            else if(el[0] =='kalium' && el[1].length<=0) {
              result.unshift(el)//钾
            }
            else if (el[0]=='sodium' && el[1] =='请选择'){
              result.unshift(el)//钠
            }
            else if(el[0] =='calcium' && el[1].length<=0) {
              result.unshift(el)//钙
            }
            else if(el[0] =='bicarbonate' && el[1].length<=0) {
              result.unshift(el)//碳酸氢盐
            }
            else if(el[0] =='dialysate_flow' && el[1].length<=0) {
              result.unshift(el)//透析液流量
            }
            else if(el[0] =='dialysate_temperature' && el[1].length<=0) {
              result.unshift(el)//透析液温度
            }
            else if (el[0]=='conductivity' && el[1] =='请选择'){
              result.unshift(el)//电导率
            }
            else if(el[0] =='amylaceum' && el[1].length<=0) {
              result.unshift(el)//葡萄糖
            }
            else if(el[0] =='hemodialysis_pipelines_count' && el[1].length<=0) {
              result.unshift(el)//透析管路支数
            }
            else if(el[0] =='puncture_needle_count' && el[1].length<=0) {
              result.unshift(el)//穿刺针支数
            }
            else if(el[0] =='epo_count' && el[1].length<=0) {
              result.unshift(el)//促红素支数
            }
            else if(el[0] =='max_ultrafiltration_rate' && el[1].length<=0) {
              result.unshift(el)//最大超滤率
            }
            else if(el[0] =='blood_access' && el[1]=='0') {
              result.unshift(el)//血管通路
            }
          });
          console.log(result, "提交的参数当中过滤出为空的");

          let warnarr = [];
          warnarr = this.getArrEqual(filedList, result);
          if (warnarr.length > 0) {
            return this.open_tips(warnarr);
            // 必填弹窗结束
          } else {
            commitDialysisPrescription(ParamsQuery)
                .then((response) => {
                  if (response.data.state == 0) {
                    Toast.fail(response.data.msg);
                    if(response.data.code == 600000008){
                      this.infor_visibility = true
                    }
                    return false;
                  } else {
                    this.advice_visibility = false;

                    var date = new Date();
                    var year = date.getFullYear();
                    var month = date.getMonth() + 1;
                    var day = date.getDate();

                    var hours = date.getHours();
                    var minites = date.getMinutes();

                    if (month < 10) {
                      month = "0" + month;
                    }
                    if (day < 10) {
                      day = "0" + day;
                    }
                    if (hours < 10) {
                      hours = "0" + hours;
                    }
                    if (minites < 10) {
                      minites = "0" + minites;
                    }
                    var nowDate =
                      year +
                      "-" +
                      month +
                      "-" +
                      day +
                      " " +
                      hours +
                      ":" +
                      minites;

                    let params = {
                      advices: this.waitUploadAdvices,
                      advice_date: parseTime(
                        this.$route.query.date,
                        "{y}-{m}-{d}"
                      ),
                      advice_doctor: this.waitUploadAdvices[0].advice_doctor,
                      advice_type: this.waitUploadAdvices[0].advice_type,
                      parent_id: this.$route.query.patient_id,
                      start_time: nowDate,
                      remark: "",
                    };
                    CreateGroupAdvice(
                      this.$route.query.patient_id,
                      0,
                      params
                    ).then((rs) => {
                      var resp = rs.data;
                      if (resp.state == 1) {
                        console.log("中国人民33333333333333");
                        this.doctorAdvices = resp.data.advices;
                        this.$emit(
                          "longSolution",
                          response.data.data.solution,
                          resp.data.advices
                        );
                        this.$emit(
                          "prescription",
                          response.data.data.prescription,
                          resp.data.advices
                        );
                        this.advice_visibility = false
                      } else {
                        if(resp.code == 600000008){
                          this.infor_visibility = true
                          this.advice_visibility = false
                        }else{
                          this.advice_visibility = false
                        }
                      }
                    });
                    Toast.success("提交成功");
                    // this.finish()
                    this.changePrescription = 0
                  }
                  this.changePrescription = 0
                })
                .catch((error) => {
                  this.changePrescription = 0
                  Toast.fail("请求失败");
                });
          }

            } else {
              Toast.loading({ forbidClick: true, duration: 0 });
              var arr = this.dialysisPrescription;

              let ParamsQuery = arr;
              console.log("ParamsQueryOne", ParamsQuery);
              if (this.$route.query.patient_id) {
                ParamsQuery["patient"] = this.$route.query.patient_id;
              } else {
                ParamsQuery["patient"] = this.patient_prop.id;
              }
              ParamsQuery["record_date"] = this.record_date;
              ParamsQuery["mode"] = "1";
                // 必填弹窗开始
          console.log(ParamsQuery, "提交的参数");
          let newParams = ParamsQuery;
          if (newParams.anticoagulant == "1" || newParams.anticoagulant == "12") {
            delete newParams.anticoagulant_shouji;
            delete newParams.anticoagulant_weichi;
            delete newParams.anticoagulant_zongliang;
          }
          if (newParams.oxygen_uptake == 2||newParams.oxygen_uptake == 0) {
            delete newParams.oxygen_time;
            delete newParams.oxygen_flow;
          }
          if (newParams.mode_id!=2 && newParams.mode_id!=5 && newParams.mode_id!= 12  && newParams.mode_id!= 28 && newParams.mode_id!= 26&& newParams.mode_id!= 34&& newParams.mode_id!= 35&& newParams.mode_id!= 36&& newParams.mode_id!= 10 && newParams.mode_id!= 41){
            delete newParams.replacement_total;
            delete newParams.displace_liqui_part;
            delete newParams.displace_liqui_value;
            delete newParams.displace_speed;
          }
          if(newParams.is_water != '是'){
            delete newParams.single_time;
            delete newParams. single_water;
          }
          if(newParams.anticoagulant != "1"){
            delete newParams.no_heparin_remarks;
          }
          if(newParams.anticoagulant != '10'){
            delete newParams.heparin_sodium;
            delete newParams.nucleoprotamine;
            delete newParams.push_the_protamine;
          }
          if(newParams.anticoagulant != '5'){
            delete newParams.anticoagulant_gaimingcheng;
            delete newParams.anticoagulant_gaijiliang;
          }
          if (this.isShow('置换液总量')==false) {
            delete newParams.displace_liqui_value;
          }
          let result = [];
          let filedList = this.$store.getters.user.fileds;
          let new_arr = Object.entries(newParams);
          new_arr.forEach((el) => {
            if (el[1] === "" || el[1] === 0 ) {
              // result.push(el);
              result.unshift(el)
            } else if(el[1] == "0" && el[1].length<=0){
              result.unshift(el)
            }
            else if(el[0] =='pre_impulse' && el[1].length<=0) {
              result.unshift(el)//欲冲量
            }
            else if(el[0] =='target_ultrafiltration' && el[1].length<=0) {
              result.unshift(el)//目标超滤量
            }
            else if (el[0]=='is_water' && el[1] =='请选择'){
              result.unshift(el)//是否单超脱水
            }
            else if(el[0] =='drhy_water' && el[1].length<=0) {
              result.unshift(el)//曲线脱水
            }
            else if(el[0] =='dry_water_hour' && el[1].length<=0) {
              result.unshift(el)//曲线脱水时长
            }
            else if(el[0] =='replacement_flow' && el[1].length<=0) {
              result.unshift(el)//置换流量
            }
            else if(el[0] =='kalium' && el[1].length<=0) {
              result.unshift(el)//钾
            }
            else if (el[0]=='sodium' && el[1] =='请选择'){
              result.unshift(el)//钠
            }
            else if(el[0] =='calcium' && el[1].length<=0) {
              result.unshift(el)//钙
            }
            else if(el[0] =='bicarbonate' && el[1].length<=0) {
              result.unshift(el)//碳酸氢盐
            }
            else if(el[0] =='dialysate_flow' && el[1].length<=0) {
              result.unshift(el)//透析液流量
            }
            else if(el[0] =='dialysate_temperature' && el[1].length<=0) {
              result.unshift(el)//透析液温度
            }
            else if (el[0]=='conductivity' && el[1] =='请选择'){
              result.unshift(el)//电导率
            }
            else if(el[0] =='amylaceum' && el[1].length<=0) {
              result.unshift(el)//葡萄糖
            }
            else if(el[0] =='hemodialysis_pipelines_count' && el[1].length<=0) {
              result.unshift(el)//透析管路支数
            }
            else if(el[0] =='puncture_needle_count' && el[1].length<=0) {
              result.unshift(el)//穿刺针支数
            }
            else if(el[0] =='epo_count' && el[1].length<=0) {
              result.unshift(el)//促红素支数
            }
            else if(el[0] =='max_ultrafiltration_rate' && el[1].length<=0) {
              result.unshift(el)//最大超滤率
            }
            else if(el[0] =='blood_access' && el[1]=='0') {
              result.unshift(el)//血管通路
            }
          });
          console.log(result, "提交的参数当中过滤出为空的");

          let warnarr = [];
          warnarr = this.getArrEqual(filedList, result);
          if (warnarr.length > 0) {
            return this.open_tips(warnarr);
            // 必填弹窗结束
          } else {
            commitDialysisPrescription(ParamsQuery)
                .then((response) => {
                  if (response.data.state == 0) {
                    Toast.fail(response.data.msg);
                    if(response.data.code == 600000008){
                     this.infor_visibility = true
                    }
                    return false;
                  } else {
                    Toast.success("提交成功");
                    this.$emit("advice");
                    this.$emit("longSolution", response.data.data.solution);
                    this.$emit("prescription", response.data.data.prescription);
                    // this.finish()
                  }
                  this.changePrescription = 0
                })
                .catch((error) => {
                  this.changePrescription = 0
                  Toast.fail("请求失败");
                });
          }

            }
          }
        } else {
          var arr = this.dialysisPrescription;

          let ParamsQuery = arr;
          console.log("ParamsQueryOne", ParamsQuery);
          if (this.$route.query.patient_id) {
            ParamsQuery["patient"] = this.$route.query.patient_id;
          } else {
            ParamsQuery["patient"] = this.patient_prop.id;
          }
          ParamsQuery["record_date"] = this.record_date;
          ParamsQuery["mode"] = "1";

          // 必填弹窗开始
          console.log(ParamsQuery, "提交的参数");
          let newParams = ParamsQuery;
          if (newParams.anticoagulant == "1" || newParams.anticoagulant == "12") {
            delete newParams.anticoagulant_shouji;
            delete newParams.anticoagulant_weichi;
            delete newParams.anticoagulant_zongliang;
          }
          if (newParams.oxygen_uptake == 2||newParams.oxygen_uptake == 0) {
            delete newParams.oxygen_time;
            delete newParams.oxygen_flow;
          }
          if (newParams.mode_id!=2 && newParams.mode_id!=5 && newParams.mode_id!= 12 && newParams.mode_id!= 28&& newParams.mode_id!= 26&& newParams.mode_id!= 34&& newParams.mode_id!= 35&& newParams.mode_id!= 36&& newParams.mode_id!= 37 && newParams.mode_id!= 10 && newParams.mode_id!= 41){
            delete newParams.replacement_total;
            delete newParams.displace_liqui_part;
            delete newParams.displace_liqui_value;
            delete newParams.displace_speed;
          }
          if(newParams.is_water != '是'){
            delete newParams.single_time;
            delete newParams. single_water;
          }
          if(newParams.anticoagulant != "1"){
            delete newParams.no_heparin_remarks;
          }
          if(newParams.anticoagulant != '10'){
            delete newParams.heparin_sodium;
            delete newParams.nucleoprotamine;
            delete newParams.push_the_protamine;
          }
          if(newParams.anticoagulant != '5'){
            delete newParams.anticoagulant_gaimingcheng;
            delete newParams.anticoagulant_gaijiliang;
          }
          if (this.isShow('置换液总量')==false) {
            delete newParams.displace_liqui_value;
          }
          let result = [];
          let filedList = this.$store.getters.user.fileds;
          let new_arr = Object.entries(newParams);
          new_arr.forEach((el) => {
            if (el[1] === "" || el[1] === 0 ) {
              // result.push(el);
              result.unshift(el)
            } else if(el[1] == "0" && el[1].length<=0){
              result.unshift(el)
            }
            else if(el[0] =='pre_impulse' && el[1].length<=0) {
              result.unshift(el)//欲冲量
            }
            else if(el[0] =='target_ultrafiltration' && el[1].length<=0) {
              result.unshift(el)//目标超滤量
            }
            else if (el[0]=='is_water' && el[1] =='请选择'){
              result.unshift(el)//是否单超脱水
            }
            else if(el[0] =='drhy_water' && el[1].length<=0) {
              result.unshift(el)//曲线脱水
            }
            else if(el[0] =='dry_water_hour' && el[1].length<=0) {
              result.unshift(el)//曲线脱水时长
            }
            else if(el[0] =='replacement_flow' && el[1].length<=0) {
              result.unshift(el)//置换流量
            }
            else if(el[0] =='kalium' && el[1].length<=0) {
              result.unshift(el)//钾
            }
            else if (el[0]=='sodium' && el[1] =='请选择'){
              result.unshift(el)//钠
            }
            else if(el[0] =='calcium' && el[1].length<=0) {
              result.unshift(el)//钙
            }
            else if(el[0] =='bicarbonate' && el[1].length<=0) {
              result.unshift(el)//碳酸氢盐
            }
            else if(el[0] =='dialysate_flow' && el[1].length<=0) {
              result.unshift(el)//透析液流量
            }
            else if(el[0] =='dialysate_temperature' && el[1].length<=0) {
              result.unshift(el)//透析液温度
            }
            else if (el[0]=='conductivity' && el[1] =='请选择'){
              result.unshift(el)//电导率
            }
            else if(el[0] =='amylaceum' && el[1].length<=0) {
              result.unshift(el)//葡萄糖
            }
            else if(el[0] =='hemodialysis_pipelines_count' && el[1].length<=0) {
              result.unshift(el)//透析管路支数
            }
            else if(el[0] =='puncture_needle_count' && el[1].length<=0) {
              result.unshift(el)//穿刺针支数
            }
            else if(el[0] =='epo_count' && el[1].length<=0) {
              result.unshift(el)//促红素支数
            }
            else if(el[0] =='max_ultrafiltration_rate' && el[1].length<=0) {
              result.unshift(el)//最大超滤率
            }
            else if(el[0] =='blood_access' && el[1]=='0') {
              result.unshift(el)//血管通路
            }
          });
          console.log(result, "提交的参数当中过滤出为空的");

          let warnarr = [];
          warnarr = this.getArrEqual(filedList, result);
          if (warnarr.length > 0) {
            return this.open_tips(warnarr);
            // 必填弹窗结束
          } else {
            Toast.loading({ forbidClick: true, duration: 0 });
            commitDialysisPrescription(ParamsQuery)
              .then((response) => {
                if (response.data.state == 0) {
                  Toast.fail(response.data.msg);
                  if(response.data.code == 600000008){
                    this.infor_visibility = true
                  }
                  return false;
                } else {
                  Toast.success("提交成功");
                  this.$emit("longSolution", response.data.data.solution);

                  this.$emit("prescription", response.data.data.prescription);
                  // this.finish()
                }
                this.changePrescription = 0
              })
              .catch((error) => {
                this.changePrescription = 0
                Toast.fail("请求失败");
              });
          }
        }
      }
    },

  //   commitInfo: function () {
  //     if (this.his_is_open == 1) {
  //       this.is_open = 0;
  //     }
  //     if (this.$store.getters.user.template_info.template_id == 6) {
  //       if (this.dialysisPrescription.mode_id == 2) {
  //         if (
  //           this.dialysisPrescription.displace_liqui_part == 0 ||
  //           this.dialysisPrescription.displace_liqui_part == -2 ||
  //           this.dialysisPrescription.displace_liqui_value == 0 ||
  //           this.dialysisPrescription.displace_liqui_value == ""
  //         ) {
  //           Toast.fail("HDF模式下置换方式和置换液总量不能为空！");
  //           return;
  //         }
  //         if (
  //           this.dialysisPrescription.mode_id != 2 &&
  //           this.dialysisPrescription.mode_id != 5 &&
  //           this.dialysisPrescription.mode_id != 12
  //         ) {
  //           this.dialysisPrescription.displace_liqui_part = 0;
  //           this.dialysisPrescription.displace_liqui_value = 0;
  //         }
  //       }
  //     }
  //     this.is_pre = 1;

  //     if (this.prescription_prop.id == "") {
  //       if (this.is_open == 0) {
  //         var arr = this.dialysisPrescription;

  //         let ParamsQuery = arr;
  //         console.log("ParamsQueryOne", ParamsQuery);
  //         if (this.$route.query.patient_id) {
  //           ParamsQuery["patient"] = this.$route.query.patient_id;
  //         } else {
  //           ParamsQuery["patient"] = this.patient_prop.id;
  //         }
  //         ParamsQuery["record_date"] = this.record_date;
  //         ParamsQuery["mode"] = "1";

  //         // 必填弹窗开始
  //         console.log(ParamsQuery, "提交的参数");
  //         let newParams = ParamsQuery;
  //         if (newParams.anticoagulant == "1") {
  //           delete newParams.anticoagulant_shouji;
  //           delete newParams.anticoagulant_weichi;
  //           delete newParams.anticoagulant_zongliang;
  //         }
  //         if (newParams.oxygen_uptake == 2||newParams.oxygen_uptake == 0) {
  //           delete newParams.oxygen_time;
  //           delete newParams.oxygen_flow;
  //         }
  //         if (newParams.mode_id!=2 && newParams.mode_id!=5 && newParams.mode_id!= 12){
  //           delete newParams.replacement_total;
  //           delete newParams.displace_liqui_part;
  //           delete newParams.displace_liqui_value;
  //           delete newParams.displace_speed;
  //         }
  //         if(newParams.is_water != '是'){
  //           delete newParams.single_time;
  //           delete newParams. single_water;
  //         }
  //         if(newParams.anticoagulant != "1"){
  //           delete newParams.no_heparin_remarks;
  //         }
  //         if(newParams.anticoagulant != '10'){
  //           delete newParams.heparin_sodium;
  //           delete newParams.nucleoprotamine;
  //           delete newParams.push_the_protamine;
  //         }
  //         if(newParams.anticoagulant != '5'){
  //           delete newParams.anticoagulant_gaimingcheng;
  //           delete newParams.anticoagulant_gaijiliang;
  //         }
  //         if (this.isShow('置换液总量')==false) {
  //           delete newParams.displace_liqui_value;
  //         }
  //         let result = [];
  //         let filedList = this.$store.getters.user.fileds;
  //         let new_arr = Object.entries(newParams);
  //         new_arr.forEach((el) => {
  //           if (el[1] === "" || el[1] === 0 ) {
  //             // result.push(el);
  //             result.unshift(el)
  //           } else if(el[1] == "0" && el[1].length<=0){
  //             result.unshift(el)
  //           }
  //           else if(el[0] =='pre_impulse' && el[1].length<=0) {
  //             result.unshift(el)//欲冲量
  //           }
  //           else if(el[0] =='target_ultrafiltration' && el[1].length<=0) {
  //             result.unshift(el)//目标超滤量
  //           }
  //           else if (el[0]=='is_water' && el[1] =='请选择'){
  //             result.unshift(el)//是否单超脱水
  //           }
  //           else if(el[0] =='drhy_water' && el[1].length<=0) {
  //             result.unshift(el)//曲线脱水
  //           }
  //           else if(el[0] =='dry_water_hour' && el[1].length<=0) {
  //             result.unshift(el)//曲线脱水时长
  //           }
  //           else if(el[0] =='replacement_flow' && el[1].length<=0) {
  //             result.unshift(el)//置换流量
  //           }
  //           else if(el[0] =='kalium' && el[1].length<=0) {
  //             result.unshift(el)//钾
  //           }
  //           else if (el[0]=='sodium' && el[1] =='请选择'){
  //             result.unshift(el)//钠
  //           }
  //           else if(el[0] =='calcium' && el[1].length<=0) {
  //             result.unshift(el)//钙
  //           }
  //           else if(el[0] =='bicarbonate' && el[1].length<=0) {
  //             result.unshift(el)//碳酸氢盐
  //           }
  //           else if(el[0] =='dialysate_flow' && el[1].length<=0) {
  //             result.unshift(el)//透析液流量
  //           }
  //           else if(el[0] =='dialysate_temperature' && el[1].length<=0) {
  //             result.unshift(el)//透析液温度
  //           }
  //           else if (el[0]=='conductivity' && el[1] =='请选择'){
  //             result.unshift(el)//电导率
  //           }
  //           else if(el[0] =='amylaceum' && el[1].length<=0) {
  //             result.unshift(el)//葡萄糖
  //           }
  //           else if(el[0] =='hemodialysis_pipelines_count' && el[1].length<=0) {
  //             result.unshift(el)//透析管路支数
  //           }
  //           else if(el[0] =='puncture_needle_count' && el[1].length<=0) {
  //             result.unshift(el)//穿刺针支数
  //           }
  //           else if(el[0] =='epo_count' && el[1].length<=0) {
  //             result.unshift(el)//促红素支数
  //           }
  //           else if(el[0] =='max_ultrafiltration_rate' && el[1].length<=0) {
  //             result.unshift(el)//最大超滤率
  //           }
  //           else if(el[0] =='blood_access' && el[1]=='0') {
  //             result.unshift(el)//血管通路
  //           }
  //         });
  //         console.log(result, "提交的参数当中过滤出为空的");

  //         let warnarr = [];
  //         warnarr = this.getArrEqual(filedList, result);
  //         if (warnarr.length > 0) {
  //           return this.open_tips(warnarr);
  //           // 必填弹窗结束
  //         } else {
  //           Toast.loading({ forbidClick: true, duration: 0 });
  //           postSolution(ParamsQuery).then((response) => {
  //             if (response.data.state == 0) {
  //               Toast.fail(response.data.msg);
  //               return false;
  //             } else {
  //               Toast.success("提交成功");

  //               this.$emit("advice");
  //               this.$emit("longSolution", response.data.data.solution);
  //               this.$emit("prescription", response.data.data.prescription);
  //               // this.finish()
  //             }
  //           });
  //         }

  //         // 推送医嘱
  //         if (this.prescription_open == 1) {
  //           var date = new Date();
  //           var year = date.getFullYear();
  //           var month = date.getMonth() + 1;
  //           var day = date.getDate();

  //           var hours = date.getHours();
  //           var minites = date.getMinutes();

  //           if (month < 10) {
  //             month = "0" + month;
  //           }
  //           if (day < 10) {
  //             day = "0" + day;
  //           }
  //           if (hours < 10) {
  //             hours = "0" + hours;
  //           }
  //           if (minites < 10) {
  //             minites = "0" + minites;
  //           }
  //           var nowDate =
  //             year + "-" + month + "-" + day + " " + hours + ":" + minites;

  //           let params = {
  //             advices: this.waitUploadAdvices,
  //             advice_date: parseTime(this.$route.query.date, "{y}-{m}-{d}"),
  //             advice_doctor: this.waitUploadAdvices[0].advice_doctor,
  //             advice_type: this.waitUploadAdvices[0].advice_type,
  //             parent_id: this.$route.query.patient_id,
  //             start_time: nowDate,
  //             remark: "",
  //           };
  //           CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(
  //             (rs) => {
  //               var resp = rs.data;
  //               if (resp.state == 1) {
  //                 this.doctorAdvices = resp.data.advices;
  //                 this.$emit(
  //                   "longSolution",
  //                   response.data.data.solution,
  //                   resp.data.advices
  //                 );
  //                 this.$emit(
  //                   "prescription",
  //                   response.data.data.prescription,
  //                   resp.data.advices
  //                 );
  //               } else {
  //               }
  //             }
  //           );
  //         }
  //       } else if (this.is_open == 1) {
  //         if (this.targetAdvices != null && this.targetAdvices.length > 0) {
  //           this.advice_visibility = false;
  //           console.log("进程为长期医嘱");
  //         var arr = this.dialysisPrescription;

  //           let ParamsQuery = arr;
  //           console.log("ParamsQueryOne", ParamsQuery);
  //           if (this.$route.query.patient_id) {
  //             ParamsQuery["patient"] = this.$route.query.patient_id;
  //           } else {
  //             ParamsQuery["patient"] = this.patient_prop.id;
  //           }
  //           ParamsQuery["record_date"] = this.record_date;
  //           ParamsQuery["mode"] = "1";
  //           // 必填弹窗开始
  //         console.log(ParamsQuery, "提交的参数");
  //         let newParams = ParamsQuery;
  //         if (newParams.anticoagulant == "1") {
  //           delete newParams.anticoagulant_shouji;
  //           delete newParams.anticoagulant_weichi;
  //           delete newParams.anticoagulant_zongliang;
  //         }
  //         if (newParams.oxygen_uptake == 2||newParams.oxygen_uptake == 0) {
  //           delete newParams.oxygen_time;
  //           delete newParams.oxygen_flow;
  //         }
  //         if (newParams.mode_id!=2 && newParams.mode_id!=5 && newParams.mode_id!= 12){
  //           delete newParams.replacement_total;
  //           delete newParams.displace_liqui_part;
  //           delete newParams.displace_liqui_value;
  //           delete newParams.displace_speed;
  //         }
  //         if(newParams.is_water != '是'){
  //           delete newParams.single_time;
  //           delete newParams. single_water;
  //         }
  //         if(newParams.anticoagulant != "1"){
  //           delete newParams.no_heparin_remarks;
  //         }
  //         if(newParams.anticoagulant != '10'){
  //           delete newParams.heparin_sodium;
  //           delete newParams.nucleoprotamine;
  //           delete newParams.push_the_protamine;
  //         }
  //         if(newParams.anticoagulant != '5'){
  //           delete newParams.anticoagulant_gaimingcheng;
  //           delete newParams.anticoagulant_gaijiliang;
  //         }
  //         if (this.isShow('置换液总量')==false) {
  //           delete newParams.displace_liqui_value;
  //         }
  //         let result = [];
  //         let filedList = this.$store.getters.user.fileds;
  //         let new_arr = Object.entries(newParams);
  //         new_arr.forEach((el) => {
  //           if (el[1] === "" || el[1] === 0 ) {
  //             // result.push(el);
  //             result.unshift(el)
  //           } else if(el[1] == "0" && el[1].length<=0){
  //             result.unshift(el)
  //           }
  //           else if(el[0] =='pre_impulse' && el[1].length<=0) {
  //             result.unshift(el)//欲冲量
  //           }
  //           else if(el[0] =='target_ultrafiltration' && el[1].length<=0) {
  //             result.unshift(el)//目标超滤量
  //           }
  //           else if (el[0]=='is_water' && el[1] =='请选择'){
  //             result.unshift(el)//是否单超脱水
  //           }
  //           else if(el[0] =='drhy_water' && el[1].length<=0) {
  //             result.unshift(el)//曲线脱水
  //           }
  //           else if(el[0] =='dry_water_hour' && el[1].length<=0) {
  //             result.unshift(el)//曲线脱水时长
  //           }
  //           else if(el[0] =='replacement_flow' && el[1].length<=0) {
  //             result.unshift(el)//置换流量
  //           }
  //           else if(el[0] =='kalium' && el[1].length<=0) {
  //             result.unshift(el)//钾
  //           }
  //           else if (el[0]=='sodium' && el[1] =='请选择'){
  //             result.unshift(el)//钠
  //           }
  //           else if(el[0] =='calcium' && el[1].length<=0) {
  //             result.unshift(el)//钙
  //           }
  //           else if(el[0] =='bicarbonate' && el[1].length<=0) {
  //             result.unshift(el)//碳酸氢盐
  //           }
  //           else if(el[0] =='dialysate_flow' && el[1].length<=0) {
  //             result.unshift(el)//透析液流量
  //           }
  //           else if(el[0] =='dialysate_temperature' && el[1].length<=0) {
  //             result.unshift(el)//透析液温度
  //           }
  //           else if (el[0]=='conductivity' && el[1] =='请选择'){
  //             result.unshift(el)//电导率
  //           }
  //           else if(el[0] =='amylaceum' && el[1].length<=0) {
  //             result.unshift(el)//葡萄糖
  //           }
  //           else if(el[0] =='hemodialysis_pipelines_count' && el[1].length<=0) {
  //             result.unshift(el)//透析管路支数
  //           }
  //           else if(el[0] =='puncture_needle_count' && el[1].length<=0) {
  //             result.unshift(el)//穿刺针支数
  //           }
  //           else if(el[0] =='epo_count' && el[1].length<=0) {
  //             result.unshift(el)//促红素支数
  //           }
  //           else if(el[0] =='max_ultrafiltration_rate' && el[1].length<=0) {
  //             result.unshift(el)//最大超滤率
  //           }
  //           else if(el[0] =='blood_access' && el[1]=='0') {
  //             result.unshift(el)//血管通路
  //           }
  //         });
  //         console.log(result, "提交的参数当中过滤出为空的");

  //         let warnarr = [];
  //         warnarr = this.getArrEqual(filedList, result);
  //         if (warnarr.length > 0) {
  //           return this.open_tips(warnarr);
  //           // 必填弹窗结束
  //         } else {
  //           // 弹框推送提醒
  //           this.advicePropForm.list = this.targetAdvices;
  //           this.advicePropForm.operators = this.admin_users_prop;
  //           this.advice_visibility = true;
  //           this.isShowDialog = false;

  //           for (let i = 0; i < this.advicePropForm.list.length; i++) {
  //             if (
  //               this.advicePropForm.list[i].parent_id == 0 &&
  //               this.advicePropForm.list[i].isCheck == 1
  //             ) {
  //               this.advicePropForm.result.push(this.advicePropForm.list[i].id);
  //             }
  //           }
  //         }

  //         } else {
  //           Toast.loading({ forbidClick: true, duration: 0 });
  //           var arr = this.dialysisPrescription;

  //           let ParamsQuery = arr;
  //           console.log("ParamsQueryOne", ParamsQuery);
  //           if (this.$route.query.patient_id) {
  //             ParamsQuery["patient"] = this.$route.query.patient_id;
  //           } else {
  //             ParamsQuery["patient"] = this.patient_prop.id;
  //           }
  //           ParamsQuery["record_date"] = this.record_date;
  //           ParamsQuery["mode"] = "1";
  //       // 必填弹窗开始
  //         console.log(ParamsQuery, "提交的参数");
  //         let newParams = ParamsQuery;
  //         if (newParams.anticoagulant == "1") {
  //           delete newParams.anticoagulant_shouji;
  //           delete newParams.anticoagulant_weichi;
  //           delete newParams.anticoagulant_zongliang;
  //         }
  //         if (newParams.oxygen_uptake == 2||newParams.oxygen_uptake == 0) {
  //           delete newParams.oxygen_time;
  //           delete newParams.oxygen_flow;
  //         }
  //         if (newParams.mode_id!=2 && newParams.mode_id!=5 && newParams.mode_id!= 12){
  //           delete newParams.replacement_total;
  //           delete newParams.displace_liqui_part;
  //           delete newParams.displace_liqui_value;
  //           delete newParams.displace_speed;
  //         }
  //         if(newParams.is_water != '是'){
  //           delete newParams.single_time;
  //           delete newParams. single_water;
  //         }
  //         if(newParams.anticoagulant != "1"){
  //           delete newParams.no_heparin_remarks;
  //         }
  //         if(newParams.anticoagulant != '10'){
  //           delete newParams.heparin_sodium;
  //           delete newParams.nucleoprotamine;
  //           delete newParams.push_the_protamine;
  //         }
  //         if(newParams.anticoagulant != '5'){
  //           delete newParams.anticoagulant_gaimingcheng;
  //           delete newParams.anticoagulant_gaijiliang;
  //         }
  //         if (this.isShow('置换液总量')==false) {
  //           delete newParams.displace_liqui_value;
  //         }
  //         let result = [];
  //         let filedList = this.$store.getters.user.fileds;
  //         let new_arr = Object.entries(newParams);
  //         new_arr.forEach((el) => {
  //           if (el[1] === "" || el[1] === 0 ) {
  //             // result.push(el);
  //             result.unshift(el)
  //           } else if(el[1] == "0" && el[1].length<=0){
  //             result.unshift(el)
  //           }
  //           else if(el[0] =='pre_impulse' && el[1].length<=0) {
  //             result.unshift(el)//欲冲量
  //           }
  //           else if(el[0] =='target_ultrafiltration' && el[1].length<=0) {
  //             result.unshift(el)//目标超滤量
  //           }
  //           else if (el[0]=='is_water' && el[1] =='请选择'){
  //             result.unshift(el)//是否单超脱水
  //           }
  //           else if(el[0] =='drhy_water' && el[1].length<=0) {
  //             result.unshift(el)//曲线脱水
  //           }
  //           else if(el[0] =='dry_water_hour' && el[1].length<=0) {
  //             result.unshift(el)//曲线脱水时长
  //           }
  //           else if(el[0] =='replacement_flow' && el[1].length<=0) {
  //             result.unshift(el)//置换流量
  //           }
  //           else if(el[0] =='kalium' && el[1].length<=0) {
  //             result.unshift(el)//钾
  //           }
  //           else if (el[0]=='sodium' && el[1] =='请选择'){
  //             result.unshift(el)//钠
  //           }
  //           else if(el[0] =='calcium' && el[1].length<=0) {
  //             result.unshift(el)//钙
  //           }
  //           else if(el[0] =='bicarbonate' && el[1].length<=0) {
  //             result.unshift(el)//碳酸氢盐
  //           }
  //           else if(el[0] =='dialysate_flow' && el[1].length<=0) {
  //             result.unshift(el)//透析液流量
  //           }
  //           else if(el[0] =='dialysate_temperature' && el[1].length<=0) {
  //             result.unshift(el)//透析液温度
  //           }
  //           else if (el[0]=='conductivity' && el[1] =='请选择'){
  //             result.unshift(el)//电导率
  //           }
  //           else if(el[0] =='amylaceum' && el[1].length<=0) {
  //             result.unshift(el)//葡萄糖
  //           }
  //           else if(el[0] =='hemodialysis_pipelines_count' && el[1].length<=0) {
  //             result.unshift(el)//透析管路支数
  //           }
  //           else if(el[0] =='puncture_needle_count' && el[1].length<=0) {
  //             result.unshift(el)//穿刺针支数
  //           }
  //           else if(el[0] =='epo_count' && el[1].length<=0) {
  //             result.unshift(el)//促红素支数
  //           }
  //           else if(el[0] =='max_ultrafiltration_rate' && el[1].length<=0) {
  //             result.unshift(el)//最大超滤率
  //           }
  //           else if(el[0] =='blood_access' && el[1]=='0') {
  //             result.unshift(el)//血管通路
  //           }
  //         });
  //         console.log(result, "提交的参数当中过滤出为空的");

  //         let warnarr = [];
  //         warnarr = this.getArrEqual(filedList, result);
  //         if (warnarr.length > 0) {
  //           return this.open_tips(warnarr);
  //           // 必填弹窗结束
  //         } else {
  //           postSolution(ParamsQuery)
  //             .then((response) => {
  //               if (response.data.state == 0) {
  //                 Toast.fail(response.data.msg);
  //                 return false;
  //               } else {
  //                 Toast.success("提交成功");

  //                 this.$emit("advice");
  //                 this.$emit("longSolution", response.data.data.solution);
  //                 this.$emit("prescription", response.data.data.prescription);
  //                 // this.finish()
  //               }
  //             })
  //             .catch((error) => {
  //               Toast.fail("请求失败");
  //             });
  //         }

  //         }
  //       } else if (this.is_open == 2) {
  //         if (this.waitUploadAdvices.length > 0) {
  //           Toast.loading({ forbidClick: true, duration: 0 });
  //           var arr = this.dialysisPrescription;

  //           let ParamsQuery = arr;
  //           console.log("ParamsQueryOne", ParamsQuery);
  //           if (this.$route.query.patient_id) {
  //             ParamsQuery["patient"] = this.$route.query.patient_id;
  //           } else {
  //             ParamsQuery["patient"] = this.patient_prop.id;
  //           }
  //           ParamsQuery["record_date"] = this.record_date;
  //           ParamsQuery["mode"] = "1";
  // // 必填弹窗开始
  //         console.log(ParamsQuery, "提交的参数");
  //         let newParams = ParamsQuery;
  //         if (newParams.anticoagulant == "1") {
  //           delete newParams.anticoagulant_shouji;
  //           delete newParams.anticoagulant_weichi;
  //           delete newParams.anticoagulant_zongliang;
  //         }
  //         if (newParams.oxygen_uptake == 2||newParams.oxygen_uptake == 0) {
  //           delete newParams.oxygen_time;
  //           delete newParams.oxygen_flow;
  //         }
  //         if (newParams.mode_id!=2 && newParams.mode_id!=5 && newParams.mode_id!= 12){
  //           delete newParams.replacement_total;
  //           delete newParams.displace_liqui_part;
  //           delete newParams.displace_liqui_value;
  //           delete newParams.displace_speed;
  //         }
  //         if(newParams.is_water != '是'){
  //           delete newParams.single_time;
  //           delete newParams. single_water;
  //         }
  //         if(newParams.anticoagulant != "1"){
  //           delete newParams.no_heparin_remarks;
  //         }
  //         if(newParams.anticoagulant != '10'){
  //           delete newParams.heparin_sodium;
  //           delete newParams.nucleoprotamine;
  //           delete newParams.push_the_protamine;
  //         }
  //         if(newParams.anticoagulant != '5'){
  //           delete newParams.anticoagulant_gaimingcheng;
  //           delete newParams.anticoagulant_gaijiliang;
  //         }
  //         if (this.isShow('置换液总量')==false) {
  //           delete newParams.displace_liqui_value;
  //         }
  //         let result = [];
  //         let filedList = this.$store.getters.user.fileds;
  //         let new_arr = Object.entries(newParams);
  //         new_arr.forEach((el) => {
  //           if (el[1] === "" || el[1] === 0 ) {
  //             // result.push(el);
  //             result.unshift(el)
  //           } else if(el[1] == "0" && el[1].length<=0){
  //             result.unshift(el)
  //           }
  //           else if(el[0] =='pre_impulse' && el[1].length<=0) {
  //             result.unshift(el)//欲冲量
  //           }
  //           else if(el[0] =='target_ultrafiltration' && el[1].length<=0) {
  //             result.unshift(el)//目标超滤量
  //           }
  //           else if (el[0]=='is_water' && el[1] =='请选择'){
  //             result.unshift(el)//是否单超脱水
  //           }
  //           else if(el[0] =='drhy_water' && el[1].length<=0) {
  //             result.unshift(el)//曲线脱水
  //           }
  //           else if(el[0] =='dry_water_hour' && el[1].length<=0) {
  //             result.unshift(el)//曲线脱水时长
  //           }
  //           else if(el[0] =='replacement_flow' && el[1].length<=0) {
  //             result.unshift(el)//置换流量
  //           }
  //           else if(el[0] =='kalium' && el[1].length<=0) {
  //             result.unshift(el)//钾
  //           }
  //           else if (el[0]=='sodium' && el[1] =='请选择'){
  //             result.unshift(el)//钠
  //           }
  //           else if(el[0] =='calcium' && el[1].length<=0) {
  //             result.unshift(el)//钙
  //           }
  //           else if(el[0] =='bicarbonate' && el[1].length<=0) {
  //             result.unshift(el)//碳酸氢盐
  //           }
  //           else if(el[0] =='dialysate_flow' && el[1].length<=0) {
  //             result.unshift(el)//透析液流量
  //           }
  //           else if(el[0] =='dialysate_temperature' && el[1].length<=0) {
  //             result.unshift(el)//透析液温度
  //           }
  //           else if (el[0]=='conductivity' && el[1] =='请选择'){
  //             result.unshift(el)//电导率
  //           }
  //           else if(el[0] =='amylaceum' && el[1].length<=0) {
  //             result.unshift(el)//葡萄糖
  //           }
  //           else if(el[0] =='hemodialysis_pipelines_count' && el[1].length<=0) {
  //             result.unshift(el)//透析管路支数
  //           }
  //           else if(el[0] =='puncture_needle_count' && el[1].length<=0) {
  //             result.unshift(el)//穿刺针支数
  //           }
  //           else if(el[0] =='epo_count' && el[1].length<=0) {
  //             result.unshift(el)//促红素支数
  //           }
  //           else if(el[0] =='max_ultrafiltration_rate' && el[1].length<=0) {
  //             result.unshift(el)//最大超滤率
  //           }
  //           else if(el[0] =='blood_access' && el[1]=='0') {
  //             result.unshift(el)//血管通路
  //           }
  //         });
  //         console.log(result, "提交的参数当中过滤出为空的");

  //         let warnarr = [];
  //         warnarr = this.getArrEqual(filedList, result);
  //         if (warnarr.length > 0) {
  //           return this.open_tips(warnarr);
  //           // 必填弹窗结束
  //         } else {
  //           postSolution(ParamsQuery)
  //             .then((response) => {
  //               if (response.data.state == 0) {
  //                 Toast.fail(response.data.msg);
  //                 return false;
  //               } else {
  //                 Toast.success("提交成功");

  //                 var date = new Date();
  //                 var year = date.getFullYear();
  //                 var month = date.getMonth() + 1;
  //                 var day = date.getDate();

  //                 var hours = date.getHours();
  //                 var minites = date.getMinutes();

  //                 if (month < 10) {
  //                   month = "0" + month;
  //                 }
  //                 if (day < 10) {
  //                   day = "0" + day;
  //                 }
  //                 if (hours < 10) {
  //                   hours = "0" + hours;
  //                 }
  //                 if (minites < 10) {
  //                   minites = "0" + minites;
  //                 }
  //                 var nowDate =
  //                   year +
  //                   "-" +
  //                   month +
  //                   "-" +
  //                   day +
  //                   " " +
  //                   hours +
  //                   ":" +
  //                   minites;

  //                 let params = {
  //                   advices: this.waitUploadAdvices,
  //                   advice_date: parseTime(
  //                     this.$route.query.date,
  //                     "{y}-{m}-{d}"
  //                   ),
  //                   advice_doctor: this.waitUploadAdvices[0].advice_doctor,
  //                   advice_type: this.waitUploadAdvices[0].advice_type,
  //                   parent_id: this.$route.query.patient_id,
  //                   start_time: nowDate,
  //                   remark: "",
  //                 };
  //                 CreateGroupAdvice(
  //                   this.$route.query.patient_id,
  //                   0,
  //                   params
  //                 ).then((rs) => {
  //                   var resp = rs.data;
  //                   if (resp.state == 1) {
  //                     this.doctorAdvices = resp.data.advices;
  //                     this.$emit(
  //                       "longSolution",
  //                       response.data.data.solution,
  //                       resp.data.advices
  //                     );
  //                     this.$emit(
  //                       "prescription",
  //                       response.data.data.prescription,
  //                       resp.data.advices
  //                     );
  //                   } else {
  //                   }
  //                 });

  //                 // this.finish()
  //               }
  //             })
  //             .catch((error) => {
  //               Toast.fail("请求失败");
  //             });
  //         }

  //         } else {
  //           Toast.loading({ forbidClick: true, duration: 0 });
  //           var arr = this.dialysisPrescription;

  //           let ParamsQuery = arr;
  //           console.log("ParamsQueryOne", ParamsQuery);
  //           if (this.$route.query.patient_id) {
  //             ParamsQuery["patient"] = this.$route.query.patient_id;
  //           } else {
  //             ParamsQuery["patient"] = this.patient_prop.id;
  //           }
  //           ParamsQuery["record_date"] = this.record_date;
  //           ParamsQuery["mode"] = "1";
  // // 必填弹窗开始
  //         console.log(ParamsQuery, "提交的参数");
  //         let newParams = ParamsQuery;
  //         if (newParams.anticoagulant == "1") {
  //           delete newParams.anticoagulant_shouji;
  //           delete newParams.anticoagulant_weichi;
  //           delete newParams.anticoagulant_zongliang;
  //         }
  //         if (newParams.oxygen_uptake == 2||newParams.oxygen_uptake == 0) {
  //           delete newParams.oxygen_time;
  //           delete newParams.oxygen_flow;
  //         }
  //         if (newParams.mode_id!=2 && newParams.mode_id!=5 && newParams.mode_id!= 12){
  //           delete newParams.replacement_total;
  //           delete newParams.displace_liqui_part;
  //           delete newParams.displace_liqui_value;
  //           delete newParams.displace_speed;
  //         }
  //         if(newParams.is_water != '是'){
  //           delete newParams.single_time;
  //           delete newParams. single_water;
  //         }
  //         if(newParams.anticoagulant != "1"){
  //           delete newParams.no_heparin_remarks;
  //         }
  //         if(newParams.anticoagulant != '10'){
  //           delete newParams.heparin_sodium;
  //           delete newParams.nucleoprotamine;
  //           delete newParams.push_the_protamine;
  //         }
  //         if(newParams.anticoagulant != '5'){
  //           delete newParams.anticoagulant_gaimingcheng;
  //           delete newParams.anticoagulant_gaijiliang;
  //         }
  //         if (this.isShow('置换液总量')==false) {
  //           delete newParams.displace_liqui_value;
  //         }
  //         let result = [];
  //         let filedList = this.$store.getters.user.fileds;
  //         let new_arr = Object.entries(newParams);
  //         new_arr.forEach((el) => {
  //           if (el[1] === "" || el[1] === 0 ) {
  //             // result.push(el);
  //             result.unshift(el)
  //           } else if(el[1] == "0" && el[1].length<=0){
  //             result.unshift(el)
  //           }
  //           else if(el[0] =='pre_impulse' && el[1].length<=0) {
  //             result.unshift(el)//欲冲量
  //           }
  //           else if(el[0] =='target_ultrafiltration' && el[1].length<=0) {
  //             result.unshift(el)//目标超滤量
  //           }
  //           else if (el[0]=='is_water' && el[1] =='请选择'){
  //             result.unshift(el)//是否单超脱水
  //           }
  //           else if(el[0] =='drhy_water' && el[1].length<=0) {
  //             result.unshift(el)//曲线脱水
  //           }
  //           else if(el[0] =='dry_water_hour' && el[1].length<=0) {
  //             result.unshift(el)//曲线脱水时长
  //           }
  //           else if(el[0] =='replacement_flow' && el[1].length<=0) {
  //             result.unshift(el)//置换流量
  //           }
  //           else if(el[0] =='kalium' && el[1].length<=0) {
  //             result.unshift(el)//钾
  //           }
  //           else if (el[0]=='sodium' && el[1] =='请选择'){
  //             result.unshift(el)//钠
  //           }
  //           else if(el[0] =='calcium' && el[1].length<=0) {
  //             result.unshift(el)//钙
  //           }
  //           else if(el[0] =='bicarbonate' && el[1].length<=0) {
  //             result.unshift(el)//碳酸氢盐
  //           }
  //           else if(el[0] =='dialysate_flow' && el[1].length<=0) {
  //             result.unshift(el)//透析液流量
  //           }
  //           else if(el[0] =='dialysate_temperature' && el[1].length<=0) {
  //             result.unshift(el)//透析液温度
  //           }
  //           else if (el[0]=='conductivity' && el[1] =='请选择'){
  //             result.unshift(el)//电导率
  //           }
  //           else if(el[0] =='amylaceum' && el[1].length<=0) {
  //             result.unshift(el)//葡萄糖
  //           }
  //           else if(el[0] =='hemodialysis_pipelines_count' && el[1].length<=0) {
  //             result.unshift(el)//透析管路支数
  //           }
  //           else if(el[0] =='puncture_needle_count' && el[1].length<=0) {
  //             result.unshift(el)//穿刺针支数
  //           }
  //           else if(el[0] =='epo_count' && el[1].length<=0) {
  //             result.unshift(el)//促红素支数
  //           }
  //           else if(el[0] =='max_ultrafiltration_rate' && el[1].length<=0) {
  //             result.unshift(el)//最大超滤率
  //           }
  //           else if(el[0] =='blood_access' && el[1]=='0') {
  //             result.unshift(el)//血管通路
  //           }
  //         });
  //         console.log(result, "提交的参数当中过滤出为空的");

  //         let warnarr = [];
  //         warnarr = this.getArrEqual(filedList, result);
  //         if (warnarr.length > 0) {
  //           return this.open_tips(warnarr);
  //           // 必填弹窗结束
  //         } else {
  //            postSolution(ParamsQuery)
  //             .then((response) => {
  //               if (response.data.state == 0) {
  //                 Toast.fail(response.data.msg);
  //                 return false;
  //               } else {
  //                 Toast.success("提交成功");

  //                 this.$emit("longSolution", response.data.data.solution);
  //                 this.$emit("prescription", response.data.data.prescription);
  //                 // this.finish()
  //               }
  //             })
  //             .catch((error) => {
  //               Toast.fail("请求失败");
  //             });
  //         }

  //         }
  //       }
  //     } else {
  //       if (this.prescription_prop.creater == 0) {
  //         if (this.is_open == 0) {
  //           var arr = this.dialysisPrescription;

  //           let ParamsQuery = arr;
  //           console.log("ParamsQueryOne", ParamsQuery);
  //           if (this.$route.query.patient_id) {
  //             ParamsQuery["patient"] = this.$route.query.patient_id;
  //           } else {
  //             ParamsQuery["patient"] = this.patient_prop.id;
  //           }
  //           ParamsQuery["record_date"] = this.record_date;
  //           ParamsQuery["mode"] = "1";
  //           // 必填弹窗开始
  //         console.log(ParamsQuery, "提交的参数");
  //         let newParams = ParamsQuery;
  //         if (newParams.anticoagulant == "1" || newParams.anticoagulant == "12") {
  //           delete newParams.anticoagulant_shouji;
  //           delete newParams.anticoagulant_weichi;
  //           delete newParams.anticoagulant_zongliang;
  //         }
  //         if (newParams.oxygen_uptake == 2||newParams.oxygen_uptake == 0) {
  //           delete newParams.oxygen_time;
  //           delete newParams.oxygen_flow;
  //         }
  //         if (newParams.mode_id!=2 && newParams.mode_id!=5 && newParams.mode_id!= 12){
  //           delete newParams.replacement_total;
  //           delete newParams.displace_liqui_part;
  //           delete newParams.displace_liqui_value;
  //           delete newParams.displace_speed;
  //         }
  //         if(newParams.is_water != '是'){
  //           delete newParams.single_time;
  //           delete newParams. single_water;
  //         }
  //         if(newParams.anticoagulant != "1"){
  //           delete newParams.no_heparin_remarks;
  //         }
  //         if(newParams.anticoagulant != '10'){
  //           delete newParams.heparin_sodium;
  //           delete newParams.nucleoprotamine;
  //           delete newParams.push_the_protamine;
  //         }
  //         if(newParams.anticoagulant != '5'){
  //           delete newParams.anticoagulant_gaimingcheng;
  //           delete newParams.anticoagulant_gaijiliang;
  //         }
  //         if (this.isShow('置换液总量')==false) {
  //           delete newParams.displace_liqui_value;
  //         }
  //         let result = [];
  //         let filedList = this.$store.getters.user.fileds;
  //         let new_arr = Object.entries(newParams);
  //         new_arr.forEach((el) => {
  //           if (el[1] === "" || el[1] === 0 ) {
  //             // result.push(el);
  //             result.unshift(el)
  //           } else if(el[1] == "0" && el[1].length<=0){
  //             result.unshift(el)
  //           }
  //           else if(el[0] =='pre_impulse' && el[1].length<=0) {
  //             result.unshift(el)//欲冲量
  //           }
  //           else if(el[0] =='target_ultrafiltration' && el[1].length<=0) {
  //             result.unshift(el)//目标超滤量
  //           }
  //           else if (el[0]=='is_water' && el[1] =='请选择'){
  //             result.unshift(el)//是否单超脱水
  //           }
  //           else if(el[0] =='drhy_water' && el[1].length<=0) {
  //             result.unshift(el)//曲线脱水
  //           }
  //           else if(el[0] =='dry_water_hour' && el[1].length<=0) {
  //             result.unshift(el)//曲线脱水时长
  //           }
  //           else if(el[0] =='replacement_flow' && el[1].length<=0) {
  //             result.unshift(el)//置换流量
  //           }
  //           else if(el[0] =='kalium' && el[1].length<=0) {
  //             result.unshift(el)//钾
  //           }
  //           else if (el[0]=='sodium' && el[1] =='请选择'){
  //             result.unshift(el)//钠
  //           }
  //           else if(el[0] =='calcium' && el[1].length<=0) {
  //             result.unshift(el)//钙
  //           }
  //           else if(el[0] =='bicarbonate' && el[1].length<=0) {
  //             result.unshift(el)//碳酸氢盐
  //           }
  //           else if(el[0] =='dialysate_flow' && el[1].length<=0) {
  //             result.unshift(el)//透析液流量
  //           }
  //           else if(el[0] =='dialysate_temperature' && el[1].length<=0) {
  //             result.unshift(el)//透析液温度
  //           }
  //           else if (el[0]=='conductivity' && el[1] =='请选择'){
  //             result.unshift(el)//电导率
  //           }
  //           else if(el[0] =='amylaceum' && el[1].length<=0) {
  //             result.unshift(el)//葡萄糖
  //           }
  //           else if(el[0] =='hemodialysis_pipelines_count' && el[1].length<=0) {
  //             result.unshift(el)//透析管路支数
  //           }
  //           else if(el[0] =='puncture_needle_count' && el[1].length<=0) {
  //             result.unshift(el)//穿刺针支数
  //           }
  //           else if(el[0] =='epo_count' && el[1].length<=0) {
  //             result.unshift(el)//促红素支数
  //           }
  //           else if(el[0] =='max_ultrafiltration_rate' && el[1].length<=0) {
  //             result.unshift(el)//最大超滤率
  //           }
  //           else if(el[0] =='blood_access' && el[1]=='0') {
  //             result.unshift(el)//血管通路
  //           }
  //         });
  //         console.log(result, "提交的参数当中过滤出为空的");

  //         let warnarr = [];
  //         warnarr = this.getArrEqual(filedList, result);
  //         if (warnarr.length > 0) {
  //           return this.open_tips(warnarr);
  //           // 必填弹窗结束
  //           } else {
  //             Toast.loading({ forbidClick: true, duration: 0 });
  //             postSolution(ParamsQuery)
  //               .then((response) => {
  //                 if (response.data.state == 0) {
  //                   Toast.fail(response.data.msg);
  //                   return false;
  //                 } else {
  //                   Toast.success("提交成功");

  //                   this.$emit("longSolution", response.data.data.solution);
  //                   this.$emit("prescription", response.data.data.prescription);
  //                   // this.finish()
  //                 }
  //               })
  //               .catch((error) => {
  //                 Toast.fail("请求失败");
  //               });
  //           }

  //           // 推送医嘱
  //           if (this.prescription_open == 1) {
  //             var date = new Date();
  //             var year = date.getFullYear();
  //             var month = date.getMonth() + 1;
  //             var day = date.getDate();

  //             var hours = date.getHours();
  //             var minites = date.getMinutes();

  //             if (month < 10) {
  //               month = "0" + month;
  //             }
  //             if (day < 10) {
  //               day = "0" + day;
  //             }
  //             if (hours < 10) {
  //               hours = "0" + hours;
  //             }
  //             if (minites < 10) {
  //               minites = "0" + minites;
  //             }
  //             var nowDate =
  //               year + "-" + month + "-" + day + " " + hours + ":" + minites;

  //             let params = {
  //               advices: this.waitUploadAdvices,
  //               advice_date: parseTime(this.$route.query.date, "{y}-{m}-{d}"),
  //               advice_doctor: this.waitUploadAdvices[0].advice_doctor,
  //               advice_type: this.waitUploadAdvices[0].advice_type,
  //               parent_id: this.$route.query.patient_id,
  //               start_time: nowDate,
  //               remark: "",
  //             };
  //             CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(
  //               (rs) => {
  //                 var resp = rs.data;
  //                 if (resp.state == 1) {
  //                   this.doctorAdvices = resp.data.advices;
  //                   this.$emit(
  //                     "longSolution",
  //                     response.data.data.solution,
  //                     resp.data.advices
  //                   );
  //                   this.$emit(
  //                     "prescription",
  //                     response.data.data.prescription,
  //                     resp.data.advices
  //                   );
  //                 } else {
  //                 }
  //               }
  //             );
  //           }
  //         } else if (this.is_open == 1) {
  //           if (this.targetAdvices != null && this.targetAdvices.length > 0) {
  //           this.advice_visibility = false;
  //           console.log("进程为长期医嘱");
  //         var arr = this.dialysisPrescription;

  //           let ParamsQuery = arr;
  //           console.log("ParamsQueryOne", ParamsQuery);
  //           if (this.$route.query.patient_id) {
  //             ParamsQuery["patient"] = this.$route.query.patient_id;
  //           } else {
  //             ParamsQuery["patient"] = this.patient_prop.id;
  //           }
  //           ParamsQuery["record_date"] = this.record_date;
  //           ParamsQuery["mode"] = "1";
  //           // 必填弹窗开始
  //         console.log(ParamsQuery, "提交的参数");
  //         let newParams = ParamsQuery;
  //         if (newParams.anticoagulant == "1") {
  //           delete newParams.anticoagulant_shouji;
  //           delete newParams.anticoagulant_weichi;
  //           delete newParams.anticoagulant_zongliang;
  //         }
  //         if (newParams.oxygen_uptake == 2||newParams.oxygen_uptake == 0) {
  //           delete newParams.oxygen_time;
  //           delete newParams.oxygen_flow;
  //         }
  //         if (newParams.mode_id!=2 && newParams.mode_id!=5 && newParams.mode_id!= 12){
  //           delete newParams.replacement_total;
  //           delete newParams.displace_liqui_part;
  //           delete newParams.displace_liqui_value;
  //           delete newParams.displace_speed;
  //         }
  //         if(newParams.is_water != '是'){
  //           delete newParams.single_time;
  //           delete newParams. single_water;
  //         }
  //         if(newParams.anticoagulant != "1"){
  //           delete newParams.no_heparin_remarks;
  //         }
  //         if(newParams.anticoagulant != '10'){
  //           delete newParams.heparin_sodium;
  //           delete newParams.nucleoprotamine;
  //           delete newParams.push_the_protamine;
  //         }
  //         if(newParams.anticoagulant != '5'){
  //           delete newParams.anticoagulant_gaimingcheng;
  //           delete newParams.anticoagulant_gaijiliang;
  //         }
  //         if (this.isShow('置换液总量')==false) {
  //           delete newParams.displace_liqui_value;
  //         }
  //         let result = [];
  //         let filedList = this.$store.getters.user.fileds;
  //         let new_arr = Object.entries(newParams);
  //         new_arr.forEach((el) => {
  //           if (el[1] === "" || el[1] === 0 ) {
  //             // result.push(el);
  //             result.unshift(el)
  //           } else if(el[1] == "0" && el[1].length<=0){
  //             result.unshift(el)
  //           }
  //           else if(el[0] =='pre_impulse' && el[1].length<=0) {
  //             result.unshift(el)//欲冲量
  //           }
  //           else if(el[0] =='target_ultrafiltration' && el[1].length<=0) {
  //             result.unshift(el)//目标超滤量
  //           }
  //           else if (el[0]=='is_water' && el[1] =='请选择'){
  //             result.unshift(el)//是否单超脱水
  //           }
  //           else if(el[0] =='drhy_water' && el[1].length<=0) {
  //             result.unshift(el)//曲线脱水
  //           }
  //           else if(el[0] =='dry_water_hour' && el[1].length<=0) {
  //             result.unshift(el)//曲线脱水时长
  //           }
  //           else if(el[0] =='replacement_flow' && el[1].length<=0) {
  //             result.unshift(el)//置换流量
  //           }
  //           else if(el[0] =='kalium' && el[1].length<=0) {
  //             result.unshift(el)//钾
  //           }
  //           else if (el[0]=='sodium' && el[1] =='请选择'){
  //             result.unshift(el)//钠
  //           }
  //           else if(el[0] =='calcium' && el[1].length<=0) {
  //             result.unshift(el)//钙
  //           }
  //           else if(el[0] =='bicarbonate' && el[1].length<=0) {
  //             result.unshift(el)//碳酸氢盐
  //           }
  //           else if(el[0] =='dialysate_flow' && el[1].length<=0) {
  //             result.unshift(el)//透析液流量
  //           }
  //           else if(el[0] =='dialysate_temperature' && el[1].length<=0) {
  //             result.unshift(el)//透析液温度
  //           }
  //           else if (el[0]=='conductivity' && el[1] =='请选择'){
  //             result.unshift(el)//电导率
  //           }
  //           else if(el[0] =='amylaceum' && el[1].length<=0) {
  //             result.unshift(el)//葡萄糖
  //           }
  //           else if(el[0] =='hemodialysis_pipelines_count' && el[1].length<=0) {
  //             result.unshift(el)//透析管路支数
  //           }
  //           else if(el[0] =='puncture_needle_count' && el[1].length<=0) {
  //             result.unshift(el)//穿刺针支数
  //           }
  //           else if(el[0] =='epo_count' && el[1].length<=0) {
  //             result.unshift(el)//促红素支数
  //           }
  //           else if(el[0] =='max_ultrafiltration_rate' && el[1].length<=0) {
  //             result.unshift(el)//最大超滤率
  //           }
  //           else if(el[0] =='blood_access' && el[1]=='0') {
  //             result.unshift(el)//血管通路
  //           }
  //         });
  //         console.log(result, "提交的参数当中过滤出为空的");

  //         let warnarr = [];
  //         warnarr = this.getArrEqual(filedList, result);
  //         if (warnarr.length > 0) {
  //           return this.open_tips(warnarr);
  //           // 必填弹窗结束
  //         } else {
  //           // 弹框推送提醒
  //           this.advicePropForm.list = this.targetAdvices;
  //           this.advicePropForm.operators = this.admin_users_prop;
  //           this.advice_visibility = true;
  //           this.isShowDialog = false;

  //           for (let i = 0; i < this.advicePropForm.list.length; i++) {
  //             if (
  //               this.advicePropForm.list[i].parent_id == 0 &&
  //               this.advicePropForm.list[i].isCheck == 1
  //             ) {
  //               this.advicePropForm.result.push(this.advicePropForm.list[i].id);
  //             }
  //           }
  //         }

  //         } else {
  //           Toast.loading({ forbidClick: true, duration: 0 });
  //           var arr = this.dialysisPrescription;

  //           let ParamsQuery = arr;
  //           console.log("ParamsQueryOne", ParamsQuery);
  //           if (this.$route.query.patient_id) {
  //             ParamsQuery["patient"] = this.$route.query.patient_id;
  //           } else {
  //             ParamsQuery["patient"] = this.patient_prop.id;
  //           }
  //           ParamsQuery["record_date"] = this.record_date;
  //           ParamsQuery["mode"] = "1";
  //       // 必填弹窗开始
  //         console.log(ParamsQuery, "提交的参数");
  //         let newParams = ParamsQuery;
  //         if (newParams.anticoagulant == "1") {
  //           delete newParams.anticoagulant_shouji;
  //           delete newParams.anticoagulant_weichi;
  //           delete newParams.anticoagulant_zongliang;
  //         }
  //         if (newParams.oxygen_uptake == 2||newParams.oxygen_uptake == 0) {
  //           delete newParams.oxygen_time;
  //           delete newParams.oxygen_flow;
  //         }
  //         if (newParams.mode_id!=2 && newParams.mode_id!=5 && newParams.mode_id!= 12){
  //           delete newParams.replacement_total;
  //           delete newParams.displace_liqui_part;
  //           delete newParams.displace_liqui_value;
  //           delete newParams.displace_speed;
  //         }
  //         if(newParams.is_water != '是'){
  //           delete newParams.single_time;
  //           delete newParams. single_water;
  //         }
  //         if(newParams.anticoagulant != "1"){
  //           delete newParams.no_heparin_remarks;
  //         }
  //         if(newParams.anticoagulant != '10'){
  //           delete newParams.heparin_sodium;
  //           delete newParams.nucleoprotamine;
  //           delete newParams.push_the_protamine;
  //         }
  //         if(newParams.anticoagulant != '5'){
  //           delete newParams.anticoagulant_gaimingcheng;
  //           delete newParams.anticoagulant_gaijiliang;
  //         }
  //         if (this.isShow('置换液总量')==false) {
  //           delete newParams.displace_liqui_value;
  //         }
  //         let result = [];
  //         let filedList = this.$store.getters.user.fileds;
  //         let new_arr = Object.entries(newParams);
  //         new_arr.forEach((el) => {
  //           if (el[1] === "" || el[1] === 0 ) {
  //             // result.push(el);
  //             result.unshift(el)
  //           } else if(el[1] == "0" && el[1].length<=0){
  //             result.unshift(el)
  //           }
  //           else if(el[0] =='pre_impulse' && el[1].length<=0) {
  //             result.unshift(el)//欲冲量
  //           }
  //           else if(el[0] =='target_ultrafiltration' && el[1].length<=0) {
  //             result.unshift(el)//目标超滤量
  //           }
  //           else if (el[0]=='is_water' && el[1] =='请选择'){
  //             result.unshift(el)//是否单超脱水
  //           }
  //           else if(el[0] =='drhy_water' && el[1].length<=0) {
  //             result.unshift(el)//曲线脱水
  //           }
  //           else if(el[0] =='dry_water_hour' && el[1].length<=0) {
  //             result.unshift(el)//曲线脱水时长
  //           }
  //           else if(el[0] =='replacement_flow' && el[1].length<=0) {
  //             result.unshift(el)//置换流量
  //           }
  //           else if(el[0] =='kalium' && el[1].length<=0) {
  //             result.unshift(el)//钾
  //           }
  //           else if (el[0]=='sodium' && el[1] =='请选择'){
  //             result.unshift(el)//钠
  //           }
  //           else if(el[0] =='calcium' && el[1].length<=0) {
  //             result.unshift(el)//钙
  //           }
  //           else if(el[0] =='bicarbonate' && el[1].length<=0) {
  //             result.unshift(el)//碳酸氢盐
  //           }
  //           else if(el[0] =='dialysate_flow' && el[1].length<=0) {
  //             result.unshift(el)//透析液流量
  //           }
  //           else if(el[0] =='dialysate_temperature' && el[1].length<=0) {
  //             result.unshift(el)//透析液温度
  //           }
  //           else if (el[0]=='conductivity' && el[1] =='请选择'){
  //             result.unshift(el)//电导率
  //           }
  //           else if(el[0] =='amylaceum' && el[1].length<=0) {
  //             result.unshift(el)//葡萄糖
  //           }
  //           else if(el[0] =='hemodialysis_pipelines_count' && el[1].length<=0) {
  //             result.unshift(el)//透析管路支数
  //           }
  //           else if(el[0] =='puncture_needle_count' && el[1].length<=0) {
  //             result.unshift(el)//穿刺针支数
  //           }
  //           else if(el[0] =='epo_count' && el[1].length<=0) {
  //             result.unshift(el)//促红素支数
  //           }
  //           else if(el[0] =='max_ultrafiltration_rate' && el[1].length<=0) {
  //             result.unshift(el)//最大超滤率
  //           }
  //           else if(el[0] =='blood_access' && el[1]=='0') {
  //             result.unshift(el)//血管通路
  //           }
  //         });
  //         console.log(result, "提交的参数当中过滤出为空的");

  //         let warnarr = [];
  //         warnarr = this.getArrEqual(filedList, result);
  //         if (warnarr.length > 0) {
  //           return this.open_tips(warnarr);
  //           // 必填弹窗结束
  //         } else {
  //           postSolution(ParamsQuery)
  //             .then((response) => {
  //               if (response.data.state == 0) {
  //                 Toast.fail(response.data.msg);
  //                 return false;
  //               } else {
  //                 Toast.success("提交成功");

  //                 this.$emit("advice");
  //                 this.$emit("longSolution", response.data.data.solution);
  //                 this.$emit("prescription", response.data.data.prescription);
  //                 // this.finish()
  //               }
  //             })
  //             .catch((error) => {
  //               Toast.fail("请求失败");
  //             });
  //         }

  //         }
  //         } else if (this.is_open == 2) {
  //           if (this.waitUploadAdvices.length > 0) {
  //             Toast.loading({ forbidClick: true, duration: 0 });
  //             var arr = this.dialysisPrescription;

  //             let ParamsQuery = arr;
  //             console.log("ParamsQueryOne", ParamsQuery);
  //             if (this.$route.query.patient_id) {
  //               ParamsQuery["patient"] = this.$route.query.patient_id;
  //             } else {
  //               ParamsQuery["patient"] = this.patient_prop.id;
  //             }
  //             ParamsQuery["record_date"] = this.record_date;
  //             ParamsQuery["mode"] = "2";
  // // 必填弹窗开始
  //         console.log(ParamsQuery, "提交的参数");
  //         let newParams = ParamsQuery;
  //         if (newParams.anticoagulant == "1" || newParams.anticoagulant == "12") {
  //           delete newParams.anticoagulant_shouji;
  //           delete newParams.anticoagulant_weichi;
  //           delete newParams.anticoagulant_zongliang;
  //         }
  //         if (newParams.oxygen_uptake == 2||newParams.oxygen_uptake == 0) {
  //           delete newParams.oxygen_time;
  //           delete newParams.oxygen_flow;
  //         }
  //         if (newParams.mode_id!=2 && newParams.mode_id!=5 && newParams.mode_id!= 12){
  //           delete newParams.replacement_total;
  //           delete newParams.displace_liqui_part;
  //           delete newParams.displace_liqui_value;
  //           delete newParams.displace_speed;
  //         }
  //         if(newParams.is_water != '是'){
  //           delete newParams.single_time;
  //           delete newParams. single_water;
  //         }
  //         if(newParams.anticoagulant != "1"){
  //           delete newParams.no_heparin_remarks;
  //         }
  //         if(newParams.anticoagulant != '10'){
  //           delete newParams.heparin_sodium;
  //           delete newParams.nucleoprotamine;
  //           delete newParams.push_the_protamine;
  //         }
  //         if(newParams.anticoagulant != '5'){
  //           delete newParams.anticoagulant_gaimingcheng;
  //           delete newParams.anticoagulant_gaijiliang;
  //         }
  //         if (this.isShow('置换液总量')==false) {
  //           delete newParams.displace_liqui_value;
  //         }
  //         let result = [];
  //         let filedList = this.$store.getters.user.fileds;
  //         let new_arr = Object.entries(newParams);
  //         new_arr.forEach((el) => {
  //           if (el[1] === "" || el[1] === 0 ) {
  //             // result.push(el);
  //             result.unshift(el)
  //           } else if(el[1] == "0" && el[1].length<=0){
  //             result.unshift(el)
  //           }
  //           else if(el[0] =='pre_impulse' && el[1].length<=0) {
  //             result.unshift(el)//欲冲量
  //           }
  //           else if(el[0] =='target_ultrafiltration' && el[1].length<=0) {
  //             result.unshift(el)//目标超滤量
  //           }
  //           else if (el[0]=='is_water' && el[1] =='请选择'){
  //             result.unshift(el)//是否单超脱水
  //           }
  //           else if(el[0] =='drhy_water' && el[1].length<=0) {
  //             result.unshift(el)//曲线脱水
  //           }
  //           else if(el[0] =='dry_water_hour' && el[1].length<=0) {
  //             result.unshift(el)//曲线脱水时长
  //           }
  //           else if(el[0] =='replacement_flow' && el[1].length<=0) {
  //             result.unshift(el)//置换流量
  //           }
  //           else if(el[0] =='kalium' && el[1].length<=0) {
  //             result.unshift(el)//钾
  //           }
  //           else if (el[0]=='sodium' && el[1] =='请选择'){
  //             result.unshift(el)//钠
  //           }
  //           else if(el[0] =='calcium' && el[1].length<=0) {
  //             result.unshift(el)//钙
  //           }
  //           else if(el[0] =='bicarbonate' && el[1].length<=0) {
  //             result.unshift(el)//碳酸氢盐
  //           }
  //           else if(el[0] =='dialysate_flow' && el[1].length<=0) {
  //             result.unshift(el)//透析液流量
  //           }
  //           else if(el[0] =='dialysate_temperature' && el[1].length<=0) {
  //             result.unshift(el)//透析液温度
  //           }
  //           else if (el[0]=='conductivity' && el[1] =='请选择'){
  //             result.unshift(el)//电导率
  //           }
  //           else if(el[0] =='amylaceum' && el[1].length<=0) {
  //             result.unshift(el)//葡萄糖
  //           }
  //           else if(el[0] =='hemodialysis_pipelines_count' && el[1].length<=0) {
  //             result.unshift(el)//透析管路支数
  //           }
  //           else if(el[0] =='puncture_needle_count' && el[1].length<=0) {
  //             result.unshift(el)//穿刺针支数
  //           }
  //           else if(el[0] =='epo_count' && el[1].length<=0) {
  //             result.unshift(el)//促红素支数
  //           }
  //           else if(el[0] =='max_ultrafiltration_rate' && el[1].length<=0) {
  //             result.unshift(el)//最大超滤率
  //           }
  //           else if(el[0] =='blood_access' && el[1]=='0') {
  //             result.unshift(el)//血管通路
  //           }
  //         });
  //         console.log(result, "提交的参数当中过滤出为空的");

  //         let warnarr = [];
  //         warnarr = this.getArrEqual(filedList, result);
  //         if (warnarr.length > 0) {
  //           return this.open_tips(warnarr);
  //           // 必填弹窗结束
  //         } else {
  //           postSolution(ParamsQuery)
  //               .then((response) => {
  //                 if (response.data.state == 0) {
  //                   Toast.fail(response.data.msg);
  //                   return false;
  //                 } else {
  //                   this.advice_visibility = false;

  //                   var date = new Date();
  //                   var year = date.getFullYear();
  //                   var month = date.getMonth() + 1;
  //                   var day = date.getDate();

  //                   var hours = date.getHours();
  //                   var minites = date.getMinutes();

  //                   if (month < 10) {
  //                     month = "0" + month;
  //                   }
  //                   if (day < 10) {
  //                     day = "0" + day;
  //                   }
  //                   if (hours < 10) {
  //                     hours = "0" + hours;
  //                   }
  //                   if (minites < 10) {
  //                     minites = "0" + minites;
  //                   }
  //                   var nowDate =
  //                     year +
  //                     "-" +
  //                     month +
  //                     "-" +
  //                     day +
  //                     " " +
  //                     hours +
  //                     ":" +
  //                     minites;

  //                   let params = {
  //                     advices: this.waitUploadAdvices,
  //                     advice_date: parseTime(
  //                       this.$route.query.date,
  //                       "{y}-{m}-{d}"
  //                     ),
  //                     advice_doctor: this.waitUploadAdvices[0].advice_doctor,
  //                     advice_type: this.waitUploadAdvices[0].advice_type,
  //                     parent_id: this.$route.query.patient_id,
  //                     start_time: nowDate,
  //                     remark: "",
  //                   };
  //                   CreateGroupAdvice(
  //                     this.$route.query.patient_id,
  //                     0,
  //                     params
  //                   ).then((rs) => {
  //                     var resp = rs.data;
  //                     if (resp.state == 1) {
  //                       console.log("中国人民33333333333333");
  //                       this.doctorAdvices = resp.data.advices;
  //                       this.$emit(
  //                         "longSolution",
  //                         response.data.data.solution,
  //                         resp.data.advices
  //                       );
  //                       this.$emit(
  //                         "prescription",
  //                         response.data.data.prescription,
  //                         resp.data.advices
  //                       );
  //                     } else {
  //                     }
  //                   });
  //                   Toast.success("提交成功");
  //                   // this.finish()
  //                 }
  //               })
  //               .catch((error) => {
  //                 Toast.fail("请求失败");
  //               });
  //         }

  //           } else {
  //             Toast.loading({ forbidClick: true, duration: 0 });
  //             var arr = this.dialysisPrescription;

  //             let ParamsQuery = arr;
  //             console.log("ParamsQueryOne", ParamsQuery);
  //             if (this.$route.query.patient_id) {
  //               ParamsQuery["patient"] = this.$route.query.patient_id;
  //             } else {
  //               ParamsQuery["patient"] = this.patient_prop.id;
  //             }
  //             ParamsQuery["record_date"] = this.record_date;
  //             ParamsQuery["mode"] = "1";
  //               // 必填弹窗开始
  //         console.log(ParamsQuery, "提交的参数");
  //         let newParams = ParamsQuery;
  //         if (newParams.anticoagulant == "1" || newParams.anticoagulant == "12") {
  //           delete newParams.anticoagulant_shouji;
  //           delete newParams.anticoagulant_weichi;
  //           delete newParams.anticoagulant_zongliang;
  //         }
  //         if (newParams.oxygen_uptake == 2||newParams.oxygen_uptake == 0) {
  //           delete newParams.oxygen_time;
  //           delete newParams.oxygen_flow;
  //         }
  //         if (newParams.mode_id!=2 && newParams.mode_id!=5 && newParams.mode_id!= 12){
  //           delete newParams.replacement_total;
  //           delete newParams.displace_liqui_part;
  //           delete newParams.displace_liqui_value;
  //           delete newParams.displace_speed;
  //         }
  //         if(newParams.is_water != '是'){
  //           delete newParams.single_time;
  //           delete newParams. single_water;
  //         }
  //         if(newParams.anticoagulant != "1"){
  //           delete newParams.no_heparin_remarks;
  //         }
  //         if(newParams.anticoagulant != '10'){
  //           delete newParams.heparin_sodium;
  //           delete newParams.nucleoprotamine;
  //           delete newParams.push_the_protamine;
  //         }
  //         if(newParams.anticoagulant != '5'){
  //           delete newParams.anticoagulant_gaimingcheng;
  //           delete newParams.anticoagulant_gaijiliang;
  //         }
  //         if (this.isShow('置换液总量')==false) {
  //           delete newParams.displace_liqui_value;
  //         }
  //         let result = [];
  //         let filedList = this.$store.getters.user.fileds;
  //         let new_arr = Object.entries(newParams);
  //         new_arr.forEach((el) => {
  //           if (el[1] === "" || el[1] === 0 ) {
  //             // result.push(el);
  //             result.unshift(el)
  //           } else if(el[1] == "0" && el[1].length<=0){
  //             result.unshift(el)
  //           }
  //           else if(el[0] =='pre_impulse' && el[1].length<=0) {
  //             result.unshift(el)//欲冲量
  //           }
  //           else if(el[0] =='target_ultrafiltration' && el[1].length<=0) {
  //             result.unshift(el)//目标超滤量
  //           }
  //           else if (el[0]=='is_water' && el[1] =='请选择'){
  //             result.unshift(el)//是否单超脱水
  //           }
  //           else if(el[0] =='drhy_water' && el[1].length<=0) {
  //             result.unshift(el)//曲线脱水
  //           }
  //           else if(el[0] =='dry_water_hour' && el[1].length<=0) {
  //             result.unshift(el)//曲线脱水时长
  //           }
  //           else if(el[0] =='replacement_flow' && el[1].length<=0) {
  //             result.unshift(el)//置换流量
  //           }
  //           else if(el[0] =='kalium' && el[1].length<=0) {
  //             result.unshift(el)//钾
  //           }
  //           else if (el[0]=='sodium' && el[1] =='请选择'){
  //             result.unshift(el)//钠
  //           }
  //           else if(el[0] =='calcium' && el[1].length<=0) {
  //             result.unshift(el)//钙
  //           }
  //           else if(el[0] =='bicarbonate' && el[1].length<=0) {
  //             result.unshift(el)//碳酸氢盐
  //           }
  //           else if(el[0] =='dialysate_flow' && el[1].length<=0) {
  //             result.unshift(el)//透析液流量
  //           }
  //           else if(el[0] =='dialysate_temperature' && el[1].length<=0) {
  //             result.unshift(el)//透析液温度
  //           }
  //           else if (el[0]=='conductivity' && el[1] =='请选择'){
  //             result.unshift(el)//电导率
  //           }
  //           else if(el[0] =='amylaceum' && el[1].length<=0) {
  //             result.unshift(el)//葡萄糖
  //           }
  //           else if(el[0] =='hemodialysis_pipelines_count' && el[1].length<=0) {
  //             result.unshift(el)//透析管路支数
  //           }
  //           else if(el[0] =='puncture_needle_count' && el[1].length<=0) {
  //             result.unshift(el)//穿刺针支数
  //           }
  //           else if(el[0] =='epo_count' && el[1].length<=0) {
  //             result.unshift(el)//促红素支数
  //           }
  //           else if(el[0] =='max_ultrafiltration_rate' && el[1].length<=0) {
  //             result.unshift(el)//最大超滤率
  //           }
  //           else if(el[0] =='blood_access' && el[1]=='0') {
  //             result.unshift(el)//血管通路
  //           }
  //         });
  //         console.log(result, "提交的参数当中过滤出为空的");

  //         let warnarr = [];
  //         warnarr = this.getArrEqual(filedList, result);
  //         if (warnarr.length > 0) {
  //           return this.open_tips(warnarr);
  //           // 必填弹窗结束
  //         } else {
  //           postSolution(ParamsQuery)
  //               .then((response) => {
  //                 if (response.data.state == 0) {
  //                   Toast.fail(response.data.msg);
  //                   return false;
  //                 } else {
  //                   Toast.success("提交成功");
  //                   this.$emit("advice");
  //                   this.$emit("longSolution", response.data.data.solution);
  //                   this.$emit("prescription", response.data.data.prescription);
  //                   // this.finish()
  //                 }
  //               })
  //               .catch((error) => {
  //                 Toast.fail("请求失败");
  //               });
  //         }

  //           }
  //         }
  //       } else {
  //         var arr = this.dialysisPrescription;

  //         let ParamsQuery = arr;
  //         console.log("ParamsQueryOne", ParamsQuery);
  //         if (this.$route.query.patient_id) {
  //           ParamsQuery["patient"] = this.$route.query.patient_id;
  //         } else {
  //           ParamsQuery["patient"] = this.patient_prop.id;
  //         }
  //         ParamsQuery["record_date"] = this.record_date;
  //         ParamsQuery["mode"] = "1";

  //         // 必填弹窗开始
  //         console.log(ParamsQuery, "提交的参数");
  //         let newParams = ParamsQuery;
  //         if (newParams.anticoagulant == "1" || newParams.anticoagulant == "12") {
  //           delete newParams.anticoagulant_shouji;
  //           delete newParams.anticoagulant_weichi;
  //           delete newParams.anticoagulant_zongliang;
  //         }
  //         if (newParams.oxygen_uptake == 2||newParams.oxygen_uptake == 0) {
  //           delete newParams.oxygen_time;
  //           delete newParams.oxygen_flow;
  //         }
  //         if (newParams.mode_id!=2 && newParams.mode_id!=5 && newParams.mode_id!= 12){
  //           delete newParams.replacement_total;
  //           delete newParams.displace_liqui_part;
  //           delete newParams.displace_liqui_value;
  //           delete newParams.displace_speed;
  //         }
  //         if(newParams.is_water != '是'){
  //           delete newParams.single_time;
  //           delete newParams. single_water;
  //         }
  //         if(newParams.anticoagulant != "1"){
  //           delete newParams.no_heparin_remarks;
  //         }
  //         if(newParams.anticoagulant != '10'){
  //           delete newParams.heparin_sodium;
  //           delete newParams.nucleoprotamine;
  //           delete newParams.push_the_protamine;
  //         }
  //         if(newParams.anticoagulant != '5'){
  //           delete newParams.anticoagulant_gaimingcheng;
  //           delete newParams.anticoagulant_gaijiliang;
  //         }
  //         if (this.isShow('置换液总量')==false) {
  //           delete newParams.displace_liqui_value;
  //         }
  //         let result = [];
  //         let filedList = this.$store.getters.user.fileds;
  //         let new_arr = Object.entries(newParams);
  //         new_arr.forEach((el) => {
  //           if (el[1] === "" || el[1] === 0 ) {
  //             // result.push(el);
  //             result.unshift(el)
  //           } else if(el[1] == "0" && el[1].length<=0){
  //             result.unshift(el)
  //           }
  //           else if(el[0] =='pre_impulse' && el[1].length<=0) {
  //             result.unshift(el)//欲冲量
  //           }
  //           else if(el[0] =='target_ultrafiltration' && el[1].length<=0) {
  //             result.unshift(el)//目标超滤量
  //           }
  //           else if (el[0]=='is_water' && el[1] =='请选择'){
  //             result.unshift(el)//是否单超脱水
  //           }
  //           else if(el[0] =='drhy_water' && el[1].length<=0) {
  //             result.unshift(el)//曲线脱水
  //           }
  //           else if(el[0] =='dry_water_hour' && el[1].length<=0) {
  //             result.unshift(el)//曲线脱水时长
  //           }
  //           else if(el[0] =='replacement_flow' && el[1].length<=0) {
  //             result.unshift(el)//置换流量
  //           }
  //           else if(el[0] =='kalium' && el[1].length<=0) {
  //             result.unshift(el)//钾
  //           }
  //           else if (el[0]=='sodium' && el[1] =='请选择'){
  //             result.unshift(el)//钠
  //           }
  //           else if(el[0] =='calcium' && el[1].length<=0) {
  //             result.unshift(el)//钙
  //           }
  //           else if(el[0] =='bicarbonate' && el[1].length<=0) {
  //             result.unshift(el)//碳酸氢盐
  //           }
  //           else if(el[0] =='dialysate_flow' && el[1].length<=0) {
  //             result.unshift(el)//透析液流量
  //           }
  //           else if(el[0] =='dialysate_temperature' && el[1].length<=0) {
  //             result.unshift(el)//透析液温度
  //           }
  //           else if (el[0]=='conductivity' && el[1] =='请选择'){
  //             result.unshift(el)//电导率
  //           }
  //           else if(el[0] =='amylaceum' && el[1].length<=0) {
  //             result.unshift(el)//葡萄糖
  //           }
  //           else if(el[0] =='hemodialysis_pipelines_count' && el[1].length<=0) {
  //             result.unshift(el)//透析管路支数
  //           }
  //           else if(el[0] =='puncture_needle_count' && el[1].length<=0) {
  //             result.unshift(el)//穿刺针支数
  //           }
  //           else if(el[0] =='epo_count' && el[1].length<=0) {
  //             result.unshift(el)//促红素支数
  //           }
  //           else if(el[0] =='max_ultrafiltration_rate' && el[1].length<=0) {
  //             result.unshift(el)//最大超滤率
  //           }
  //           else if(el[0] =='blood_access' && el[1]=='0') {
  //             result.unshift(el)//血管通路
  //           }
  //         });
  //         console.log(result, "提交的参数当中过滤出为空的");

  //         let warnarr = [];
  //         warnarr = this.getArrEqual(filedList, result);
  //         if (warnarr.length > 0) {
  //           return this.open_tips(warnarr);
  //           // 必填弹窗结束
  //         } else {
  //           Toast.loading({ forbidClick: true, duration: 0 });
  //           postSolution(ParamsQuery)
  //             .then((response) => {
  //               if (response.data.state == 0) {
  //                 Toast.fail(response.data.msg);
  //                 return false;
  //               } else {
  //                 Toast.success("提交成功");
  //                 this.$emit("longSolution", response.data.data.solution);

  //                 this.$emit("prescription", response.data.data.prescription);
  //                 // this.finish()
  //               }
  //             })
  //             .catch((error) => {
  //               Toast.fail("请求失败");
  //             });
  //         }
  //       }
  //     }
  //   },


    getArrEqual(arr1, arr2) {
      console.log(arr2, "arr1, arr2");
      let newArr = [];
      for (let i = 0; i < arr2.length; i++) {
        for (let j = 0; j < arr1.length; j++) {
          if (
            arr1[j].module == 1 &&
            arr1[j].is_show == 1 &&
            arr1[j].filed_name == arr2[i][0]
            &&arr1[j].is_write == 1
          ) {
            // console.log('123455678809',);
            // console.log(arr1[j],'数据字段')
            // console.log(arr2[i][0], "这是啥呀");
            newArr.push(arr1[j]);
          }
          if (
            arr1[j].module == 1 &&
            arr1[j].is_show == 1 &&
            arr1[j].is_write == 1 &&
            arr1[j].filed_name == arr2[i][0]
            &&(this.dialysisPrescription.mode_id == 2||this.dialysisPrescription.mode_id == 5||this.dialysisPrescription.mode_id == 12 ||this.dialysisPrescription.mode_id == 28 ||this.dialysisPrescription.mode_id == 26)
            &&arr1[j].filed_name == 'displace_liqui_part'
          ) {
            newArr.push(arr1[j]);
          }
          if (
            arr1[j].module == 1 &&
            arr1[j].is_show == 1 &&
            arr1[j].is_write == 1 &&
            arr1[j].filed_name == arr2[i][0]
            &&(this.dialysisPrescription.mode_id == 2||this.dialysisPrescription.mode_id == 5||this.dialysisPrescription.mode_id == 12 ||this.dialysisPrescription.mode_id == 28 ||this.dialysisPrescription.mode_id == 26 )
            &&arr1[j].filed_name == 'replacement_total'
          ) {
            newArr.push(arr1[j]);
          }
          if (
            arr1[j].module == 1 &&
            arr1[j].is_show == 1 &&
            arr1[j].is_write == 1 &&
            arr1[j].filed_name == arr2[i][0]
            &&(this.dialysisPrescription.mode_id == 2||this.dialysisPrescription.mode_id == 5||this.dialysisPrescription.mode_id == 12 ||this.dialysisPrescription.mode_id == 28 ||this.dialysisPrescription.mode_id == 26 ||this.dialysisPrescription.mode_id == 10)
            &&arr1[j].filed_name == 'displace_liqui_value'
          ) {
            newArr.push(arr1[j]);delete newParams.displace_speed;
          }
          if (
            arr1[j].module == 1 &&
            arr1[j].is_show == 1 &&
            arr1[j].is_write == 1 &&
            arr1[j].filed_name == arr2[i][0]
            &&(this.dialysisPrescription.mode_id == 2||this.dialysisPrescription.mode_id == 5||this.dialysisPrescription.mode_id == 12 ||this.dialysisPrescription.mode_id == 28 ||this.dialysisPrescription.mode_id == 26 ||this.dialysisPrescription.mode_id == 10)
            &&arr1[j].filed_name == 'displace_speed'
          ) {
            newArr.push(arr1[j]);
          }
          if(arr1[j].module == 1 &&
            arr1[j].is_show == 1 &&
            arr1[j].is_write == 1 &&
            arr1[j].filed_name == arr2[i][0]
            &&arr1[j].filed_name == 'anticoagulant_zongliang'&&
            this.dialysisPrescription.anticoagulant != "1"&&
            this.dialysisPrescription.anticoagulant != "12"
            ){
              newArr.push(arr1[j]);
          }
          if(arr1[j].module == 1 &&
            arr1[j].is_show == 1 &&
            arr1[j].is_write == 1 &&
            arr1[j].filed_name == arr2[i][0]
            &&arr1[j].filed_name == 'anticoagulant_weichi'&&
            this.dialysisPrescription.anticoagulant != "1" &&
            this.dialysisPrescription.anticoagulant != "12"){
              newArr.push(arr1[j]);
          }
          if(arr1[j].module == 1 &&
            arr1[j].is_show == 1 &&
            arr1[j].is_write == 1 &&
            arr1[j].filed_name == arr2[i][0]
            &&arr1[j].filed_name == 'anticoagulant_shouji'&&
            this.dialysisPrescription.anticoagulant != "1"&&
            this.dialysisPrescription.anticoagulant != "12"){
              newArr.push(arr1[j]);
          }
          if(arr1[j].module == 1 &&
            arr1[j].is_show == 1 &&
            arr1[j].is_write == 1 &&
            // arr1[j].filed_name == arr2[i][0] &&
            arr1[j].filed_name == 'is_water' &&
            this.dialysisPrescription.is_water == "请选择"

            ){
              // console.log('杀币')
              newArr.push(arr1[j]);
          }
          if (arr1[j].module == 1 &&
            arr1[j].is_show == 1 &&
            arr1[j].is_write == 1 &&
            arr1[j].filed_name == arr2[i][0] &&
            arr1[j].filed_name == 'single_time'&&
            this.dialysisPrescription.is_water == "是") {
            // console.log('杀币1')
            newArr.push(arr1[j]);
          }
          if (arr1[j].module == 1 &&
            arr1[j].is_show == 1 &&
            arr1[j].is_write == 1 &&
            arr1[j].filed_name == arr2[i][0] &&
            arr1[j].filed_name == 'single_water'&&
            this.dialysisPrescription.is_water == "是") {
            // console.log('杀币2')
            newArr.push(arr1[j]);
          }
          if (arr1[j].module == 1 &&
            arr1[j].is_show == 1 &&
            arr1[j].is_write == 1 &&
            arr1[j].filed_name == arr2[i][0] &&
            arr1[j].filed_name == 'no_heparin_remarks'&&
            this.dialysisPrescription.anticoagulant == "1") {
            // console.log('杀币3')
            newArr.push(arr1[j]);
          }
          if (arr1[j].module == 1 &&
            arr1[j].is_show == 1 &&
            arr1[j].is_write == 1 &&
            arr1[j].filed_name == arr2[i][0] &&
            arr1[j].filed_name == 'heparin_sodium'&&
            this.dialysisPrescription.anticoagulant == "10") {
            // console.log('杀币4')
            newArr.push(arr1[j]);
          }
          if (arr1[j].module == 1 &&
            arr1[j].is_show == 1 &&
            arr1[j].is_write == 1 &&
            arr1[j].filed_name == arr2[i][0] &&
            arr1[j].filed_name == 'nucleoprotamine'&&
            this.dialysisPrescription.anticoagulant == "10") {
            // console.log('杀币5')
            newArr.push(arr1[j]);
          }
          if (arr1[j].module == 1 &&
            arr1[j].is_show == 1 &&
            arr1[j].is_write == 1 &&
            arr1[j].filed_name == arr2[i][0] &&
            arr1[j].filed_name == 'push_the_protamine'&&
            this.dialysisPrescription.anticoagulant == "10") {
            // console.log('杀币6')
            newArr.push(arr1[j]);
          }
          if (arr1[j].module == 1 &&
            arr1[j].is_show == 1 &&
            arr1[j].is_write == 1 &&
            arr1[j].filed_name == arr2[i][0] &&
            arr1[j].filed_name == 'anticoagulant_gaimingcheng'&&
            this.dialysisPrescription.anticoagulant == "5") {
            // console.log('杀币7')
            newArr.push(arr1[j]);
          }
          if (arr1[j].module == 1 &&
            arr1[j].is_show == 1 &&
            arr1[j].is_write == 1 &&
            arr1[j].filed_name == arr2[i][0] &&
            arr1[j].filed_name == 'anticoagulant_gaijiliang'&&
            this.dialysisPrescription.anticoagulant == "5") {
            // console.log('杀币8')
            newArr.push(arr1[j]);
          }
          // if(newParams.anticoagulant == '5'){
          //   delete newParams.anticoagulant_shouji;
          //   delete newParams.anticoagulant_zongliang;
          // }
        }
      }
      console.log(this.dialysisPrescription.mode_id,'模式')
      console.log(newArr, "newArr");
      return newArr;
    },

    open_tips(info) {
      console.log(info, "oo");
      for (let i = 0; i < info.length; i++) {
        if (info[i].is_write == 1) {

          Toast.fail(`${info[i].filed_name_cn}为必填字段，不能为空`)
        }
         if (info[i].filed_name == 'anticoagulant_weichi') {
          //
          Toast.fail(`${info[i].filed_name_cn}为必填字段，不能为空`)
        }
         if (info[i].filed_name == 'anticoagulant_shouji') {

          Toast.fail(`${info[i].filed_name_cn}为必填字段，不能为空`)
        }
         if (info[i].filed_name == 'anticoagulant_zongliang') {

          Toast.fail(`${info[i].filed_name_cn}为必填字段，不能为空`)
        }
        if (info[i].filed_name == 'replacement_total') {

          Toast.fail(`${info[i].filed_name_cn}为必填字段，不能为空`)
        }
         if (info[i].filed_name == 'displace_liqui_value') {

          Toast.fail(`${info[i].filed_name_cn}为必填字段，不能为空`)
        }
        if (info[i].filed_name == 'displace_speed') {

          Toast.fail(`${info[i].filed_name_cn}为必填字段，不能为空`)
        }
        if (info[i].filed_name == 'displace_liqui_part') {

          Toast.fail(`${info[i].filed_name_cn}为必填字段，不能为空`)
        }
        if(info[i].filed_name == 'is_water' && this.dialysisPrescription.is_water == "请选择"){
          Toast.fail(`${info[i].filed_name_cn}为必填字段，不能为空`)
        }
        if(info[i].filed_name == 'single_time' && this.dialysisPrescription.is_water == "是"){
          Toast.fail(`${info[i].filed_name_cn}为必填字段，不能为空`)
        }
        if(info[i].filed_name == 'single_water' && this.dialysisPrescription.is_water == "是"){
          Toast.fail(`${info[i].filed_name_cn}为必填字段，不能为空`)
        }
        if(info[i].filed_name == 'no_heparin_remarks'){
          Toast.fail(`${info[i].filed_name_cn}为必填字段，不能为空`)
        }
        if (info[i].filed_name == 'heparin_sodium') {
          Toast.fail(`${info[i].filed_name_cn}为必填字段，不能为空`)
        }
        if(info[i].filed_name == 'nucleoprotamine' ){
          Toast.fail(`${info[i].filed_name_cn}为必填字段，不能为空`)
        }
        if(info[i].filed_name == 'push_the_protamine'){
          Toast.fail(`${info[i].filed_name_cn}为必填字段，不能为空`)
        }
        if(info[i].filed_name == 'anticoagulant_gaimingcheng' ){
          Toast.fail(`${info[i].filed_name_cn}为必填字段，不能为空`)
        }
        if(info[i].filed_name == 'anticoagulant_gaijiliang'){
          Toast.fail(`${info[i].filed_name_cn}为必填字段，不能为空`)
        }


      }
    },

    getHemodialysisPipelines: function (val) {
      let name = "";
      let names = this.hemodialysisPipelinesOptions;
      for (let i = 0; i < names.length; i++) {
        if (names[i].name == val) {
          name = names[i].name;
        }
      }
      return name;
    },
    getPunctureNeedle: function (val) {
      let name = "";
      let names = this.punctureNeedleOptions;
      for (let i = 0; i < names.length; i++) {
        if (names[i].name == val) {
          name = names[i].name;
        }
      }
      return name;
    },
    getEPO: function (val) {
      let name = "";
      let names = this.epoOptions;
      for (let i = 0; i < names.length; i++) {
        if (names[i].name == val) {
          name = names[i].name;
        }
      }
      return name;
    },
    menuComfirmThree: function (targetAdvices, start_time) {
      console.log("hhahahah")
      if (targetAdvices.length > 0) {
        if (this.is_pre == 1) {
          Toast.loading({ forbidClick: true, duration: 0 });
          var arr = this.dialysisPrescription;

          let ParamsQuery = arr;
          if (this.$route.query.patient_id) {
            ParamsQuery["patient"] = this.$route.query.patient_id;
          } else {
            ParamsQuery["patient"] = this.patient_prop.id;
          }

          ParamsQuery["record_date"] = this.record_date;

          if (this.prescription_prop.id == "") {
            ParamsQuery["mode"] = "1";
          } else {
            if (this.prescription_prop.creater == 0) {
              ParamsQuery["mode"] = "1";
            } else {
              ParamsQuery["mode"] = "2";
              if (
                this.prescription_prop.creater !=
                this.$store.getters.user.admin.id
              ) {
                ParamsQuery["mode"] = "3";
              }
            }
          }

          commitDialysisPrescription(ParamsQuery)
            .then((response) => {
              if (response.data.state == 0) {
                Toast.fail(response.data.msg);
                 if(response.data.code == 600000008){
                  this.advice_visibility = false
                  this.infor_visibility = true
                 }
                return false;
              } else {
                Toast.success("提交成功");

                var date = new Date();
                var year = date.getFullYear();
                var month = date.getMonth() + 1;
                var day = date.getDate();

                var hours = date.getHours();
                var minites = date.getMinutes();

                if (month < 10) {
                  month = "0" + month;
                }
                if (day < 10) {
                  day = "0" + day;
                }

                var nowDate = start_time;

                var dateArr = nowDate.split(" ");
                console.log(dateArr);
                let params = {
                  advices: targetAdvices,
                  advice_date: dateArr[0],
                  advice_doctor: targetAdvices[0].advice_doctor,
                  advice_type: targetAdvices[0].advice_type,
                  parent_id: this.$route.query.patient_id,
                  start_time: nowDate,
                  remark: "",
                };
                console.log("今啦6666666",params)

                CreateGroupAdvice(
                  this.$route.query.patient_id
                    ? this.$route.query.patient_id
                    : this.patient_prop.id,
                  0,
                  params
                ).then((rs) => {
                  var resp = rs.data;
                  if (resp.state == 1) {

                    this.$emit(
                      "prescription",
                      response.data.data.prescription,
                      resp.data.advices
                    );
                    this.advice_visibility = false
                  } else {
                    if(resp.code == 600000008){
                      this.advice_visibility = false
                      this.infor_visibility = true
                      }else{
                        this.advice_visibility = false
                      }
                  }
                });

                // this.finish()
              }
            })
            .catch((error) => {
              Toast.fail("请求失败");
            });
        } else if (this.is_pre == 2) {
          Toast.loading({ forbidClick: true, duration: 0 });
          var arr = this.dialysisPrescription;

          let ParamsQuery = arr;

          if (this.$route.query.patient_id) {
            ParamsQuery["patient"] = this.$route.query.patient_id;
          } else {
            ParamsQuery["patient"] = this.patient_prop.id;
          }
          ParamsQuery["record_date"] = this.record_date;
          ParamsQuery["mode"] = "1";

          postSolution(ParamsQuery).then((response) => {
              if (response.data.state == 0) {
                Toast.fail(response.data.msg);
               if(response.data.code == 600000008){
                  this.advice_visibility = false
                  this.infor_visibility = true

                }else{
                  this.advice_visibility = false
                }
                return false;
              } else {
                Toast.success("提交成功");
                var date = new Date();
                var year = date.getFullYear();
                var month = date.getMonth() + 1;
                var day = date.getDate();

                var hours = date.getHours();
                var minites = date.getMinutes();

                if (month < 10) {
                  month = "0" + month;
                }
                if (day < 10) {
                  day = "0" + day;
                }
                if (hours < 10) {
                  hours = "0" + hours;
                }
                if (minites < 10) {
                  minites = "0" + minites;
                }
                var nowDate = start_time;
                var dateArr = nowDate.split(" ");
                let params = {
                  advices: targetAdvices,
                  advice_date: dateArr[0],
                  advice_doctor: targetAdvices[0].advice_doctor,
                  advice_type: targetAdvices[0].advice_type,
                  parent_id: this.$route.query.patient_id,
                  start_time: nowDate,
                  remark: "",
                };
                console.log("今啦121221",params)

                CreateGroupAdvice(
                  this.$route.query.patient_id
                    ? this.$route.query.patient_id
                    : this.patient_prop.id,
                  0,
                  params
                ).then((rs) => {
                  var resp = rs.data;
                  if (resp.state == 1) {
                    console.log("中国人民555555555555");
                    this.$emit(
                      "prescription",
                      response.data.data.prescription,
                      resp.data.advices
                    );
                    this.$emit(
                      "longSolution",
                      response.data.data.solution,
                      resp.data.advices
                    );
                    this.advice_visibility = false
                  } else {
                     if(resp.code == 600000008){
                        this.advice_visibility = false
                        this.infor_visibility = true
                     }else{
                       this.advice_visibility = false
                     }
                  }
                });
                // this.finish()
              }
            })
            .catch((error) => {
              Toast.fail("请求失败");
            });
        }
      } else {
        if (this.is_pre == 1) {
          Toast.loading({ forbidClick: true, duration: 0 });
          var arr = this.dialysisPrescription;

          let ParamsQuery = arr;

          if (this.$route.query.patient_id) {
            ParamsQuery["patient"] = this.$route.query.patient_id;
          } else {
            ParamsQuery["patient"] = this.patient_prop.id;
          }
          ParamsQuery["record_date"] = this.record_date;
          if (this.prescription_prop.id == "") {
            ParamsQuery["mode"] = "1";
          } else {
            if (this.prescription_prop.creater == 0) {
              ParamsQuery["mode"] = "1";
            } else {
              ParamsQuery["mode"] = "2";
              if (
                this.prescription_prop.creater !=
                this.$store.getters.user.admin.id
              ) {
                ParamsQuery["mode"] = "3";
              }
            }
          }
          commitDialysisPrescription(ParamsQuery).then((response) => {
            if (response.data.state == 0) {
              Toast.fail(response.data.msg);
              if(response.data.code == 600000008){
                this.advice_visibility = false
                  this.infor_visibility = true
              }else{
                this.advice_visibility = false
              }
              return false;
            } else {
              Toast.success("提交成功");

              this.$emit(
                "prescription",
                response.data.data.prescription,
                this.doctorAdvices
              );
              // this.finish()
            }
          });
        } else if (this.is_pre == 2) {
          Toast.loading({ forbidClick: true, duration: 0 });
          var arr = this.dialysisPrescription;

          let ParamsQuery = arr;

          if (this.$route.query.patient_id) {
            ParamsQuery["patient"] = this.$route.query.patient_id;
          } else {
            ParamsQuery["patient"] = this.patient_prop.id;
          }
          ParamsQuery["record_date"] = this.record_date;
          ParamsQuery["mode"] = "1";
          postSolution(ParamsQuery)
            .then((response) => {
              if (response.data.state == 0) {
                Toast.fail(response.data.msg);
                if(response.data.code == 600000008){
                   this.advice_visibility = false
                   this.infor_visibility = true

                }else{
                  this.advice_visibility = false
                }
                return false;
              } else {
                Toast.success("提交成功");
                this.$emit(
                  "longSolution",
                  response.data.data.solution,
                  this.doctorAdvices
                );
                this.$emit(
                  "prescription",
                  response.data.data.prescription,
                  this.doctorAdvices
                );
                // this.finish()
              }
            })
            .catch((error) => {
              Toast.fail("请求失败");
            });
        }
      }
    },
    menuComfirm: function (val) {
      console.log("val2323232322323", val);
      if (val.id == 1) {
        this.dialysisPrescription.displace_liqui_value = "";
        this.dialysisPrescription.displace_liqui_part = "";
      }
      Toast.loading({
        forbidClick: true,
        duration: 0,
        message: "切换模式中,请稍候",
      });
      // 从服务器获取对应模式的长期处方
      let ParamsQuery = {};
      ParamsQuery["patient_id"] = this.$route.query.patient_id;
      ParamsQuery["mode_id"] = val.id;
      GetSolution(ParamsQuery)
        .then((response) => {
          if (response.data.state == 0) {
            Toast.fail(response.data.msg);
            return false;
          } else {
            console.log("hhhhhahh", this.last_prescription);
            console.log("hhhhhahh", response.data.data.solution);
            console.log("hhhhhahh", response.data.data.prescription);
            Toast.success("切换成功");
            if (response.data.data.solution != null) {
              for (const key in response.data.data.solution) {
                // 长期处方不为空
                if (
                  key != "target_ultrafiltration" &&
                  key != "niprocart" &&
                  key != "target_ultrafiltration" &&
                  key != "jms" &&
                  key != "fistula_needle_set" &&
                  key != "fistula_needle_set_16" &&
                  key != "hemoperfusion" &&
                  key != "dialyser_sterilised" &&
                  key != "filtryzer" &&
                  key != "target_ktv" &&
                  key != "dialyzers" &&
                  key != "injector" &&
                  key != "bloodlines" &&
                  key != "tubing_hemodialysis" &&
                  key != "package" &&
                  key != "a_liquid" &&
                  key != "remark"
                ) {
                  this.dialysisPrescription[key] =
                    response.data.data.solution[key];
                }
              }
              if (this.$store.getters.user.template_info.org_id == 9671 || this.$store.getters.user.template_info.org_id == 9675 ||this.$store.getters.user.template_info.org_id == 10340) {
                console.log("抠门；哦啊",response.data.data.dialysisPrescription.remark);
                this.dialysisPrescription.sodium = 138;
                this.dialysisPrescription.bicarbonate = 31.1;
                this.dialysisPrescription.dialysate_flow = 500;
                if (this.last_prescription != null && response.data.data.dialysisPrescription != null) {
                  this.dialysisPrescription.remark =  response.data.data.dialysisPrescription.remark;
                }
              }
              if(this.$store.getters.user.template_info.org_id == 10447){
                this.dialysisPrescription.dialysate_flow = 500
              }

              //新化博翔
              if(this.$store.getters.user.template_info.org_id == 10447){
                  if(this.dialysisPrescription.mode_id == 2 || this.dialysisPrescription.mode_id == 5 || this.dialysisPrescription.mode_id == 12 || this.dialysisPrescription.mode_id == 10){
                    this.dialysisPrescription.displace_liqui_part = 1
                    this.dialysisPrescription.displace_liqui_value = 32
                }
              }
              console.log("机构id我噢哦嚄嚄我",this.$store.getters.user.template_info.org_id)
              if(this.$store.getters.user.template_info.org_id == 10445){
                console.log("上次透析处方",this.lastDialysisPrescription)
                if (this.lastDialysisPrescription != null) {
                  this.dialysisPrescription.remark = this.lastDialysisPrescription.remark
                }
              }
            } else {
              if (response.data.data.prescription != null) {
                // 临时处方不为空
                for (const key in response.data.data.prescription) {
                  if (
                    key != "target_ultrafiltration" &&
                    key != "niprocart" &&
                    key != "target_ultrafiltration" &&
                    key != "jms" &&
                    key != "fistula_needle_set" &&
                    key != "fistula_needle_set_16" &&
                    key != "hemoperfusion" &&
                    key != "dialyser_sterilised" &&
                    key != "filtryzer" &&
                    key != "target_ktv" &&
                    key != "dialyzers" &&
                    key != "injector" &&
                    key != "bloodlines" &&
                    key != "tubing_hemodialysis" &&
                    key != "package" &&
                    key != "a_liquid" &&
                    key != "remark"
                  ) {
                    this.dialysisPrescription[key] =
                      response.data.data.prescription[key];
                  }
                }
              } else if (response.data.data.system_prescription != null) {
                for (const key in response.data.data.system_prescription) {
                  if (
                    key != "target_ultrafiltration" &&
                    key != "niprocart" &&
                    key != "target_ultrafiltration" &&
                    key != "jms" &&
                    key != "fistula_needle_set" &&
                    key != "fistula_needle_set_16" &&
                    key != "hemoperfusion" &&
                    key != "dialyser_sterilised" &&
                    key != "filtryzer" &&
                    key != "target_ktv" &&
                    key != "dialyzers" &&
                    key != "injector" &&
                    key != "bloodlines" &&
                    key != "tubing_hemodialysis" &&
                    key != "package" &&
                    key != "a_liquid" &&
                    key != "remark"
                  ) {
                    this.dialysisPrescription[key] =
                      response.data.data.system_prescription[key];
                  }
                }
              } else {
                for (const key in this.dialysisPrescription) {
                  // 临时处方为空
                  if (
                    key != "target_ultrafiltration" &&
                    key != "niprocart" &&
                    key != "target_ultrafiltration" &&
                    key != "jms" &&
                    key != "fistula_needle_set" &&
                    key != "fistula_needle_set_16" &&
                    key != "hemoperfusion" &&
                    key != "dialyser_sterilised" &&
                    key != "filtryzer" &&
                    key != "target_ktv" &&
                    key != "dialyzers" &&
                    key != "injector" &&
                    key != "bloodlines" &&
                    key != "tubing_hemodialysis" &&
                    key != "package" &&
                    key != "a_liquid" &&
                    key != "remark"
                  ) {
                    this.dialysisPrescription[key] = "";
                  }
                }
                this.dialysisPrescription.mode_id = val.id;
              }
              if (
                this.$store.getters.user.template_info.org_id == 9671 ||
                this.$store.getters.user.template_info.org_id == 9675 ||
                this.$store.getters.user.template_info.org_id == 10340
              ) {
                this.dialysisPrescription.sodium = 138;
                this.dialysisPrescription.bicarbonate = 31.1;
                this.dialysisPrescription.dialysate_flow = 500;
                if (
                  this.last_prescription != null &&
                  response.data.data.system_prescription != null &&
                  response.data.data.system_prescription.remark == ""
                ) {
                  this.dialysisPrescription.remark =
                    response.data.data.system_prescription.remark;
                }
              }
            }
            if (response.data.data.solution == null) {
              if (
                this.$store.getters.user.template_info.org_id == 9671 ||
                this.$store.getters.user.template_info.org_id == 9675 ||
                this.$store.getters.user.template_info.org_id == 10340
              ) {
                this.dialysisPrescription.sodium = 138;
                this.dialysisPrescription.bicarbonate = 31.1;
                this.dialysisPrescription.dialysate_flow = 500;
                if (this.last_prescription != null) {
                  this.dialysisPrescription.remark =
                    this.last_prescription.remark;
                }
              }

              if(this.$store.getters.user.template_info.org_id == 10445){
                console.log("上次透析处方2",this.lastDialysisPrescription)
                if (this.lastDialysisPrescription != null) {
                  this.dialysisPrescription.remark = this.lastDialysisPrescription.remark;
                }
              }
            }
          }

          if (
            this.dialysisPrescription.dialysis_duration_hour === "" ||
            this.dialysisPrescription.dialysis_duration_minute === ""
          ) {
            this.timeValue = "";
            this.time = "03:00";
          } else {
            this.timeValue =
              this.dialysisPrescription.dialysis_duration_hour +
              "小时" +
              this.dialysisPrescription.dialysis_duration_minute +
              "分钟";
            this.time =
              (this.dialysisPrescription.dialysis_duration_hour > 10
                ? this.dialysisPrescription.dialysis_duration_hour
                : "0" + this.dialysisPrescription.dialysis_duration_hour) +
              ":" +
              (this.dialysisPrescription.dialysis_duration_minute > 10
                ? this.dialysisPrescription.dialysis_duration_minute
                : "0" + this.dialysisPrescription.dialysis_duration_minute);
          }
        })
        .catch((error) => {
          Toast.fail("请求失败");
        });
    },
    GetModeByModeId: function (val) {
      let treatment_mode_name = '';
      let treatment_mode = this.modeOption;

      for (let keys in treatment_mode) {
        if (treatment_mode[keys].id == val) {
          treatment_mode_name = treatment_mode[keys].name;
        }
      }
      // console.log(treatment_mode,'treatment_mode')
      for (let keys in treatment_mode) {
        if (treatment_mode[keys].id == val) {
          treatment_mode_name = treatment_mode[keys].name;
          var treatment_mode_id = treatment_mode[keys].id;
          if (
            treatment_mode_id === 1 ||
            treatment_mode_id === 3 ||
            treatment_mode_id === 4 ||
            treatment_mode_id === 6 ||
            treatment_mode_id === 7 ||
            treatment_mode_id === 8 ||
            treatment_mode_id === 9 ||
            treatment_mode_id === 11 ||
            treatment_mode_id === 13 ||
            treatment_mode_id === 14 ||
            treatment_mode_id === 15 ||
            treatment_mode_id === 16 ||
            treatment_mode_id === 19 ||
            treatment_mode_id === 42
          ) {

            this.zhiShow = false;
            this.totalShow = false;
            this.huShow = false;
          } else {
            this.zhiShow = true;
            this.totalShow = true;
            this.huShow = true;
          }

          if(treatment_mode_id === 2 || treatment_mode_id === 3 ||  treatment_mode_id ===4){
             if(this.$store.getters.user.template_info.org_id ==9970){
                this.dialysisPrescription.dialysis_remark = "患者毒素多，出现皮肤瘙痒，定期HDF或HP能改善患者不适症状，有利透析的充分性,因血液透析滤过有更稳定的血流动力学状态，且能有效清除中分子物质；血液灌流能更有效的清除大分子毒素。两者定期治疗能减少透析相关并发症，有得透析充分性，改善患者生活质量。"
             }
          }else{
            this.dialysisPrescription.dialysis_remark =""
          }
        }
      }

      return treatment_mode_name;
    },
    GetDialysateFormulationById: function (val) {
      let name = "";
      let dfl = this.dialysateFormulationOptions.length;
      for (let index = 0; index < dfl; index++) {
        if (this.dialysateFormulationOptions[index].id == val) {
          name = this.dialysateFormulationOptions[index].name;
          break;
        }
      }
      return name;
    },
    GetAnticoagulantById: function (val) {
      if (val == 1) {
        this.dialysisPrescription.anticoagulant_shouji = "";
        this.dialysisPrescription.anticoagulant_zongliang = "";
        this.dialysisPrescription.anticoagulant_weichi = "";
        if(this.dialysisPrescription.washing_time == 0 || this.dialysisPrescription.washing_time==""){
          this.dialysisPrescription.washing_time=1
        }
        if(this.dialysisPrescription.warsh_count == 0 || this.dialysisPrescription.warsh_count ==""){
          this.dialysisPrescription.warsh_count =150
        }
       
      
      }else{
        console.log("this.dialysisPrescription.anticoagulant_shouji",this.prescription_prop)
        if(this.dialysisPrescription.anticoagulant_shouji == 0){
          if(this.prescription_prop!=null&&this.prescription_prop.id == 0){
            this.dialysisPrescription.anticoagulant_shouji = this.solution_prop.anticoagulant_shouji
          }

        }
        if(this.dialysisPrescription.anticoagulant_weichi == 0){
          if(this.prescription_prop!=null&&this.prescription_prop.id == 0){
            this.dialysisPrescription.anticoagulant_weichi = this.solution_prop.anticoagulant_weichi
          }
        }

        if(this.dialysisPrescription.anticoagulant_zongliang  ==0){
          if(this.prescription_prop!=null&&this.prescription_prop.id == 0){
            this.dialysisPrescription.anticoagulant_zongliang = this.solution_prop.anticoagulant_zongliang
          }

        }

      }

      let anticoagulan_name = "";
      let anticoagulant = this.anticoagulantsConfitTwo;
      for (let keys in anticoagulant) {
        if (anticoagulant[keys].id == val) {
          anticoagulan_name = anticoagulant[keys].name;
        }
      }

      return anticoagulan_name;
    },
    getBodyFluid: function (val) {
      let body_fluid_name = "";
      let body_fluid = this.bodyFluidOptions;
      for (let i = 0; i < body_fluid.length; i++) {
        if (body_fluid[i].id == val) {
          body_fluid_name = body_fluid[i].name;
        }
      }
      return body_fluid_name;
    },
    getSpecialMedicine: function (val) {
      let special_medicine_name = "";
      let special_medicine = this.specialMedicineOptions;
      for (let i = 0; i < special_medicine.length; i++) {
        if (special_medicine[i].id == val) {
          special_medicine_name = special_medicine[i].name;
        }
      }
      return special_medicine_name;
    },
    getDisplaceLiquiPart: function (val) {
      let displace_liqui_part_name = "";
      let displace_liqui_part = this.displaceLiquiPartOptions;
      for (let i = 0; i < displace_liqui_part.length; i++) {
        if (displace_liqui_part[i].id == val) {
          displace_liqui_part_name = displace_liqui_part[i].name;
        }
      }
      return displace_liqui_part_name;
    },
    getBloodAccessTwo: function (val) {
      let blood_access_name = "";
      for (let i = 0; i < this.bloodAccessOptions.length; i++) {
        if (val == this.bloodAccessOptions[i].id) {
          blood_access_name = this.bloodAccessOptions[i].name;
        }
      }
      return blood_access_name;
    },
    showSubMenu: function (val) {
      this.checkBoxShow = true;
      switch (val) {
        case "mode":
          this.propForm.type = 1;
          this.isShowDialog = false;
          this.propForm.title = "透析模式";
          this.visibility = true;
          this.propForm.list = [];
          this.propForm.optionList = this.modeOption;
          this.propForm.isMultiple = 1;
          this.propForm.selectId = this.dialysisPrescription.mode_id;
          this.propForm.click_ref = "mode";

          break;
        // case 'dialyzer':
        //   this.propForm.type = 2
        //   this.isShowDialog = false
        //   this.propForm.title = '透析器'
        //   this.visibility = true
        //   this.propForm.list = []
        //   this.propForm.optionList = this.machines_prop
        //   this.propForm.isMultiple = 1
        //   this.propForm.selectId = this.dialysisPrescription.dialyzer
        //   this.propForm.click_ref = 'dialyzer'

        //   break

        // case 'perfusion_apparatus':
        //   this.propForm.type = 3
        //   this.isShowDialog = false
        //   this.propForm.title = '灌流器'
        //   this.visibility = true
        //   this.propForm.list = []
        //   this.propForm.optionList = this.perfusion_apparatus
        //   this.propForm.isMultiple = 1
        //   this.propForm.selectId = this.dialysisPrescription.perfusion_apparatus
        //   this.propForm.click_ref = 'perfusion_apparatus'

        //   break
        case "replacement_way":
          this.propForm.type = 4;
          this.isShowDialog = false;
          this.propForm.title = "置换方式";
          this.visibility = true;
          this.propForm.list = [];
          this.propForm.optionList = this.replacementWays;
          this.propForm.isMultiple = 1;
          this.propForm.selectId = this.dialysisPrescription.replacement_way;
          this.propForm.click_ref = "replacement_way";

          break;

        case "anticoagulant":
          this.propForm.type = 5;
          this.isShowDialog = false;
          this.propForm.title = "抗疑剂";
          this.visibility = true;
          this.propForm.list = [];
          this.propForm.optionList = this.anticoagulantsConfit;
          this.propForm.isMultiple = 1;
          this.propForm.selectId = this.dialysisPrescription.anticoagulant;

          this.propForm.click_ref = "anticoagulant";
          break;
        case "dialysate_formulation":
          this.propForm.type = 6;
          this.isShowDialog = false;
          this.propForm.title = "透析液配方";
          this.visibility = true;
          this.propForm.list = [];
          this.propForm.optionList = this.dialysateFormulationOptions;
          this.propForm.isMultiple = 1;
          this.propForm.selectId =
            this.dialysisPrescription.dialysate_formulation;
          this.propForm.click_ref = "dialysate_formulation";
          break;
        case "body_fluid":
          this.propForm.type = 7;
          this.isShowDialog = false;
          this.propForm.title = "体液过多症状";
          this.visibility = true;
          this.propForm.list = [];
          this.propForm.optionList = this.bodyFluidOptions;
          this.propForm.isMultiple = 1;
          this.propForm.selectId = this.dialysisPrescription.body_fluid;
          this.propForm.click_ref = "body_fluid";
          break;
        case "special_medicine":
          this.propForm.type = 8;
          this.isShowDialog = false;
          this.propForm.title = "透析前使用特殊药物";
          this.visibility = true;
          this.propForm.list = [];
          this.propForm.optionList = this.specialMedicineOptions;
          this.propForm.isMultiple = 1;
          this.propForm.selectId = this.dialysisPrescription.special_medicine;
          this.propForm.click_ref = "special_medicine";
          break;
        case "displace_liqui_part":
          this.propForm.type = 9;
          this.isShowDialog = false;
          this.propForm.title = "置换液";
          this.visibility = true;
          this.propForm.list = [];
          this.propForm.optionList = this.displaceLiquiPartOptions;
          this.propForm.isMultiple = 1;
          this.propForm.selectId =
            this.dialysisPrescription.displace_liqui_part;
          this.propForm.click_ref = "displace_liqui_part";
          break;
        case "blood_access":
          this.propForm.type = 10;
          this.isShowDialog = false;
          this.propForm.title = "血管通路";
          this.visibility = true;
          this.propForm.list = [];
          this.propForm.optionList = this.bloodAccessOptions;
          this.propForm.isMultiple = 1;
          this.propForm.selectId = this.dialysisPrescription.blood_access;
          this.propForm.click_ref = "blood_access";
          break;
        case "vascular_access_desc":
          this.propForm.type = 10;
          this.isShowDialog = false;
          this.propForm.title = "血管通路";
          this.visibility = true;
          this.propForm.list = [];
          this.propForm.optionList = this.data;
          this.propForm.isMultiple = 1;
          this.propForm.selectId = this.dialysisPrescription.blood_access;
          this.propForm.click_ref = "vascular_access_desc";
          break;

       case 'blood_access_part_id':

        this.propForm.result = []
        this.isHasOther = 2
        this.propForm.isShowOther = 1

        this.propForm.type = 20
        this.isShowDialog = false
        this.propForm.title = '血管通路部位'
        this.visibility = true
        this.propForm.list = []
        this.propForm.list = getDataConfig(
          'hemodialysis',
          'vascular_access'
        )
        this.propForm.optionList = []
        this.propForm.isMultiple = 2
        if (
          this.dialysisPrescription.blood_access_part_id != undefined ||
                  this.dialysisPrescription.blood_access_part_id != null
        ) {
          if (this.dialysisPrescription.blood_access_part_id.length > 0) {
            this.propForm.result = this.dialysisPrescription.blood_access_part_id.split(',')
          } else {
            this.propForm.result = []
          }
        } else {
          this.propForm.result = []
        }
        this.propForm.click_ref = 'blood_access_part_id'
        break

        case "dialyzer_perfusion_apparatus":
          this.propForm.type = 11;
          this.isShowDialog = false;
          this.propForm.title = "透析器/灌流器";
          this.visibility = true;
          this.propForm.result = [];
          this.propForm.isHasOther = 2;
          this.propForm.isShowOther = 1;
          this.propForm.list = this.dialyzerPerfusionApparatus;
          this.propForm.optionList = [];
          this.propForm.isMultiple = 2;
          var apparatus =
            this.dialysisPrescription.dialyzer_perfusion_apparatus.split(",");

          var newArr = [];
          for (let i = 0; i < this.dialyzerPerfusionApparatus.length; i++) {
            for (let j = 0; j < apparatus.length; j++) {
              var name = this.dialyzerPerfusionApparatus[i].name.toUpperCase();
              var app = apparatus[j].toUpperCase();
              if (name == app) {
                newArr.push(this.dialyzerPerfusionApparatus[i].name);
              }
            }
          }
          console.log("newArr", newArr);
          if (
            this.dialysisPrescription.dialyzer_perfusion_apparatus !=
              undefined ||
            this.dialysisPrescription.dialyzer_perfusion_apparatus != null
          ) {
            if (
              this.dialysisPrescription.dialyzer_perfusion_apparatus.length > 0
            ) {
              this.propForm.result = newArr;
            } else {
              this.propForm.result = [];
            }
          } else {
            this.propForm.result = [];
          }
          this.propForm.click_ref = "dialyzer_perfusion_apparatus";

          break;

        case "blood":
          this.propForm.type = 12;
          this.isShowDialog = false;
          this.propForm.title = "抽血";
          this.visibility = true;
          this.propForm.result = [];
          this.propForm.isHasOther = 2;
          this.propForm.isShowOther = 1;
          this.propForm.list = this.bloods;
          this.propForm.optionList = [];
          this.propForm.isMultiple = 2;
          // eslint-disable-next-line no-redeclare
          var apparatus = this.dialysisPrescription.blood.split(",");
          // eslint-disable-next-line no-redeclare
          var newArr = [];
          for (let i = 0; i < this.bloods.length; i++) {
            for (let j = 0; j < apparatus.length; j++) {
              var name = this.bloods[i].name.toUpperCase();
              var app = apparatus[j].toUpperCase();
              if (name == app) {
                newArr.push(this.bloods[i].name);
              }
            }
          }
          console.log("newArr", newArr);
          if (
            this.dialysisPrescription.blood != undefined ||
            this.dialysisPrescription.blood != null
          ) {
            if (this.dialysisPrescription.blood.length > 0) {
              this.propForm.result = newArr;
            } else {
              this.propForm.result = [];
            }
          } else {
            this.propForm.result = [];
          }
          this.propForm.click_ref = "blood";

          break;

        case "dialysis_dialyszers":
          for (let i = 0; i < this.dialyszers.length; i++) {
            this.dialyszers[i].name = this.dialyszers[i].specification_name;
          }
          this.propForm.type = 14;
          this.isShowDialog = false;
          this.propForm.title = "透析器";
          this.visibility = true;
          this.propForm.result = [];
          this.propForm.isHasOther = 2;
          this.propForm.isShowOther = 1;
          this.propForm.list = this.dialyszers;
          this.propForm.optionList = [];
          this.propForm.isMultiple = 2;
          var apparatus =
            this.dialysisPrescription.dialysis_dialyszers.split(",");

          var newArr = [];
          for (let i = 0; i < this.dialyszers.length; i++) {
            for (let j = 0; j < apparatus.length; j++) {
              var name = this.dialyszers[i].name.toUpperCase();
              var app = apparatus[j].toUpperCase();
              if (name == app) {
                newArr.push(this.dialyszers[i].name);
              }
            }
          }

          if (
            this.dialysisPrescription.dialysis_dialyszers != undefined ||
            this.dialysisPrescription.dialysis_dialyszers != null
          ) {
            if (this.dialysisPrescription.dialysis_dialyszers.length > 0) {
              this.propForm.result = newArr;
            } else {
              this.propForm.result = [];
            }
          } else {
            this.propForm.result = [];
          }
          this.propForm.click_ref = "dialysis_dialyszers";
          break;

          case 'dialysis_dialyszers':

          for (let i = 0; i < this.dialyszers.length; i++) {
            this.dialyszers[i].name = this.dialyszers[i].specification_name
          }
          this.propForm.type = 14
          this.isShowDialog = false
          this.propForm.title = '透析器'
          this.visibility = true
          this.propForm.result = []
          this.propForm.isHasOther = 2
          this.propForm.isShowOther = 1
          this.propForm.list = this.dialyszers
          this.propForm.optionList = []
          this.propForm.isMultiple = 2
          var apparatus = this.dialysisPrescription.dialysis_dialyszers.split(',')

          var newArr = []
          for (let i = 0; i < this.dialyszers.length; i++) {
            for (let j = 0; j < apparatus.length; j++) {
              var name = this.dialyszers[i].name.toUpperCase()
              var app = apparatus[j].toUpperCase()
              if (name == app) {
                newArr.push(this.dialyszers[i].name)
              }
            }
          }

          if (this.dialysisPrescription.dialysis_dialyszers != undefined || this.dialysisPrescription.dialysis_dialyszers != null) {
            if (this.dialysisPrescription.dialysis_dialyszers.length > 0) {
              this.propForm.result = newArr
            } else {
              this.propForm.result = []
            }
          } else {
            this.propForm.result = []
          }
          this.propForm.click_ref = 'dialysis_dialyszers'
          break

        case "dialysis_irrigation":
          for (let i = 0; i < this.irrigation.length; i++) {
            this.irrigation[i].name = this.irrigation[i].specification_name;
          }

          this.propForm.type = 15;
          this.isShowDialog = false;
          this.propForm.title = "灌流器";
          this.visibility = true;
          this.propForm.result = [];
          this.propForm.isHasOther = 2;
          this.propForm.isShowOther = 1;
          this.propForm.list = this.irrigation;
          this.propForm.optionList = [];
          this.propForm.isMultiple = 2;

          var apps = this.dialysisPrescription.dialysis_irrigation.split(",");

          var newArr = [];
          for (let i = 0; i < this.irrigation.length; i++) {
            for (let j = 0; j < apps.length; j++) {
              var name = this.irrigation[i].name.toUpperCase();
              var app = apps[j].toUpperCase();
              if (name == app) {
                newArr.push(this.irrigation[i].name);
              }
            }
          }

          if (
            this.dialysisPrescription.dialysis_irrigation != undefined ||
            this.dialysisPrescription.dialysis_irrigation != null
          ) {
            if (this.dialysisPrescription.dialysis_irrigation.length > 0) {
            } else {
              this.propForm.result = [];
            }
          } else {
            this.propForm.result = [];
          }
          this.propForm.result = newArr;
          this.propForm.click_ref = "dialysis_irrigation";
          break;

        case "plasma_separator":
          this.propForm.type = 16;
          this.isShowDialog = false;
          this.propForm.title = "血浆分离器";
          this.visibility = true;
          this.propForm.result = [];
          this.propForm.isHasOther = 2;
          this.propForm.isShowOther = 1;
          this.propForm.list = this.plasmaSeparatorList;
          this.propForm.optionList = [];
          this.propForm.isMultiple = 2;
          var apparatus = this.dialysisPrescription.plasma_separator.split(",");

          var newArr = [];
          for (let i = 0; i < this.plasmaSeparatorList.length; i++) {
            for (let j = 0; j < apparatus.length; j++) {
              var name = this.plasmaSeparatorList[i].name.toUpperCase();
              var app = apparatus[j].toUpperCase();
              if (name == app) {
                newArr.push(this.plasmaSeparatorList[i].name);
              }
            }
          }
          console.log("newArr", newArr);
          if (
            this.dialysisPrescription.plasma_separator != undefined ||
            this.dialysisPrescription.plasma_separator != null
          ) {
            if (this.dialysisPrescription.plasma_separator.length > 0) {
              this.propForm.result = newArr;
            } else {
              this.propForm.result = [];
            }
          } else {
            this.propForm.result = [];
          }
          this.propForm.click_ref = "plasma_separator";

          break;
        case "bilirubin_adsorption_column":
          this.propForm.type = 17;
          this.isShowDialog = false;
          this.propForm.title = "胆红素吸附柱";
          this.visibility = true;
          this.propForm.result = [];
          this.propForm.isHasOther = 2;
          this.propForm.isShowOther = 1;
          this.propForm.list = this.bilirubinAdsorptionColumn;
          this.propForm.optionList = [];
          this.propForm.isMultiple = 2;
          var apparatus =
            this.dialysisPrescription.bilirubin_adsorption_column.split(",");

          var newArr = [];
          for (let i = 0; i < this.bilirubinAdsorptionColumn.length; i++) {
            for (let j = 0; j < apparatus.length; j++) {
              var name = this.bilirubinAdsorptionColumn[i].name.toUpperCase();
              var app = apparatus[j].toUpperCase();
              if (name == app) {
                newArr.push(this.bilirubinAdsorptionColumn[i].name);
              }
            }
          }
          console.log("newArr", newArr);
          if (
            this.dialysisPrescription.bilirubin_adsorption_column !=
              undefined ||
            this.dialysisPrescription.bilirubin_adsorption_column != null
          ) {
            if (
              this.dialysisPrescription.bilirubin_adsorption_column.length > 0
            ) {
              this.propForm.result = newArr;
            } else {
              this.propForm.result = [];
            }
          } else {
            this.propForm.result = [];
          }
          this.propForm.click_ref = "bilirubin_adsorption_column";

          break;
        case "puncture_needle":
          this.propForm.type = 18;
          this.isShowDialog = false;
          this.propForm.title = "穿刺针";
          this.visibility = true;
          this.propForm.result = [];
          this.propForm.isHasOther = 2;
          this.propForm.isShowOther = 1;
          this.propForm.list = this.punctureNeedleOptions;
          this.propForm.optionList = [];
          this.propForm.isMultiple = 2;
          var apparatus = this.dialysisPrescription.puncture_needle.split(",");
          var newArr = [];
          for (let i = 0; i < this.punctureNeedleOptions.length; i++) {
            for (let j = 0; j < apparatus.length; j++) {
              var name = this.punctureNeedleOptions[i].name.toUpperCase();
              var app = apparatus[j].toUpperCase();
              if (name == app) {
                newArr.push(this.punctureNeedleOptions[i].name);
              }
            }
          }
          if (
            this.dialysisPrescription.puncture_needle != undefined ||
            this.dialysisPrescription.puncture_needle != null
          ) {
            if (this.dialysisPrescription.puncture_needle.length > 0) {
              this.propForm.result = newArr;
            } else {
              this.propForm.result = [];
            }
          } else {
            this.propForm.result = [];
          }
          this.propForm.click_ref = "puncture_needle";

          break;
      }
    },
    getString: function (val) {
      switch (val.type) {
        case 2:
          this.dialysisPrescription.dialyzer = val.selectId;
          break;

        case 3:
          this.dialysisPrescription.perfusion_apparatus = val.selectId;
          break;
        case 4:
          this.dialysisPrescription.replacement_way = val.selectId;
          break;
        case 5:
          this.dialysisPrescription.anticoagulant = val.selectId;

          if (
            typeof this.anticoagulantsConfit[val.selectId] === "undefined" ||
            this.anticoagulantsConfit[val.selectId] == null
          ) {
            return;
          }
          this.anticoagulant = this.anticoagulantsConfit[val.selectId];
          break;
        case 6:
          this.dialysisPrescription.dialysate_formulation = val.selectId;
          break;
        case 7:
          this.dialysisPrescription.body_fluid = val.selectId;
          break;
        case 8:
          this.dialysisPrescription.special_medicine = val.selectId;
          break;
        case 9:
          this.dialysisPrescription.displace_liqui_part = val.selectId;
          break;
        case 10:
          this.dialysisPrescription.blood_access = val.selectId;
          break;
        case 11:
          this.dialysisPrescription.dialyzer_perfusion_apparatus =
            val.result.join(",");
          break;
        case 12:
          this.dialysisPrescription.blood = val.result.join(",");
          break;
        case 14:
          this.dialysisPrescription.dialysis_dialyszers = val.result.join(",");

          break;
        case 15:
          this.dialysisPrescription.dialysis_irrigation = val.result.join(",");
          break;
        case 16:
          this.dialysisPrescription.plasma_separator = val.result.join(",");
          break;
        case 17:
          this.dialysisPrescription.bilirubin_adsorption_column =
            val.result.join(",");
          break;
        case 18:
          this.dialysisPrescription.puncture_needle = val.result.join(",");
          break;
        case 19:
        this.dialysisPrescription.dialysis_strainer = val.result.join(',')
        break
        case 20:
        this.dialysisPrescription.blood_access_part_id = val.result.join(',')
        break
      }
    },
    getPermission() {
      request
        .get("/m/api/permission/get", {
          params: {
            create_url: "/m/api/dialysis/dialysisPrescription?mode=1",
            modify_url: "/m/api/dialysis/dialysisPrescription?mode=2",
            modify_other_url: "/m/api/dialysis/dialysisPrescription?mode=3",
            module: 1,
          },
        })
        .then((res) => {
          if (res.data.state == 0) {
            this.hasPermission = false;
          } else if (res.data.state == 1) {
            if (
              this.prescription_prop.id != "" &&
              this.prescription_prop.creater != 0
            ) {
              // 有数据
              if (
                this.prescription_prop.creater ==
                this.$store.getters.user.admin.id
              ) {
                // 创建人是自己
                if (res.data.data.is_has_modify == false) {
                  this.hasPermission = false;
                  this.showTxt = "你没有修改透析处方权限";
                }
              } else {
                // 创建人不是自己
                if (res.data.data.is_has_modify_other == false) {
                  this.hasPermission = false;
                  this.showTxt = "你没有修改他人透析处方权限";
                }
              }
            } else if (
              this.prescription_prop.id == "" ||
              this.prescription_prop.creater == 0
            ) {
              if (res.data.data.is_has_create == false) {
                this.hasPermission = false;
                this.showTxt = "你没有新增透析处方权限";
              }
            }
          }
        });
    },
    isObjectValueEqual(a, b) {
      // 取对象a和b的属性名
      var aProps = Object.getOwnPropertyNames(a);
      var bProps = Object.getOwnPropertyNames(b);
      // 判断属性名的length是否一致
      if (aProps.length != bProps.length) {
        return false;
      }
      // 循环取出属性名，再判断属性值是否一致
      for (var i = 0; i < aProps.length; i++) {
        var propName = aProps[i];
        if (a[propName] != b[propName]) {
          return false;
        }
      }
      return true;
    },
    changeInput() {
      this.dialysisPrescription.anticoagulant_zongliang =
        calculateAnticoagulantZL(
          1,
          this.dialysisPrescription.anticoagulant_shouji,
          this.dialysisPrescription.dialysis_duration,
          this.dialysisPrescription.anticoagulant_weichi
        );
      if (isNaN(this.dialysisPrescription.anticoagulant_zongliang)) {
        this.dialysisPrescription.anticoagulant_zongliang = "";
      }

      if (
        this.template_id == 41 &&
        this.dialysisPrescription.anticoagulant == 2 &&
        this.template_id == 6
      ) {
        this.dialysisPrescription.anticoagulant_zongliang = 0;
        this.dialysisPrescription.anticoagulant_zongliang =
          parseInt(this.dialysisPrescription.anticoagulant_shouji) +
          parseInt(this.dialysisPrescription.anticoagulant_weichi);
      }
    },
    changeOxygen(val) {
      if (val == 1) {
        this.oxygenShow = true;
      }
      if (val == 2) {
        this.oxygenShow = false;
        this.dialysisPrescription.oxygen_flow = "";
        this.dialysisPrescription.oxygen_time = "";
      }
    },
    getWater(name) {
      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:1,
         remark:remark,
       }

      saveMobileInformation(params).then(response=>{
        if(response.data.state == 1){
           this.infor_visibility = false
           Toast.success('申请成功')
        }
      })
    },
    menuCancleFour:function(){
     this.infor_visibility = false
     this.isShowDialog = true
    },
    toTeach (val) {
    if (val >= 0) {
      this.teachList.map(item => {
        if (item.id == val) {
          var theValue = item.value
          this.dialysisAfterTeachSelectChange(theValue)
        }
      })
    }
    this.teachShow = false
  },
  dialysisAfterTeachSelectChange: function (values) {
    if (this.dialysisPrescription.dialysis_remark == null) {
      this.dialysisPrescription.dialysis_remark == ''
    }
    if (this.dialysisPrescription.dialysis_remark == '' || this.dialysisPrescription.dialysis_remark == undefined) {
      this.dialysisPrescription.dialysis_remark = values
    } else {
      if (this.dialysisPrescription.dialysis_remark.indexOf(values) == -1) {
        if (this.dialysisPrescription.dialysis_remark.charAt(this.dialysisPrescription.dialysis_remark.length - 1).indexOf('。') == -1) {
          this.dialysisPrescription.dialysis_remark = this.dialysisPrescription.dialysis_remark + ',' + values
        } else {
          this.dialysisPrescription.dialysis_remark = this.dialysisPrescription.dialysis_remark + values
        }
      }
    }
  }
  },
  watch: {
    "dialysisPrescription.blood_flow_volume": function () {
      console.log("处方233322323");
      if(this.$store.getters.user.template_info.org_id!=10683){
        this.dialysisPrescription.replacement_flow = replacementFlow(
        this.dialysisPrescription.blood_flow_volume
      );
      }
    
    },

    'dialysisPrescription.target_ultrafiltration':function(){

      if(this.$store.getters.user.template_info.org_id == 10597){
        console.log("今夕")
        if(this.predialysis!=undefined){

         this.dialysisPrescription.target_ultrafiltration = (this.predialysis.weight_before - this.predialysis.dry_weight - this.predialysis.additional_weight).toFixed(1)

        }
      }
    },

    "dialysisPrescription.dialysis_duration": function () {
      // console.log('走在节省空间打开', this.dialysisPrescription.dialysis_duration)
      // console.log(222222222, this.dialysisPrescription.anticoagulant_zongliang)
      let anticoagulant_zongliang =
        this.dialysisPrescription.anticoagulant_zongliang;
      this.dialysisPrescription.anticoagulant_zongliang =
        calculateAnticoagulantZL(
          1,
          this.dialysisPrescription.anticoagulant_shouji,
          this.dialysisPrescription.dialysis_duration,
          this.dialysisPrescription.anticoagulant_weichi
        );
      if (isNaN(this.dialysisPrescription.anticoagulant_zongliang)) {
        this.dialysisPrescription.anticoagulant_zongliang = "";
      }
      this.dialysisPrescription.anticoagulant_zongliang =
        anticoagulant_zongliang;
    },
    // 'dialysisPrescription.anticoagulant_shouji': function () {
    //     let anticoagulant_zongliang = this.dialysisPrescription.anticoagulant_zongliang
    //     this.dialysisPrescription.anticoagulant_zongliang = calculateAnticoagulantZL(
    //         1,
    //         this.dialysisPrescription.anticoagulant_shouji,
    //         this.dialysisPrescription.dialysis_duration,
    //         this.dialysisPrescription.anticoagulant_weichi
    //     )
    //     if (isNaN(this.dialysisPrescription.anticoagulant_zongliang)) {
    //         this.dialysisPrescription.anticoagulant_zongliang = ''
    //     }
    //     // this.dialysisPrescription.anticoagulant_zongliang = anticoagulant_zongliang
    // },
    // 'dialysisPrescription.anticoagulant_weichi': function () {
    //     let anticoagulant_zongliang = this.dialysisPrescription.anticoagulant_zongliang
    //     this.dialysisPrescription.anticoagulant_zongliang = calculateAnticoagulantZL(
    //         1,
    //         this.dialysisPrescription.anticoagulant_shouji,
    //         this.dialysisPrescription.dialysis_duration,
    //         this.dialysisPrescription.anticoagulant_weichi
    //     )
    //     if (isNaN(this.dialysisPrescription.anticoagulant_zongliang)) {
    //         this.dialysisPrescription.anticoagulant_zongliang = ''
    //     }
    //     // this.dialysisPrescription.anticoagulant_zongliang = anticoagulant_zongliang
    // },
    newDialysisPrescription: {
      handler(newVal, oldVal) {
        if (!this.isObjectValueEqual(newVal, oldVal)) {
          this.changePrescription++;
        }
      },
      deep: true,
    },

  },
};
</script>

<style lang="scss" scoped>
.dialysisPrescription {
  display: flex;
  flex-direction: column;
  height: 100%;
  > :first-child {
    flex: 1;
    overflow-y: auto;
  }
}
.preserveBox {
  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: 60%;
    line-height: 2.5rem;
    border-radius: 4px;
    border: 1px solid #e5e5e5;
  }
  > :last-child {
    background: #409eff;
    color: #fff;
    width: 38%;
    height: 2.5rem;
    line-height: 2.5rem;
    text-align: center;
    border-radius: 4px;
  }
}
.van-radio-group {
  display: flex;
  flex-wrap: wrap;
  .van-radio {
    width: 50%;
    margin-bottom: 0.625rem;
  }
}
.warnTxt {
  font-size: 1rem;
  height: 1.875rem;
  line-height: 1.875rem;
  text-align: center;
  background: #faa331;
  color: #fff;
}
.warn_tip{
  color: red;
}

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

  .datetimePicker {
    .picker-item {
      font-size: 0.875rem !important;
      height: 44px;
      line-height: 44px;
    }
    .mint-datetime-action {
      font-size: 0.9375rem !important;
    }
  }
}
#today_panel {
  .advicePopup {
    width: 90% !important;
    font-size: 0.875rem !important;
    z-index: 6000 !important;
    top: 10% !important;
    .Dialog {
      width: 100% !important;
    }
    .DialogTit {
      padding: 0.625rem !important;
    }
    .CheckBox {
      max-height: 28.8rem !important;
      min-height: 10rem !important;
    }
  }
}

.treatment{
  .van-field__label{
      // width: 9.375rem;
      width: initial;
  }
  .bgField{
      .van-field__control{
          border:1px solid #ccc;
          background: #f6f6f6;
          border-radius: 4px;
          min-height: 6.25rem !important;
      }
      ::placeholder{  //通过这个设置
          color: #999 !important;
      }
  }

}
.newListBoxPopupApp{
  width: 80%;
  height: 80%;
  left: 50% !important;
  top: 50% !important;
  transform: translate3d(-50%,-50%,0) !important;
  overflow-y: auto;
  border-radius: .625rem;
  z-index: 5002 !important;
}
.newListBoxPopupApp{
  .listBox{
      >div{
          padding: 1rem .625rem;
          border-bottom: 1px solid #e5e5e5;
          font-size: .875rem;
          color:#323233;
      }
  }
}

</style>
