123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065 |
- <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);
- console.log("抗凝剂",this.addPlan.anticoagulan)
- },
- 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.anticoagulant_weichi);
- console.log("总量", this.addPlan.dialysis_duration);
- this.addPlan.anticoagulant_zongliang = calculateAnticoagulantZL(
- 1,
- this.addPlan.anticoagulant_shouji,
- this.addPlan.dialysis_duration,
- this.addPlan.anticoagulant_weichi
- );
- console.log("总量----", this.addPlan.anticoagulant_zongliang);
- },
- "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>
|