1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063 |
- <template>
- <div class="app-container ">
- <div class="dataTitle">透析方案</div>
-
- <div
- class="app-container"
- style="margin-left: -20px;margin-top: -20px"
- v-loading="pageLoading"
- element-loading-text="拼命加载中"
- >
- <el-row :gutter="20">
- <el-col :span="7">
- <el-table
- :header-cell-style="{
- backgroundColor: 'rgb(245, 247, 250)',
- color: '#606266'
- }"
- height="450"
- :row-style="{ color: '#303133' }"
- :data="treatment_mode"
- border
- style="width: 100%"
- highlight-current-row
- :row-class-name="tableRows"
- @row-click="onRowClicks"
- ref="singleTable"
- >
- <el-table-column label="透析模式" align="center">
- <template slot-scope="scope">
- {{ scope.row.name }}
- </template>
- </el-table-column>
-
- <el-table-column label="状态" width="80" align="center">
- <template slot-scope="scope">
- {{ getModeStatus(scope.row.id) }}
- </template>
- </el-table-column>
- </el-table>
- </el-col>
- <el-col :span="17" v-loading="itemLoading">
- <div class="filter-container">
- <el-row :gutter="20">
- <el-col :span="16">
- <div>{{ mode_name }}</div>
- </el-col>
- <el-col :span="8">
- <el-button
- style="float: right;visibility: hidden"
- size="small"
- class="filter-item"
- type="primary"
- icon="el-icon-edit-outline"
- @click="openEdit()"
- >修改
- </el-button>
- </el-col>
- </el-row>
- </div>
- <div class="filter-container" style="float:right">
- <el-form
- ref="addPlan"
- :model="addPlan"
- label-width="160px"
- style="border: black"
- >
- <el-row :gutter="20">
- <el-col :span="8">
- <el-form-item label="透析时长(h):" prop="dialysis_duration">
- <el-time-picker
- v-model="dialysisTimeShow"
- :picker-options="{
- selectableRange: '00:01:00 - 23:59:00'
- }"
- placeholder="透析时长"
- style="width:100%;"
- value-format="H:m"
- format="H:m"
- @change="selectnDialysisTime"
- >
- </el-time-picker>
- </el-form-item>
- </el-col>
-
- <el-col :span="8">
- <el-form-item
- label="血流量(ml/min):"
- prop="blood_flow_volume"
- >
- <el-input v-model="addPlan.blood_flow_volume"></el-input>
- </el-form-item>
- </el-col>
- <!--<el-col :span="8" v-if="this.$store.getters.xt_user.template_info.template_id == 6">-->
- <!--<el-form-item label="目标超滤量(ml) : ">-->
- <!--<el-input v-model="addPlan.target_ultrafiltration" type="number" ></el-input>-->
- <!--</el-form-item>-->
- <!--</el-col>-->
-
- <!--<el-col :span="8" v-if="this.$store.getters.xt_user.template_info.template_id != 6">-->
- <!--<el-form-item label="目标超滤量(L) : ">-->
- <!--<el-input v-model="addPlan.target_ultrafiltration" type="number" ></el-input>-->
- <!--</el-form-item>-->
- <!--</el-col>-->
-
- <el-col :span="8">
- <el-form-item label="透析液配方:">
- <el-select v-model="addPlan.dialysate_formulation">
- <el-option
- v-for="(item, index) in dialysate_formulation"
- :label="item.name"
- :key="index"
- :value="item.id"
- ></el-option>
- </el-select>
- </el-form-item>
- </el-col>
-
- <el-col :span="8">
- <el-form-item label="抗凝剂:" prop="anticoagulant">
- <el-select
- v-model="addPlan.anticoagulant"
- @change="changeThisAnticoagulant"
- >
- <el-option
- v-for="(item, index) in anticoagulantsConfit"
- :label="item.name"
- :key="index"
- :value="item.id"
- ></el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="8" v-if="anticoagulant.shouji != -1">
- <el-form-item
- :label="'首剂(' + anticoagulant.shouji_unit + '): '"
- prop="anticoagulant_shouji"
- >
- <el-input
- v-model="addPlan.anticoagulant_shouji"
- :disabled="anticoagulant.shouji == 1 ? false : true"
- type="number"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8" v-if="anticoagulant.weichi != -1">
- <el-form-item
- :label="'维持(' + anticoagulant.weichi_unit + '): '"
- prop="anticoagulant_weichi"
- >
- <el-input
- v-model="addPlan.anticoagulant_weichi"
- :disabled="anticoagulant.weichi == 1 ? false : true"
- type="number"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8" v-if="anticoagulant.zongliang != -1">
- <el-form-item
- :label="'总量(' + anticoagulant.zongliang_unit + '): '"
- prop="anticoagulant_zongliang"
- >
- <el-input
- v-model="addPlan.anticoagulant_zongliang"
- :disabled="anticoagulant.zongliang == 1 ? false : true"
- type="number"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8" v-if="anticoagulant.gaimingcheng != -1">
- <el-form-item
- label="钙名称:"
- prop="anticoagulant_gaimingcheng"
- >
- <el-input
- v-model="addPlan.anticoagulant_gaimingcheng"
- :disabled="anticoagulant.gaimingcheng == 1 ? false : true"
- placeholder="钙名称"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8" v-if="anticoagulant.gaijiliang != -1">
- <el-form-item
- :label="
- '钙剂量(' + anticoagulant.gaimingcheng_unit + '): '
- "
- prop="anticoagulant_gaijiliang"
- >
- <el-input
- v-model="addPlan.anticoagulant_gaijiliang"
- :disabled="anticoagulant.gaijiliang == 1 ? false : true"
- placeholder="钙剂量"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col
- :span="8"
- v-if="
- current_select == 2 ||
- current_select == 5 ||
- current_select == 12
- "
- >
- <el-form-item label="置换量(L) : " prop="replacement_total">
- <el-input
- v-model="addPlan.replacement_total"
- type="number"
- ></el-input>
- </el-form-item>
- </el-col>
-
- <el-col :span="8">
- <el-form-item label="钾(mmol/L): " prop="kalium">
- <el-input v-model="addPlan.kalium"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="钠(mmol/L): " prop="sodium">
- <el-input v-model="addPlan.sodium"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="钙(mmol/L): " prop="calcium">
- <el-input v-model="addPlan.calcium"></el-input>
- </el-form-item>
- </el-col>
-
- <el-col :span="8">
- <el-form-item label="透析器/灌流器:">
- <el-input
- v-model="addPlan.dialyzer_perfusion_apparatus"
- ></el-input>
- </el-form-item>
- </el-col>
-
- <el-col :span="8">
- <el-form-item label="碳酸氢盐(mmol/L): " prop="bicarbonate">
- <el-input v-model="addPlan.bicarbonate"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="葡萄糖(mmol/L): " prop="glucose">
- <el-input v-model="addPlan.glucose"></el-input>
- </el-form-item>
- </el-col>
-
- <el-col :span="8">
- <el-form-item
- label="透析液流量(ml/min): "
- prop="dialysate_flow"
- >
- <el-input v-model="addPlan.dialysate_flow"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item
- label="透析液温度(℃): "
- prop="dialysate_temperature"
- >
- <el-input
- v-model="addPlan.dialysate_temperature"
- ></el-input>
- </el-form-item>
- </el-col>
-
- <el-col :span="8">
- <el-form-item label="电导度(mS/cm): " prop="conductivity">
- <el-input v-model="addPlan.conductivity"></el-input>
- </el-form-item>
- </el-col>
-
- <el-col :span="8">
- <el-form-item label="体液过多症状:">
- <el-select v-model="addPlan.body_fluid">
- <el-option
- v-for="(item, index) in body_fluid_option"
- :label="item.name"
- :key="index"
- :value="item.id"
- ></el-option>
- </el-select>
- </el-form-item>
- </el-col>
-
- <el-col :span="8">
- <el-form-item label="体液过多其他症状">
- <el-input v-model="addPlan.body_fluid_other"></el-input>
- </el-form-item>
- </el-col>
-
- <el-col :span="8">
- <el-form-item label="透析前使用特殊药物">
- <el-select
- v-model="addPlan.special_medicine"
- placeholder="请选择"
- style="width:100%;"
- >
- <el-option :key="0" label="请选择" :value="0"></el-option>
- <el-option
- v-for="(item, index) in special_medicine_option"
- :label="item.name"
- :key="index"
- :value="item.id"
- ></el-option>
- </el-select>
- </el-form-item>
- </el-col>
-
- <el-col :span="8">
- <el-form-item label="使用其他特殊药物">
- <el-input
- v-model="addPlan.special_medicine_other"
- ></el-input>
- </el-form-item>
- </el-col>
-
- <el-col :span="8">
- <el-form-item
- label="置换液:"
- v-if="
- (current_select == 2 ||
- current_select == 5 ||
- current_select == 12) &&
- this.$store.getters.xt_user.template_info.template_id !=
- 6
- "
- >
- <el-select
- v-model="addPlan.displace_liqui_part"
- placeholder="请选择"
- >
- <el-option :key="0" label="请选择" :value="0"></el-option>
- <el-option
- v-for="(option, index) in displace_liqui_part_option"
- :key="index"
- :label="option.name"
- :value="option.id"
- ></el-option>
- </el-select>
- </el-form-item>
-
- <el-form-item
- label="置换方式:"
- v-if="
- current_select == 2 &&
- this.$store.getters.xt_user.template_info.template_id ==
- 6
- "
- >
- <el-select
- v-model="addPlan.displace_liqui_part"
- placeholder="请选择"
- >
- <el-option :key="0" label="请选择" :value="0"></el-option>
- <el-option
- v-for="(option, index) in displace_liqui_part_option"
- :key="index"
- :label="option.name"
- :value="option.id"
- ></el-option>
- </el-select>
- </el-form-item>
- </el-col>
-
- <el-col
- :span="8"
- v-if="
- current_select == 2 ||
- current_select == 5 ||
- current_select == 12
- "
- >
- <el-form-item label="置换液总量(L)">
- <el-input v-model="addPlan.displace_liqui_value"></el-input>
- </el-form-item>
- </el-col>
-
- <el-col :span="8">
- <el-form-item label="血管通路:">
- <el-select
- v-model="addPlan.blood_access"
- placeholder="请选择"
- >
- <el-option :key="0" label="请选择" :value="0"></el-option>
-
- <el-option
- v-for="(option, index) in blood_access_option"
- :key="index"
- :label="option.name"
- :value="option.id"
- ></el-option>
- </el-select>
- </el-form-item>
- </el-col>
-
- <!-- </el-row>
- <el-row :gutter="20" > -->
- <el-col :span="8">
- <el-form-item label="实际超滤量(L)">
- <el-input v-model="addPlan.ultrafiltration"></el-input>
- </el-form-item>
- </el-col>
-
- <el-col :span="8">
- <el-form-item label="目标KT/V">
- <el-input v-model="addPlan.target_ktv"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- <el-button
- style="float: right"
- size="small"
- class="filter-item"
- type="primary"
- icon="el-icon-edit-outline"
- @click="savePrescription()"
- >保存
- </el-button>
- </div>
- </el-col>
- </el-row>
- </div>
- </div>
- </template>
-
- <script>
- import { calculateAnticoagulantZL, uParseTime } from "@/utils/tools";
- import {
- getAllSystemPrescription,
- getSystemPrescription,
- postSystemPrescription,
- updateSystemPrescription
- } from "@/api/config";
-
- export default {
- name: "prescription",
- components: {},
-
- data() {
- return {
- dialysisTimeShow: new Date(2018, 1, 1, 3, 0),
- modeOptions: null,
- current_select: 0,
- mode_name: "HD",
- pageLoading: false,
- itemLoading: false,
- treatment_mode: [
- // 治疗模式
- {
- id: 1,
- name: "HD",
- dialysis_duration: 1,
- replacement_way: 2,
- hemodialysis_machine: 1,
- blood_filter: 2,
- perfusion_apparatus: 2,
- blood_flow_volume: 1,
- dialysate_flow: 1,
- kalium: 1,
- sodium: 1,
- calcium: 1,
- bicarbonate: 1
- },
- {
- id: 2,
- name: "HDF",
- dialysis_duration: 1,
- replacement_way: 1,
- hemodialysis_machine: 2,
- blood_filter: 1,
- perfusion_apparatus: 2,
- blood_flow_volume: 1,
- dialysate_flow: 1,
- kalium: 1,
- sodium: 1,
- calcium: 1,
- bicarbonate: 1
- },
- {
- id: 3,
- name: "HD+HP",
- dialysis_duration: 1,
- replacement_way: 2,
- hemodialysis_machine: 1,
- blood_filter: 2,
- perfusion_apparatus: 1,
- blood_flow_volume: 1,
- dialysate_flow: 1,
- kalium: 1,
- sodium: 1,
- calcium: 1,
- bicarbonate: 1
- },
- {
- id: 4,
- name: "HP",
- dialysis_duration: 1,
- replacement_way: 2,
- hemodialysis_machine: 2,
- blood_filter: 2,
- perfusion_apparatus: 1,
- blood_flow_volume: 1,
- dialysate_flow: 2,
- kalium: 2,
- sodium: 2,
- calcium: 2,
- bicarbonate: 2
- },
- {
- id: 5,
- name: "HF",
- dialysis_duration: 1,
- replacement_way: 1,
- hemodialysis_machine: 2,
- blood_filter: 1,
- perfusion_apparatus: 2,
- blood_flow_volume: 1,
- dialysate_flow: 2,
- kalium: 1,
- sodium: 1,
- calcium: 1,
- bicarbonate: 1
- },
- {
- id: 6,
- name: "SCUF",
- dialysis_duration: 1,
- replacement_way: 2,
- hemodialysis_machine: 1,
- blood_filter: 2,
- perfusion_apparatus: 2,
- blood_flow_volume: 1,
- dialysate_flow: 2,
- kalium: 2,
- sodium: 2,
- calcium: 2,
- bicarbonate: 2
- },
- {
- id: 7,
- name: "IUF",
- dialysis_duration: 1,
- replacement_way: 2,
- hemodialysis_machine: 1,
- blood_filter: 2,
- perfusion_apparatus: 2,
- blood_flow_volume: 2,
- dialysate_flow: 2,
- kalium: 2,
- sodium: 2,
- calcium: 2,
- bicarbonate: 2
- },
- {
- id: 8,
- name: "HFHD",
- dialysis_duration: 1,
- replacement_way: 2,
- hemodialysis_machine: 1,
- blood_filter: 2,
- perfusion_apparatus: 2,
- blood_flow_volume: 1,
- dialysate_flow: 1,
- kalium: 1,
- sodium: 1,
- calcium: 1,
- bicarbonate: 1
- },
- {
- id: 9,
- name: "HFHD+HP",
- dialysis_duration: 1,
- replacement_way: 2,
- hemodialysis_machine: 1,
- blood_filter: 2,
- perfusion_apparatus: 1,
- blood_flow_volume: 1,
- dialysate_flow: 1,
- kalium: 1,
- sodium: 1,
- calcium: 1,
- bicarbonate: 1
- },
- {
- id: 10,
- name: "PHF",
- dialysis_duration: 1,
- replacement_way: 1,
- hemodialysis_machine: 2,
- blood_filter: 1,
- perfusion_apparatus: 2,
- blood_flow_volume: 1,
- dialysate_flow: 1,
- kalium: 1,
- sodium: 1,
- calcium: 1,
- bicarbonate: 1
- },
- {
- id: 11,
- name: "HFR",
- dialysis_duration: 1,
- replacement_way: 2,
- hemodialysis_machine: 2,
- blood_filter: 1,
- perfusion_apparatus: 1,
- blood_flow_volume: 1,
- dialysate_flow: 1,
- kalium: 1,
- sodium: 1,
- calcium: 1,
- bicarbonate: 1
- },
- {
- id: 12,
- name: "HDF+HP",
- dialysis_duration: 1,
- replacement_way: 1,
- hemodialysis_machine: 2,
- blood_filter: 1,
- perfusion_apparatus: 1,
- blood_flow_volume: 1,
- dialysate_flow: 1,
- kalium: 1,
- sodium: 1,
- calcium: 1,
- bicarbonate: 1
- },
- {
- id: 13,
- name: "CRRT",
- dialysis_duration: 1,
- replacement_way: 1,
- hemodialysis_machine: 2,
- blood_filter: 1,
- perfusion_apparatus: 2,
- blood_flow_volume: 1,
- dialysate_flow: 2,
- kalium: 1,
- sodium: 1,
- calcium: 1,
- bicarbonate: 1
- },
- {
- id: 14,
- name: "腹水回输",
- dialysis_duration: 1,
- replacement_way: 2,
- hemodialysis_machine: 1,
- blood_filter: 2,
- perfusion_apparatus: 2,
- blood_flow_volume: 2,
- dialysate_flow: 2,
- kalium: 2,
- sodium: 2,
- calcium: 2,
- bicarbonate: 2
- },
- // {
- // id: 15,
- // name: "HD前置换",
- // dialysis_duration: 1,
- // replacement_way: 2,
- // hemodialysis_machine: 1,
- // blood_filter: 2,
- // perfusion_apparatus: 2,
- // blood_flow_volume: 1,
- // dialysate_flow: 1,
- // kalium: 1,
- // sodium: 1,
- // calcium: 1,
- // bicarbonate: 1
- // },
- // {
- // id: 16,
- // name: "HD后置换",
- // dialysis_duration: 1,
- // replacement_way: 2,
- // hemodialysis_machine: 1,
- // blood_filter: 2,
- // perfusion_apparatus: 2,
- // blood_flow_volume: 1,
- // dialysate_flow: 1,
- // kalium: 1,
- // sodium: 1,
- // calcium: 1,
- // bicarbonate: 1
- // },
- // {
- // id: 17,
- // name: "HDF前置换",
- // dialysis_duration: 1,
- // replacement_way: 1,
- // hemodialysis_machine: 2,
- // blood_filter: 1,
- // perfusion_apparatus: 2,
- // blood_flow_volume: 1,
- // dialysate_flow: 1,
- // kalium: 1,
- // sodium: 1,
- // calcium: 1,
- // bicarbonate: 1
- // },
- // {
- // id: 18,
- // name: "HDF后置换",
- // dialysis_duration: 1,
- // replacement_way: 1,
- // hemodialysis_machine: 2,
- // blood_filter: 1,
- // perfusion_apparatus: 2,
- // blood_flow_volume: 1,
- // dialysate_flow: 1,
- // kalium: 1,
- // sodium: 1,
- // calcium: 1,
- // bicarbonate: 1
- // },
- {
- id: 19,
- name: "IUF+HD",
- dialysis_duration: 1,
- replacement_way: 2,
- hemodialysis_machine: 1,
- blood_filter: 2,
- perfusion_apparatus: 2,
- blood_flow_volume: 1,
- dialysate_flow: 1,
- kalium: 1,
- sodium: 1,
- calcium: 1,
- bicarbonate: 1
- }
- ],
- addPlan: {
- id: 0,
- mode: "",
- dialyzer: "",
- dialysis_duration: "",
- dialysis_duration_hour: "",
- dialysis_duration_minute: "",
- hemodialysis_machine: "",
- perfusion_apparatus: "",
- dialysate_formulation: "",
- blood_flow_volume: "",
- dewater: "",
- displace_liqui: 0,
- replacement_way: "",
- anticoagulant: "",
- anticoagulant_shouji: "",
- anticoagulant_weichi: "",
- anticoagulant_zongliang: "",
- anticoagulant_gaimingcheng: "",
- anticoagulant_gaijiliang: "",
- kalium: "",
- replacement_total: "",
- sodium: "",
- calcium: "",
- bicarbonate: "",
- glucose: "",
- dry_weight: "",
- dialysate_flow: "",
- dialysate_temperature: "",
- conductivity: "",
- doctor: "",
- remark: "",
- target_ktv: "",
- target_ultrafiltration: "",
- dialyzer_perfusion_apparatus: "",
- body_fluid: "",
- body_fluid_other: "",
- special_medicine: "",
- special_medicine_other: "",
- displace_liqui_part: "",
- displace_liqui_value: "",
- ultrafiltration: "",
- blood_access: ""
- },
- system_prescription: [],
- isEdit: false,
- 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: ""
- },
- anticoagulantsSet: {
- type: 1
- },
- replacementWays: null,
- anticoagulantsConfit: null,
- dialysate_formulation: [],
- body_fluid_option: [],
- special_medicine_option: [],
- displace_liqui_part_option: [],
- blood_access_option: []
- };
- },
- computed: {},
- methods: {
- openEdit() {},
- tableRows({ row, rowIndex }) {
- // 把每一行的索引放进row
- row.index = rowIndex;
- },
- onRowClicks(row, event, column) {
- console.log("row------", row.id);
- this.current_select = row.id;
- this.mode_name = row.name;
- this.isEdit = false;
- this.addPlan.mode = row.id;
- this.getSystemPrescription(row.id);
- },
- getSystemPrescription(id) {
- var tempAddPlan = {
- id: 0,
- mode: "",
- dialyzer: "",
- dialysis_duration: "",
- dialysis_duration_hour: "",
- dialysis_duration_minute: "",
- hemodialysis_machine: "",
- dialysate_formulation: "",
- perfusion_apparatus: "",
- blood_flow_volume: "",
- dewater: "",
- displace_liqui: 0,
- replacement_way: "",
- anticoagulant: "",
- anticoagulant_shouji: "",
- anticoagulant_weichi: "",
- anticoagulant_zongliang: "",
- anticoagulant_gaimingcheng: "",
- anticoagulant_gaijiliang: "",
- kalium: "",
- replacement_total: "",
- sodium: "",
- calcium: "",
- bicarbonate: "",
- glucose: "",
- dry_weight: "",
- dialysate_flow: "",
- dialysate_temperature: "",
- conductivity: "",
- doctor: "",
- remark: "",
- target_ktv: "",
- target_ultrafiltration: "",
- dialyzer_perfusion_apparatus: "",
- body_fluid: "",
- body_fluid_other: "",
- special_medicine: "",
- special_medicine_other: "",
- displace_liqui_part: "",
- displace_liqui_value: "",
- ultrafiltration: "",
- blood_access: ""
- };
-
- for (const key in tempAddPlan) {
- this.addPlan[key] = tempAddPlan[key];
- }
- this.isEdit = false;
- let params = {
- id: id
- };
-
- this.dialysisTimeShow = new Date(
- 2018,
- 1,
- 1,
- this.addPlan.dialysis_duration_hour,
- this.addPlan.dialysis_duration_minute
- );
-
- getSystemPrescription(params).then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg);
- return false;
- } else {
- if (response.data.data.prescription.id > 0) {
- for (const key in response.data.data.prescription) {
- this.addPlan[key] = response.data.data.prescription[key];
- }
-
- this.dialysisTimeShow = new Date(
- 2018,
- 1,
- 1,
- this.addPlan.dialysis_duration_hour,
- this.addPlan.dialysis_duration_minute
- );
- if (this.addPlan.id > 0) {
- this.isEdit = true;
- }
- }
- this.addPlan.mode = id;
- }
- });
- },
- getModeStatus: function(id) {
- for (let i = 0; i < this.system_prescription.length; i++) {
- if (this.system_prescription[i].mode_id == id) {
- return "已保存";
- }
- }
- return "未保存";
- },
- getAllSystemPrescription() {
- getAllSystemPrescription().then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg);
- return false;
- } else {
- this.system_prescription = response.data.data.prescriptions;
- for (let i = 0; i < this.system_prescription.length; i++) {
- if (this.system_prescription[i].mode == 1) {
- this.isEdit = true;
- }
- }
- }
- });
- },
- selectnDialysisTime(val) {
- console.log(val);
-
- console.log(this.addPlan.dialysis_duration);
- console.log(this.addPlan.dialysis_duration_hour);
- console.log(this.addPlan.dialysis_duration_minute);
-
- var valTime = val.split(":");
- this.addPlan.dialysis_duration =
- parseFloat(valTime[0]) + parseFloat((valTime[1] / 60).toFixed(2));
- this.addPlan.dialysis_duration_hour = valTime[0];
- this.addPlan.dialysis_duration_minute = valTime[1];
- },
- changeThisAnticoagulant() {
- var thismode = parseInt(this.addPlan.anticoagulant);
- console.log("------", thismode);
- if (isNaN(thismode) || thismode <= 0) {
- return false;
- }
- if (
- typeof this.anticoagulantsConfit[thismode] == "undefined" ||
- this.anticoagulantsConfit[thismode] == null
- ) {
- return false;
- }
- this.anticoagulant = this.anticoagulantsConfit[thismode];
- },
- savePrescription: function() {
- this.addPlan.anticoagulant_zongliang = this.addPlan.anticoagulant_zongliang.toString();
- if (!this.isEdit) {
- postSystemPrescription(this.addPlan).then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg);
- return false;
- } else {
- this.$notify({
- title: "成功",
- message: "创建成功",
- type: "success",
- duration: 2000
- });
- this.isEdit = true;
- this.system_prescription = [];
- this.system_prescription = response.data.data.prescriptions;
- this.addPlan.id = response.data.data.prescription.id;
- return false;
- }
- });
- } else {
- updateSystemPrescription(this.addPlan.id, this.addPlan).then(
- response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg);
- return false;
- } else {
- this.isEdit = true;
- this.addPlan.id = response.data.data.prescription.id;
- this.$notify({
- title: "成功",
- message: "编辑成功",
- type: "success",
- duration: 2000
- });
- return false;
- }
- }
- );
- }
- }
- },
- mounted() {
- this.$refs.singleTable.setCurrentRow(this.treatment_mode[0]);
- this.mode_name = this.treatment_mode[0].name;
- this.current_select = this.treatment_mode[0].id;
- },
- created() {
- this.anticoagulantsSet = this.$store.getters.anticoagulants_set;
- this.replacementWays = this.$store.getters.replacement_ways;
- this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit;
-
- this.blood_filters = this.$store.getters.blood_filters;
- this.dialysate_formulation = this.$store.getters.dialysate_formulation;
- this.body_fluid_option = this.$store.getters.body_fluid;
- this.special_medicine_option = this.$store.getters.special_medicine;
- this.displace_liqui_part_option = this.$store.getters.displace_liqui;
- this.blood_access_option = this.$store.getters.blood_access;
- this.addPlan.mode = 1;
- this.getAllSystemPrescription();
- this.getSystemPrescription(this.addPlan.mode);
- },
- watch: {
- "addPlan.dialysis_duration": function() {
- console.log(this.addPlan.anticoagulant_shouji);
- console.log(this.addPlan.dialysis_duration);
- console.log(this.addPlan.anticoagulant_weichi);
-
- this.addPlan.anticoagulant_zongliang = calculateAnticoagulantZL(
- 1,
- this.addPlan.anticoagulant_shouji,
- this.addPlan.dialysis_duration,
- this.addPlan.anticoagulant_weichi
- );
- },
- "addPlan.anticoagulant_shouji": function() {
- console.log(this.addPlan.anticoagulant_shouji);
- console.log(this.addPlan.dialysis_duration);
- console.log(this.addPlan.anticoagulant_weichi);
- this.addPlan.anticoagulant_zongliang = calculateAnticoagulantZL(
- 1,
- this.addPlan.anticoagulant_shouji,
- this.addPlan.dialysis_duration,
- this.addPlan.anticoagulant_weichi
- );
- },
- "addPlan.anticoagulant_weichi": function() {
- console.log(this.addPlan.anticoagulant_shouji);
- console.log(this.addPlan.dialysis_duration);
- console.log(this.addPlan.anticoagulant_weichi);
- this.addPlan.anticoagulant_zongliang = calculateAnticoagulantZL(
- 1,
- this.addPlan.anticoagulant_shouji,
- this.addPlan.dialysis_duration,
- this.addPlan.anticoagulant_weichi
- );
- }
- }
- };
- </script>
-
- <style rel="stylesheet/scss" lang="scss" scoped></style>
|