123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221 |
- <template>
- <div class="dialog_box">
- <el-dialog
- title="透析监测"
- :visible.sync="visible"
- width="1100px"
- @close="reset"
- :modal-append-to-body="false"
- >
- <div v-show="edit == false">
- <div class="txsj">
- <el-button round @click="newRecordAction">新增监测</el-button>
- <el-button round @click="modifyRecordAction">修改监测</el-button>
- <el-button round @click="deleteRecordAction">删除监测</el-button>
- </div>
- <el-table
- :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
- ref="table"
- :data="monitors"
- border
- highlight-current-row
- @current-change="tableCurrentRowChange"
- style="width: 100%"
- :class="current_row_class"
- >
- <el-table-column
- label="监测时间"
- align="center"
- width="144"
- v-if="isShow('监测时间')"
- >
- <template slot-scope="scope">
- {{ getMonitorDate(scope.row) }}
- </template>
- </el-table-column>
- <el-table-column
- prop="temperature"
- align="center"
- width="100"
- label="体温(℃)"
- v-if="isShow('体温')"
- >
- <template slot-scope="scope">
- {{ scope.row.temperature ? scope.row.temperature : "" }}
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- label="血压(mmHg)"
- width="110"
- v-if="isShow('血压')"
- >
- <template slot-scope="scope">
- {{
- scope.row.systolic_blood_pressure
- ? scope.row.systolic_blood_pressure
- : ""
- }}/{{
- scope.row.diastolic_blood_pressure
- ? scope.row.diastolic_blood_pressure
- : ""
- }}
- </template>
- </el-table-column>
-
- <el-table-column
- prop="pulse_frequency"
- align="center"
- width="100"
- label="脉搏(次/分)"
- v-if="isShow('脉搏')"
- >
- <template slot-scope="scope">
- {{ scope.row.pulse_frequency ? scope.row.pulse_frequency : "" }}
- </template>
- </el-table-column>
-
- <el-table-column
- prop="breathing_rate"
- align="center"
- label="呼吸频率(次/分)"
- width="100"
- v-if="isShow('呼吸频率')"
- >
- <template slot-scope="scope">
- {{ scope.row.breathing_rate ? scope.row.breathing_rate : "" }}
- </template>
- </el-table-column>
-
- <el-table-column
- prop="venous_pressure"
- align="center"
- label="静脉压/动脉压(mmHg)"
- width="120"
- >
- <template slot-scope="scope">
- <span
- >{{
- scope.row.venous_pressure ? scope.row.venous_pressure : ""
- }}/
- {{
- scope.row.arterial_pressure ? scope.row.arterial_pressure : ""
- }}</span
- >
- </template>
- </el-table-column>
-
- <el-table-column
- prop="blood_flow_volume"
- align="center"
- label="血流量(ml/min)"
- width="120"
- v-if="isShow('血流量')"
- >
- <template slot-scope="scope">
- {{
- scope.row.blood_flow_volume ? scope.row.blood_flow_volume : ""
- }}
- </template>
- </el-table-column>
-
- <el-table-column
- prop="transmembrane_pressure"
- align="center"
- label="跨膜压(mmHg)"
- width="120"
- v-if="isShow('跨膜压')"
- >
- <template slot-scope="scope">
- {{
- scope.row.transmembrane_pressure
- ? scope.row.transmembrane_pressure
- : ""
- }}
- </template>
- </el-table-column>
-
- <el-table-column
- prop="ultrafiltration_volume"
- align="center"
- label="超滤量(ml)"
- width="110"
- v-if="isShow('超滤量') && template_id == 6"
- >
- <template slot-scope="scope">
- {{
- scope.row.ultrafiltration_volume
- ? scope.row.ultrafiltration_volume
- : ""
- }}
- </template>
- </el-table-column>
- <el-table-column
- prop="ultrafiltration_volume"
- align="center"
- label="超滤量(L)"
- width="110"
- v-if="isShow('超滤量') && template_id != 6"
- >
- <template slot-scope="scope">
- {{
- scope.row.ultrafiltration_volume
- ? scope.row.ultrafiltration_volume
- : ""
- }}
- </template>
- </el-table-column>
- <el-table-column
- prop="sodium_concentration"
- align="center"
- label="钠浓度(mmol/L)"
- width="126"
- v-if="isShow('钠浓度')"
- >
- <template slot-scope="scope">
- {{
- scope.row.sodium_concentration
- ? scope.row.sodium_concentration
- : ""
- }}
- </template>
- </el-table-column>
- <el-table-column
- prop="dialysate_temperature"
- align="center"
- label="透析液温度(℃)"
- width="120"
- v-if="isShow('透析液温度')"
- >
- <template slot-scope="scope">
- {{
- scope.row.dialysate_temperature
- ? scope.row.dialysate_temperature
- : ""
- }}
- </template>
- </el-table-column>
- <el-table-column
- prop="replacement_rate"
- align="center"
- label="置换率(ml/min)"
- width="120"
- v-if="isShow('置换率') && template_id == 6"
- >
- <template slot-scope="scope">
- {{ scope.row.replacement_rate ? scope.row.replacement_rate : "" }}
- </template>
- </el-table-column>
- <el-table-column
- prop="replacement_rate"
- align="center"
- label="置换率(L/h)"
- width="120"
- v-if="isShow('置换率') && template_id != 6"
- >
- <template slot-scope="scope">
- {{ scope.row.replacement_rate ? scope.row.replacement_rate : "" }}
- </template>
- </el-table-column>
- <el-table-column
- prop="displacement_quantity"
- align="center"
- label="置换量(ml)"
- width="100"
- v-if="isShow('置换量' && template_id == 6)"
- >
- <template slot-scope="scope">
- {{
- scope.row.displacement_quantity
- ? scope.row.displacement_quantity
- : ""
- }}
- </template>
- </el-table-column>
-
- <el-table-column
- prop="displacement_quantity"
- align="center"
- label="SpO₂(%)"
- width="100"
- v-if="isShow('SpO₂') && template_id != 6"
- >
- <template slot-scope="scope">
- {{
- scope.row.blood_oxygen_saturation
- ? scope.row.blood_oxygen_saturation
- : ""
- }}
- </template>
- </el-table-column>
-
- <el-table-column
- prop="displacement_quantity"
- align="center"
- label="置换量(L)"
- width="100"
- v-if="isShow('置换量') && template_id != 6"
- >
- <template slot-scope="scope">
- {{
- scope.row.displacement_quantity
- ? scope.row.displacement_quantity
- : ""
- }}
- </template>
- </el-table-column>
- <el-table-column
- prop="displacement_flow_quantity"
- align="center"
- label="电导度(mS/m)"
- width="100"
- v-if="isShow('电导度')"
- >
- <template slot-scope="scope">
- {{ scope.row.conductivity ? scope.row.conductivity : "" }}
- </template>
- </el-table-column>
- <el-table-column
- prop="displacement_flow_quantity"
- align="center"
- label="置换液流量(ml/h)"
- width="100"
- v-if="isShow('置换液流量')"
- >
- <template slot-scope="scope">
- {{
- scope.row.displacement_flow_quantity
- ? scope.row.displacement_flow_quantity
- : ""
- }}
- </template>
- </el-table-column>
- <el-table-column
- prop="symptom"
- align="center"
- label="病情变化"
- width="130"
- v-if="isShow('病情变化')"
- >
- </el-table-column>
- <el-table-column
- prop="dispose"
- align="center"
- label="处理"
- width="130"
- v-if="isShow('处理')"
- >
- </el-table-column>
- <el-table-column
- prop="result"
- align="center"
- label="结果"
- width="130"
- v-if="isShow('结果')"
- >
- </el-table-column>
- </el-table>
- </div>
-
- <!--<div v-show="edit">-->
- <el-form v-show="edit" ref="form" :model="form" label-width="130px">
- <el-row :gutter="20">
- <el-col :span="8" v-if="isShow('监测时间')">
- <el-form-item label="监测时间:">
- <!-- {{ monitor_date_str }}
- <el-time-picker v-model="form.monitoring_time" :clearable="false" arrow-control :picker-options="{format: 'HH:mm'}" prefix-icon="" value-format="HH:mm" style="width: 60%;">
- </el-time-picker> -->
- <el-date-picker
- v-model="form.operate_time"
- type="datetime"
- prefix-icon=""
- style="width: 100%"
- format="yyyy-MM-dd HH:mm"
- value-format="timestamp"
- ></el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="8" v-if="isShow('体温')">
- <el-form-item label="体温(℃):">
- <el-input v-model="form.temperature"></el-input>
- </el-form-item>
- </el-col>
-
- <el-col :span="8" v-if="isShow('收缩压')">
- <el-form-item label="收缩压(mmHg):">
- <el-input v-model="form.systolic_bp"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8" v-if="isShow('舒张压')">
- <el-form-item label="舒张压(mmHg):">
- <el-input v-model="form.diastolic_bp"></el-input>
- </el-form-item>
- </el-col>
-
- <el-col :span="8" v-if="isShow('脉搏')">
- <el-form-item label="脉搏(次/分):">
- <el-input v-model="form.pulse_frequency"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8" v-if="isShow('呼吸频率')">
- <el-form-item label="呼吸频率(次/分):">
- <el-input v-model="form.breathing_rated"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8" v-if="isShow('静脉压')">
- <el-form-item label="静脉压(mmHg):">
- <el-input
- style="width: 140px"
- v-model="form.venous_pressure"
- ></el-input>
- <el-button
- size="mini"
- type="primary"
- @click="venousPressureChange(1)"
- >转换</el-button
- >
- </el-form-item>
- </el-col>
- <el-col :span="8" v-if="isShow('动脉压')">
- <el-form-item label="动脉压(mmHg):">
- <el-input
- style="width: 140px"
- v-model="form.arterial_pressure"
- ></el-input>
- <el-button
- size="mini"
- type="primary"
- @click="venousPressureChange(3)"
- >转换</el-button
- >
- </el-form-item>
- </el-col>
-
- <el-col :span="8" v-if="isShow('血流量')">
- <el-form-item label="血流量(ml/min):">
- <el-input v-model="form.blood_flow_volume"></el-input>
- </el-form-item>
- </el-col>
-
- <el-col :span="8" v-if="isShow('跨膜压')">
- <el-form-item label="跨膜压(mmHg):">
- <el-input
- style="width: 140px"
- v-model="form.transmembrane_pressure"
- ></el-input>
- <el-button
- size="mini"
- type="primary"
- @click="venousPressureChange(2)"
- >转换</el-button
- >
- </el-form-item>
- </el-col>
-
- <el-col :span="8" v-if="isShow('超滤率')">
- <el-form-item label="超滤率(ml/h)">
- <el-input v-model="form.ultrafiltration_rate"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8" v-if="isShow('超滤量')">
- <el-form-item label="超滤量(L):">
- <el-input v-model="form.ultrafiltration_volume"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8" v-if="isShow('钠浓度')">
- <el-form-item label="钠浓度(mmol/L):">
- <el-input v-model="form.sodium_concentration"></el-input>
- </el-form-item>
- </el-col>
- <!-- </el-row>
-
- <el-row :gutter="20"> -->
- <el-col :span="8" v-if="isShow('透析液温度')">
- <el-form-item label="透析液温度(℃):">
- <el-input v-model="form.dialysate_temperature"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8" v-if="isShow('置换率')">
- <el-form-item label="置换率(L/h):">
- <el-input v-model="form.replacement_rate"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8" v-if="isShow('置换量')">
- <el-form-item label="置换量(L):">
- <el-input v-model="form.displacement_quantity"></el-input>
- </el-form-item>
- </el-col>
-
- <el-col :span="8" v-if="isShow('电导度')">
- <el-form-item label="电导度(mS/m):">
- <el-input v-model="form.conductivity"></el-input>
- </el-form-item>
- </el-col>
-
- <el-col :span="8" v-if="isShow('置换液流量')">
- <el-form-item label="置换液流量(ml/h):">
- <el-input v-model="form.displacement_flow_quantity"></el-input>
- </el-form-item>
- </el-col>
-
- <el-col :span="8" v-if="isShow('SpO₂')">
- <el-form-item label="SpO₂(%):">
- <el-input v-model="form.blood_oxygen_saturation"></el-input>
- </el-form-item>
- </el-col>
-
- <!-- </el-row>
-
- <el-row :gutter="20"> -->
- <el-col :span="24" v-if="isShow('KT/V')">
- <el-form-item label="KT/V(在线):">
- <el-input type="textarea" :rows="4" v-model="form.ktv"></el-input>
- </el-form-item>
- </el-col>
- <!-- </el-row>
-
- <el-row :gutter="20"> -->
- <el-col :span="24" v-if="isShow('病情变化')">
- <el-form-item label="病情变化:">
- <el-select
- v-model="symptom_selecteds"
- style="width: 100%"
- :multiple="true"
- collapse-tags
- @change="symptomSelectorChange"
- >
- <el-option
- v-for="(symptom, index) in symptom_options"
- :key="index"
- :label="symptom.name"
- :value="symptom.name"
- ></el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <!-- </el-row>
- <el-row :gutter="20"> -->
- <el-col :span="24" v-if="isShow('病情变化')">
- <el-form-item>
- <el-input
- type="textarea"
- :rows="4"
- v-model="form.symptom"
- @blur="symptomTextareaBlur"
- ></el-input>
- </el-form-item>
- </el-col>
- <!-- </el-row>
-
- <el-row :gutter="20"> -->
- <el-col :span="24" v-if="isShow('处理')">
- <el-form-item label="处理:">
- <el-select
- v-model="dispose_selecteds"
- style="width: 100%"
- :multiple="true"
- collapse-tags
- @change="disposeSelectorChange"
- >
- <el-option
- v-for="(dispose, index) in dispose_options"
- :key="index"
- :label="dispose.name"
- :value="dispose.name"
- ></el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <!-- </el-row>
- <el-row :gutter="20"> -->
- <el-col :span="24" v-if="isShow('处理')">
- <el-form-item>
- <el-input
- type="textarea"
- :rows="4"
- v-model="form.dispose"
- @blur="disposeTextareaBlur"
- ></el-input>
- </el-form-item>
- </el-col>
- <!-- </el-row>
-
- <el-row :gutter="20"> -->
- <el-col :span="24" v-if="isShow('结果')">
- <el-form-item label="结果:">
- <el-select
- v-model="result_selecteds"
- style="width: 100%"
- :multiple="true"
- collapse-tags
- @change="resultSelectorChange"
- >
- <el-option
- v-for="(result, index) in result_options"
- :key="index"
- :label="result.name"
- :value="result.name"
- ></el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <!-- </el-row>
- <el-row :gutter="20"> -->
- <el-col :span="24" v-if="isShow('结果')">
- <el-form-item>
- <el-input
- type="textarea"
- :rows="4"
- v-model="form.result"
- @blur="resultTextareaBlur"
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
-
- <div slot="footer" class="dialog-footer" v-show="edit">
- <el-button @click="cancelEditAction">取 消</el-button>
- <el-button type="primary" @click="submitAction">保 存</el-button>
- </div>
- <!--</div>-->
- </el-dialog>
- </div>
- </template>
-
- <script>
- import { parseTime } from "@/utils";
- import { getDataConfig } from "@/utils/data";
- import {
- editMonitor,
- postDelMonitorInfo,
- getTodayMonitor
- } from "@/api/dialysis_record";
- import store from "@/store";
-
- export default {
- name: "MonitorDialog",
- data() {
- return {
- visible: false,
- edit: false,
- current_row_class: "current-box-class",
- creator:0,
- patient_id: 0,
- schedule_date: 0,
- template_id: 0,
- isAdd: false,
- // monitoring_date: 0,
-
- form: {
- id: 0,
- monitoring_date: 0, // 监测日期
- // operate_date: 0, // 实际测量日期
- // monitoring_time: "", // 监测时间 HH:mm
- operate_time: 0,
- systolic_bp: "", // 收缩压
- diastolic_bp: "", // 舒张压
- pulse_frequency: "", // 心率
- temperature: "", // 体温
- breathing_rated: "", // 呼吸频率
- blood_flow_volume: "", // 血流量
- venous_pressure: "", // 静脉压
- transmembrane_pressure: "", // 跨膜压
- ultrafiltration_volume: "", // 超滤量
- ultrafiltration_rate: "", // 超滤率
- arterial_pressure: "", // 动脉压
- sodium_concentration: "", // 钠浓度
- dialysate_temperature: "", // 透析液温度
- replacement_rate: "", // 置换率
- displacement_quantity: "", // 置换量
- conductivity: "", // 电导度
- displacement_flow_quantity: "", // 置换液流量
- ktv: "", // KT/V
- symptom: "", // 病情变化
- dispose: "", // 处理
- result: "", // 结果,
- blood_oxygen_saturation: "" // 血氧饱和度
- },
-
- table_current_row: null,
-
- symptom_selecteds: [],
- symptom_options: getDataConfig("hemodialysis", "symptoms"),
- dispose_selecteds: [],
- dispose_options: getDataConfig("hemodialysis", "deals"),
- result_selecteds: [],
- result_options: getDataConfig("hemodialysis", "results")
- };
- },
- props: {
- monitors: {
- type: Array
- }
- },
- computed: {
- monitor_date_str: function() {
- return parseTime(this.form.monitoring_date, "{y}-{m}-{d}");
- }
- },
- created() {
- this.template_id = this.$store.getters.xt_user.template_info.template_id;
- var date = this.$route.query.date;
- var patient_id = this.$route.query.patient_id;
- this.patient_id = patient_id;
- this.schedule_date = date;
- this.form.monitoring_date = date;
- // this.form.operate_date = parseInt((new Date()).getTime() / 1000)
- // this.form.monitoring_time = parseTime(new Date(), "{h}:{i}")
- this.form.operate_time = new Date().getTime();
- },
- methods: {
- venousPressureChange(type) {
- if (type == 1) {
- this.form.venous_pressure = Math.ceil(
- Math.round(this.form.venous_pressure * 7.5)
- );
- } else if (type == 2) {
- this.form.transmembrane_pressure = Math.ceil(
- Math.round(this.form.transmembrane_pressure * 7.5)
- );
- } else {
- this.form.arterial_pressure = Math.ceil(
- Math.round(this.form.arterial_pressure * 7.5)
- );
- }
- },
- isShow(name) {
- var filedList = store.getters.xt_user.fileds;
- for (let i = 0; i < filedList.length; i++) {
- if (
- filedList[i].module == 4 &&
- filedList[i].filed_name_cn == name &&
- filedList[i].is_show == 1
- ) {
- return true;
- }
- }
- return false;
- },
- reset: function() {
- this.cancelEditAction();
- },
- show() {
- this.visible = true;
- },
- hide() {
- this.visible = false;
- },
- getMonitorDate: function(monitor) {
- return parseTime(monitor.operate_time, "{y}-{m}-{d} {h}:{i}");
- },
-
- newRecordAction: function() {
- this.setEditMonitor(null);
- this.$refs.table.setCurrentRow(null);
- this.edit = true;
- this.isAdd = true;
- this.getLastRecordTody();
- },
- getLastRecordTody() {
- const params = {
- patient_id: this.patient_id
- };
-
- getTodayMonitor(params).then(rs => {
- var resp = rs.data.data;
- this.form.operate_time = resp.monitor.operate_time
- ? (resp.monitor.operate_time + 3600) * 1000
- : Date.parse(new Date());
- this.form.pulse_frequency = ""; // this.last_monitor_record.pulse_frequency;
- this.form.breathing_rated = resp.monitor.breathing_rate
- ? resp.monitor.breathing_rate
- : "";
- this.form.systolic_bp = ""; // this.last_monitor_record.systolic_blood_pressure;
- this.form.diastolic_bp = ""; // this.last_monitor_record.diastolic_blood_pressure;
- this.form.blood_flow_volume = resp.monitor.blood_flow_volume
- ? resp.monitor.blood_flow_volume
- : "";
- this.form.venous_pressure = ""; // this.last_monitor_record.venous_pressure;
- this.form.arterial_pressure = ""; // this.last_monitor_record.arterial_pressure;
- this.form.transmembrane_pressure = ""; // this.last_monitor_record.transmembrane_pressure;
- this.form.ultrafiltration_rate = resp.monitor.ultrafiltration_rate
- ? resp.monitor.ultrafiltration_rate
- : "";
- this.form.ultrafiltration_volume = resp.monitor.ultrafiltration_volume
- ? resp.monitor.ultrafiltration_volume
- : "";
- this.form.sodium_concentration = resp.monitor.sodium_concentration
- ? resp.monitor.sodium_concentration
- : "";
- this.form.dialysate_temperature = resp.monitor.dialysate_temperature
- ? resp.monitor.dialysate_temperature
- : "";
- this.form.temperature = resp.monitor.temperature
- ? resp.monitor.temperature
- : "";
- this.form.replacement_rate = resp.monitor.replacement_rate
- ? resp.monitor.replacement_rate
- : "";
- this.form.displacement_quantity = ""; // this.last_monitor_record.displacement_quantity;
- this.form.conductivity = "";
- this.form.displacement_flow_quantity = "";
-
- this.form.ktv = ""; // this.last_monitor_record.ktv;
- this.form.symptom = ""; // this.last_monitor_record.symptom;
- this.form.dispose = ""; // this.last_monitor_record.dispose;
- this.form.result = ""; // this.last_monitor_record.result;
- });
- },
-
- modifyRecordAction: function() {
- if (this.table_current_row == null) {
- this.$message.error("请选择一条监测记录");
- return;
- }
- this.creator = this.table_current_row.creator
- console.log( this.table_current_row)
- console.log( this.table_current_row.creator)
- console.log(this.creator)
- this.setEditMonitor(this.table_current_row);
- this.$refs.table.setCurrentRow(null);
- this.edit = true;
- this.isAdd = false;
- },
- cancelEditAction: function() {
- this.setEditMonitor(null);
- this.$refs.table.setCurrentRow(null);
- this.edit = false;
- },
- tableCurrentRowChange: function(currentRow) {
- this.table_current_row = currentRow;
-
- // console.log("tableCurrentRowChange", currentRow)
- },
- setEditMonitor: function(monitor) {
- if (monitor == null || monitor == undefined) {
- this.form.id = 0;
- // this.form.operate_date = parseInt((new Date()).getTime() / 1000)
- // this.form.monitoring_time = parseTime(new Date(), "{h}:{i}")
- this.form.operate_time = new Date().getTime();
- this.form.systolic_bp = "";
- this.form.diastolic_bp = "";
- this.form.pulse_frequency = "";
- this.form.breathing_rated = "";
- this.form.blood_flow_volume = "";
- this.form.temperature = "";
- this.form.venous_pressure = "";
- this.form.transmembrane_pressure = "";
- this.form.ultrafiltration_volume = "";
- this.form.ultrafiltration_rate = "";
- this.form.arterial_pressure = "";
- this.form.sodium_concentration = "";
- this.form.dialysate_temperature = "";
- this.form.replacement_rate = "";
- this.form.displacement_quantity = "";
- this.form.conductivity = "";
- this.form.displacement_flow_quantity = "";
- this.form.ktv = "";
- this.form.symptom = "";
- this.form.dispose = "";
- this.form.result = "";
- this.symptom_selecteds = [];
- this.dispose_selecteds = [];
- this.result_selecteds = [];
- } else {
- (this.form.id = monitor.id),
- // this.form.operate_date = monitor.operate_date
- // this.form.monitoring_time = monitor.monitoring_time
- (this.form.operate_time = monitor.operate_time * 1000);
- this.form.systolic_bp = monitor.systolic_blood_pressure
- ? monitor.systolic_blood_pressure
- : "";
- this.form.temperature = monitor.temperature ? monitor.temperature : "";
- this.form.diastolic_bp = monitor.diastolic_blood_pressure
- ? monitor.diastolic_blood_pressure
- : "";
- this.form.pulse_frequency = monitor.pulse_frequency
- ? monitor.pulse_frequency
- : "";
- this.form.breathing_rated = monitor.breathing_rate
- ? monitor.breathing_rate
- : "";
- this.form.blood_flow_volume = monitor.blood_flow_volume
- ? monitor.blood_flow_volume
- : "";
- this.form.venous_pressure = monitor.venous_pressure
- ? monitor.venous_pressure
- : "";
- this.form.transmembrane_pressure = monitor.transmembrane_pressure
- ? monitor.transmembrane_pressure
- : "";
- this.form.ultrafiltration_volume = monitor.ultrafiltration_volume
- ? monitor.ultrafiltration_volume
- : "";
- this.form.ultrafiltration_rate = monitor.ultrafiltration_rate
- ? monitor.ultrafiltration_rate
- : "";
- this.form.arterial_pressure = monitor.arterial_pressure
- ? monitor.arterial_pressure
- : "";
- this.form.sodium_concentration = monitor.sodium_concentration
- ? monitor.sodium_concentration
- : "";
- this.form.dialysate_temperature = monitor.dialysate_temperature
- ? monitor.dialysate_temperature
- : "";
- this.form.replacement_rate = monitor.replacement_rate
- ? monitor.replacement_rate
- : "";
- this.form.displacement_quantity = monitor.displacement_quantity
- ? monitor.displacement_quantity
- : "";
- this.form.conductivity = monitor.conductivity
- ? monitor.conductivity
- : "";
- this.form.displacement_flow_quantity = monitor.displacement_flow_quantity
- ? monitor.displacement_flow_quantity
- : "";
-
- this.form.ktv = monitor.ktv;
- this.form.symptom = monitor.symptom;
- this.form.dispose = monitor.dispose;
- this.form.result = monitor.result;
- this.form.blood_oxygen_saturation = monitor.blood_oxygen_saturation;
- // 设置三个下拉框的值,直接调用事件偷懒
- this.symptomTextareaBlur();
- this.disposeTextareaBlur();
- this.resultTextareaBlur();
- }
- },
-
- submitAction: function() {
- // TODO loading
- var is_new = this.form.id;
- this.form.operate_time = parseInt(this.form.operate_time / 1000);
- this.form.systolic_bp =
- parseFloat(this.form.systolic_bp) == NaN
- ? 0
- : parseFloat(this.form.systolic_bp);
- this.form.diastolic_bp =
- parseFloat(this.form.diastolic_bp) == NaN
- ? 0
- : parseFloat(this.form.diastolic_bp);
- this.form.temperature =
- parseFloat(this.form.temperature) == NaN
- ? 0
- : parseFloat(this.form.temperature);
- this.form.pulse_frequency =
- parseFloat(this.form.pulse_frequency) == NaN
- ? 0
- : parseFloat(this.form.pulse_frequency);
- this.form.breathing_rated =
- parseFloat(this.form.breathing_rated) == NaN
- ? 0
- : parseFloat(this.form.breathing_rated);
- this.form.blood_flow_volume =
- parseFloat(this.form.blood_flow_volume) == NaN
- ? 0
- : parseFloat(this.form.blood_flow_volume);
- this.form.venous_pressure =
- parseFloat(this.form.venous_pressure) == NaN
- ? 0
- : parseFloat(this.form.venous_pressure);
- this.form.transmembrane_pressure =
- parseFloat(this.form.transmembrane_pressure) == NaN
- ? 0
- : parseFloat(this.form.transmembrane_pressure);
- this.form.ultrafiltration_volume =
- parseFloat(this.form.ultrafiltration_volume) == NaN
- ? 0
- : parseFloat(this.form.ultrafiltration_volume);
- this.form.ultrafiltration_rate =
- parseFloat(this.form.ultrafiltration_rate) == NaN
- ? 0
- : parseFloat(this.form.ultrafiltration_rate);
- this.form.arterial_pressure =
- parseFloat(this.form.arterial_pressure) == NaN
- ? 0
- : parseFloat(this.form.arterial_pressure);
- this.form.sodium_concentration =
- parseFloat(this.form.sodium_concentration) == NaN
- ? 0
- : parseFloat(this.form.sodium_concentration);
- this.form.dialysate_temperature =
- parseFloat(this.form.dialysate_temperature) == NaN
- ? 0
- : parseFloat(this.form.dialysate_temperature);
- this.form.replacement_rate =
- parseFloat(this.form.replacement_rate) == NaN
- ? 0
- : parseFloat(this.form.replacement_rate);
- this.form.displacement_quantity =
- parseFloat(this.form.displacement_quantity) == NaN
- ? 0
- : parseFloat(this.form.displacement_quantity);
- this.form.conductivity =
- parseFloat(this.form.conductivity) == NaN
- ? 0
- : parseFloat(this.form.conductivity);
- this.form.displacement_flow_quantity =
- parseFloat(this.form.displacement_flow_quantity) == NaN
- ? 0
- : parseFloat(this.form.displacement_flow_quantity);
-
- this.form.ktv =
- parseFloat(this.form.ktv) == NaN ? 0 : parseFloat(this.form.ktv);
- this.form.monitoring_date = parseInt(this.form.monitoring_date);
-
-
- let mode = "1"
- if(this.form.id > 0){
- mode = "2"
- if(this.creator > 0 && this.creator!= this.$store.getters.xt_user.user.id){
- mode = "3"
- }
- }
- editMonitor(this.patient_id, this.schedule_date, this.form,mode).then(rs => {
- var resp = rs.data;
- if (resp.state == 1) {
- var monitor = resp.data.monitor;
- if (this.isAdd) {
- this.monitors.unshift(monitor);
- this.monitors.sort((a, b) => b.operate_time - a.operate_time);
- this.monitors.reverse();
- } else {
- for (let index = 0; index < this.monitors.length; index++) {
- const m = this.monitors[index];
- if (m.id == monitor.id) {
- for (const key in monitor) {
- m[key] = monitor[key];
- }
- break;
- }
- }
- }
- this.reset();
- } else {
- this.form.systolic_bp =
- parseFloat(this.form.systolic_bp) == NaN
- ? 0
- : parseFloat(this.form.systolic_bp);
- this.form.diastolic_bp =
- parseFloat(this.form.diastolic_bp) == NaN
- ? 0
- : parseFloat(this.form.diastolic_bp);
- this.form.temperature =
- parseFloat(this.form.temperature) == NaN
- ? 0
- : parseFloat(this.form.temperature);
- this.form.pulse_frequency =
- parseFloat(this.form.pulse_frequency) == NaN
- ? 0
- : parseFloat(this.form.pulse_frequency);
- this.form.breathing_rated =
- parseFloat(this.form.breathing_rated) == NaN
- ? 0
- : parseFloat(this.form.breathing_rated);
- this.form.blood_flow_volume =
- parseFloat(this.form.blood_flow_volume) == NaN
- ? 0
- : parseFloat(this.form.blood_flow_volume);
- this.form.venous_pressure =
- parseFloat(this.form.venous_pressure) == NaN
- ? 0
- : parseFloat(this.form.venous_pressure);
- this.form.transmembrane_pressure =
- parseFloat(this.form.transmembrane_pressure) == NaN
- ? 0
- : parseFloat(this.form.transmembrane_pressure);
- this.form.ultrafiltration_volume =
- parseFloat(this.form.ultrafiltration_volume) == NaN
- ? 0
- : parseFloat(this.form.ultrafiltration_volume);
- this.form.ultrafiltration_rate =
- parseFloat(this.form.ultrafiltration_rate) == NaN
- ? 0
- : parseFloat(this.form.ultrafiltration_rate);
- this.form.arterial_pressure =
- parseFloat(this.form.arterial_pressure) == NaN
- ? 0
- : parseFloat(this.form.arterial_pressure);
- this.form.sodium_concentration =
- parseFloat(this.form.sodium_concentration) == NaN
- ? 0
- : parseFloat(this.form.sodium_concentration);
- this.form.dialysate_temperature =
- parseFloat(this.form.dialysate_temperature) == NaN
- ? 0
- : parseFloat(this.form.dialysate_temperature);
- this.form.replacement_rate =
- parseFloat(this.form.replacement_rate) == NaN
- ? 0
- : parseFloat(this.form.replacement_rate);
- this.form.displacement_quantity =
- parseFloat(this.form.displacement_quantity) == NaN
- ? 0
- : parseFloat(this.form.displacement_quantity);
- this.form.conductivity =
- parseFloat(this.form.conductivity) == NaN
- ? 0
- : parseFloat(this.form.conductivity);
- this.form.displacement_flow_quantity =
- parseFloat(this.form.displacement_flow_quantity) == NaN
- ? 0
- : parseFloat(this.form.displacement_flow_quantity);
-
- this.form.ktv =
- parseFloat(this.form.ktv) == NaN ? 0 : parseFloat(this.form.ktv);
-
-
- this.$message.error(resp.msg);
- }
- });
- },
-
- symptomTextareaBlur: function() {
- if (this.form.symptom.length > 0) {
- this.symptom_selecteds = this.form.symptom.split(",");
- } else {
- this.symptom_selecteds = [];
- }
- },
- symptomSelectorChange: function() {
- if (this.symptom_selecteds.length > 0) {
- this.form.symptom = this.symptom_selecteds.join(",") + ",";
- } else {
- this.form.symptom = "";
- }
- },
- disposeTextareaBlur: function() {
- if (this.form.dispose.length > 0) {
- this.dispose_selecteds = this.form.dispose.split(",");
- } else {
- this.dispose_selecteds = [];
- }
- },
- disposeSelectorChange: function() {
- if (this.dispose_selecteds.length > 0) {
- this.form.dispose = this.dispose_selecteds.join(",") + ",";
- } else {
- this.form.dispose = "";
- }
- },
- resultTextareaBlur: function() {
- if (this.form.result.length > 0) {
- this.result_selecteds = this.form.result.split(",");
- } else {
- this.result_selecteds = [];
- }
- },
- setRecords(records) {
- this.monitors = records;
- },
- resultSelectorChange: function() {
- if (this.result_selecteds.length > 0) {
- this.form.result = this.result_selecteds.join(",") + ",";
- } else {
- this.form.result = "";
- }
- },
- deleteRecordAction: function() {
- if (this.table_current_row == null) {
- this.$message.error("请选择一条监测记录");
- return;
- }
-
- this.$confirm("删除记录", "是否删除该监测记录", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- let mode = "4"
- if(this.table_current_row.creator > 0 && this.table_current_row.creator != this.$store.getters.xt_user.user.id){
- mode = "5"
- }
-
- const params = {
- patient_id: this.patient_id,
- record_id: this.table_current_row.id,
- mode: mode
-
- };
-
- postDelMonitorInfo(params).then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg);
- return false;
- } else {
- const record_id = response.data.data.record_id;
- for (let i = 0; i < this.monitors.length; i++) {
- if (this.monitors[i].id == record_id) {
- this.monitors.splice(i, 1);
- }
- }
- this.$message.success("删除成功");
-
- }
- });
- })
- .catch(() => {});
- }
- }
- };
- </script>
-
- <style style="stylesheet/scss" lang="scss" scoped>
- .grid {
- padding: 10px 0 20px 0;
- .list {
- ul {
- @include display-flex;
- @include align-items-center;
- @include text-align;
- @include justify-content-around;
- cursor: pointer;
- li {
- font-size: 12px;
- color: #5d6b7a;
- margin-top: 20px;
-
- p {
- height: 30px;
- line-height: 30px;
- color: #34495e;
- font-size: 14px;
- }
- img {
- width: 50px;
- height: 50px;
- }
- }
- }
- }
- }
- .txsj {
- text-align: center;
- margin-bottom: 20px;
- }
- .current-box-class::-webkit-scrollbar {
- height: 20px; /*滚动条高度*/
- }
- </style>
-
- <style style="stylesheet/scss" lang="scss">
- .dialog_box .current-box-class .current-row > td {
- background: #6fb5fa;
- color: white;
- /* font-size: 12px; */
- }
-
- .dialog_box .current-box-class .current-row:hover > td {
- background: #6fb5fa;
- color: white;
- /* font-size: 12px; */
- }
- .el-table__body-wrapper::-webkit-scrollbar {
- height: 20px;
- }
- </style>
|