123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853 |
- <template>
- <div>
- <div class="Dialog" v-show="listPanel" >
- <div class="DialogTit">
- <span class="iconfont" @click="close()"></span>
- <h1 class="name">透析监测</h1>
- <span class="success" > </span>
- </div>
- <div style="width:100%;background: #fff;">
- <div class="yzNav" style="width:80%">
- <span @click="openForm()">新增监测</span>
- <span @click="openEidtForm()">修改监测</span>
- <span @click="deleteForm()">删除监测</span>
- </div>
- </div>
- <div class="DialogContent choose" id="dialogTop">
- <div style="width:100%;overflow:hildden;">
- <table class="table" style="">
- <tr @click="selectRow(-1, null)">
- <th width="124px">时间</th>
- <th width="72px">血压(mmHg)</th>
- <th width="80px">心率(次/分)</th>
- <th width="110px">呼吸(次/分)</th>
- <th width="92px">血流量(ml/min)</th>
- <th width="76px">静脉压(mmHg)</th>
- <th width="76px">跨膜压(mmHg)</th>
- <th width="76px">超滤量(L)</th>
- <th width="92px">钠浓度(mmol/L)</th>
- <th width="82px">透析液温度(℃)</th>
- <th width="92px">置换率(L/h)</th>
- <th width="50px">置换量(L)</th>
- <th width="92px">病情变化</th>
- <th width="92px">处理</th>
- <th width="92px">结果</th>
- </tr>
- <tr v-for="(item,index) in monitorRecords" :key="index" :value="item.value" @click="selectRow(index, item)" :class="index==currentIndex?rowClass:''">
- <td>{{parseTime(item.operate_time, "{y}-{m}-{d} {h}:{i}")}}</td>
- <td>{{item.systolic_blood_pressure}}/{{item.diastolic_blood_pressure}}</td>
- <td>{{item.pulse_frequency}}</td>
- <td>{{item.breathing_rate}}</td>
- <td>{{item.blood_flow_volume}}</td>
- <td>{{item.venous_pressure}}</td>
- <td>{{item.transmembrane_pressure}}</td>
- <td>{{item.ultrafiltration_volume}}</td>
- <td>{{item.sodium_concentration}}</td>
- <td>{{item.dialysate_temperature}}</td>
- <td>{{item.replacement_rate}}</td>
- <td>{{item.displacement_quantity}}</td>
- <td>{{item.symptom}}</td>
- <td>{{item.dispose}}</td>
- <td>{{item.result}}</td>
- </tr>
- </table>
- </div>
- </div>
- </div>
- <div class="Dialog" v-show="formPanel" >
- <div class="DialogTit">
- <div class="back" @click="formPanel=false;listPanel=true;"> <span class="iconfont"> </span>返回</div>
- <h1 class="name">{{formTitle}}</h1>
- <span class="success" v-if="form.id>0" @click="submitEditAction()">完成</span>
- <span class="success" v-else @click="submitAction()">完成</span>
- </div>
- <div class="DialogContent choose">
- <div class="content">
- <div class="cell">
- <label>监测时间</label>
- <input type="text" class="inputBox" @click="chooseTime()" :value="parseTime(this.form.operate_time, '{y}-{m}-{d} {h}:{i}')" readonly>
- </div>
- <div class="cell">
- <label>收缩压(mmHg)</label>
- <input type="number" @focus="inputFocus" onclick="this.select();" class="inputBox" v-model="form.systolic_bp">
- </div>
- <div class="cell">
- <label>舒张压(mmHg)</label>
- <input type="number" @focus="inputFocus" onclick="this.select();" class="inputBox" v-model="form.diastolic_bp">
- </div>
- <div class="cell">
- <label>心率(次/分)</label>
- <input type="number" @focus="inputFocus" onclick="this.select();" class="inputBox" v-model="form.pulse_frequency">
- </div>
- <div class="cell">
- <label>呼吸频率(次/分)</label>
- <input type="number" @focus="inputFocus" onclick="this.select();" class="inputBox" v-model="form.breathing_rated">
- </div>
- <div class="cell">
- <label>血流量(ml/min)</label>
- <input type="number" @focus="inputFocus" onclick="this.select();" class="inputBox" v-model="form.blood_flow_volume">
- </div>
- <div class="cell">
- <label>静脉压(mmHg)</label>
- <input type="number" @focus="inputFocus" onclick="this.select();" class="inputBox" v-model="form.venous_pressure">
- </div>
- <div class="cell">
- <label>跨膜压(mmHg)</label>
- <input type="number" @focus="inputFocus" onclick="this.select();" class="inputBox" v-model="form.transmembrane_pressure">
- </div>
- <div class="cell">
- <label>超滤量(L)</label>
- <input type="number" @focus="inputFocus" onclick="this.select();" class="inputBox" v-model="form.ultrafiltration_volume">
- </div>
- <div class="cell">
- <label>超滤率(ml/h)</label>
- <input type="number" @focus="inputFocus" onclick="this.select();" class="inputBox" v-model="form.ultrafiltration_rate">
- </div>
- <div class="cell">
- <label>动脉压(mmHg)</label>
- <input type="number" @focus="inputFocus" onclick="this.select();" class="inputBox" v-model="form.arterial_pressure">
- </div>
- <div class="cell">
- <label>钠浓度(mmol/L)</label>
- <input type="number" @focus="inputFocus" onclick="this.select();" class="inputBox" v-model="form.sodium_concentration">
- </div>
- <div class="cell">
- <label>透析液温度(℃)</label>
- <input type="number" @focus="inputFocus" onclick="this.select();" class="inputBox" v-model="form.dialysate_temperature">
- </div>
- <div class="cell">
- <label>置换率(L/h)</label>
- <input type="number" @focus="inputFocus" onclick="this.select();" class="inputBox" v-model="form.replacement_rate">
- </div>
- <div class="cell">
- <label>置换量(L)</label>
- <input type="number" @focus="inputFocus" onclick="this.select();" class="inputBox" v-model="form.displacement_quantity">
- </div>
- <div class="cell width" >
- <label>KT/V(在线)</label>
- <!-- <input type="text" class="inputBox" v-model="form.ktv"> -->
- <textarea @focus="inputFocus" class="inputBox" style="width: 100%;" :rows="4" v-model="form.ktv"></textarea>
- </div>
- <div class="cell width" >
- <label>病情变化</label>
- <input type="text" class="inputBox" style="width: 100%;margin-bottom:5px;" v-model="form.symptom" readonly placeholder="选择 " @click="showSubMenu('symptom')">
- <textarea @focus="inputFocus" class="inputBox" style="width: 100%;" :rows="4" v-model="form.symptom"></textarea>
- </div>
- <div class="cell width" >
- <label>处理</label>
- <!-- <input type="text" class="inputBox" v-model="form.dispose"> -->
- <input type="text" class="inputBox" style="width: 100%;margin-bottom:5px;" v-model="form.dispose" readonly placeholder="选择" @click="showSubMenu('dispose')">
- <textarea @focus="inputFocus" class="inputBox" style="width: 100%;" :rows="4" v-model="form.dispose"></textarea>
- </div>
- <div class="cell width" >
- <label>结果</label>
- <!-- <input type="text" class="inputBox" v-model="form.result"> -->
- <input type="text" class="inputBox" style="width: 100%;margin-bottom:5px;" v-model="form.result" readonly placeholder="选择" @click="showSubMenu('result')">
- <textarea @focus="lastInputFocus" @blur="lastInputBlur" class="inputBox" style="width: 100%;" :rows="4" v-model="form.result"></textarea>
- </div>
-
- <div class="cell width">
- <label>监测人:</label>
- <span>{{doctor}}</span>
- </div>
-
- </div>
- </div>
- </div>
-
- <mt-datetime-picker
- ref="picker"
- type="datetime"
- @confirm="handleConfirm"
- v-model="pickertime">
- </mt-datetime-picker>
-
- <check-box-sub-menu :visibility="visibility" v-on:menu-cancle="menuCancle" v-on:menu-comfirm="menuComfirm"
- :propsForm="propForm"></check-box-sub-menu>
-
-
- </div>
- </template>
-
- <script>
- import {
- addMonitorRecord,
- editMonitorRecord,
- deleteMonitorRecord,
- GetMonitor
- } from "@/api/dialysis";
- import { parseTime } from "@/utils";
- import { Toast } from "vant";
- import CheckBoxSubMenu from "./subMenu/checkBoxSubMenu";
- import { getDataConfig } from "@/utils/data";
- import { Dialog } from "vant";
-
- export default {
- name: "MonitDialog",
-
- props: {
- monitor_records: {
- type: Array
- },
- patient: {
- type: Object
- },
- order: {
- type: Object
- },
- last_monitor_record: {
- type: Object
- }
- },
- data() {
- return {
- formTitle: "新增监测",
- formPanel: false,
- listPanel: true,
- tableDate: [],
- monitorRecords: this.monitor_records,
- pickertime: new Date(),
- monitor_time_str: "",
- // monitor_date_str: "",
- currentIndex: -1,
- currentRow: null,
- rowClass: "row-class-active",
-
- visibility: false,
- propForm: {
- title: "",
- list: [],
- optionList: [],
- isMultiple: 2,
- result: [], //选中的值
- type: 1, //用来区分不同子菜单,方便对返回值进行赋值
- selectId: 0
- },
-
- form: {
- // patient_id: 0,
- // order_id: 0,
- monitor_date: 0,
- // monitor_time: "00:00",
- operate_time: 0,
- pulse_frequency: "", // 脉率
- breathing_rated: "", // 呼吸频率
- systolic_bp: "", // 收缩压
- diastolic_bp: "", // 舒张压
- blood_flow_volume: "", // 血流量
- venous_pressure: "", // 静脉压
- arterial_pressure: "", // 动脉压
- transmembrane_pressure: "", // 跨膜压
- ultrafiltration_rate: "", // 超滤率
- ultrafiltration_volume: "", // 超滤量
- sodium_concentration: "", // 钠浓度
- dialysate_temperature: "", // 透析液温度
- replacement_rate: "", // 置换率
- displacement_quantity: "", // 置换量
- ktv: "", // KT/V(在线)
- symptom: "", // 症状
- dispose: "", // 处理
- result: "", // 结果
- monitoring_nurse: this.$store.getters.user.user.id // 监测人
- },
- doctor: this.$store.getters.user.user.user_name
- };
- },
- created() {
- var date = this.$route.query && this.$route.query.date;
- // date *= 1000;
- // var newDate = new Date(date);
- // var cDate = new 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 = cDate.getFullYear();
- // m = cDate.getMonth() + 1;
- // d = cDate.getDate();
- // }
-
- // var h = cDate.getHours();
- // var mi = cDate.getMinutes();
-
- // var pickertime = (h < 10 ? "0" + h : h) + ":" + (mi < 10 ? "0" + mi : mi);
- // var monitor_date_str =
- // y + "-" + (m < 10 ? "0" + m : m) + "-" + (d < 10 ? "0" + d : d);
- // this.form.monitor_date = Math.round(
- // new Date(monitor_date_str + " 00:00:00").getTime() / 1000
- // );
- // this.form.monitor_date = parseInt((new Date(date.getFullYear, date.getMonth, date.getDate, 0, 0, 0, 0)).getTime()) //parseTime(date, "{y}-{m}-{d}") + " 00:00:00"
- this.form.monitor_date = date;
-
- this.form.operate_time = this.pickertime.getTime();
- },
- methods: {
- getLastRecord() {
- let params = {
- patient_id: this.patient.id
- };
- GetMonitor(params).then(rs => {
- var resp = rs.data;
- if (resp.state == 1) {
- var monitor = resp.data.monitor;
-
- this.form.systolic_bp = monitor.systolic_blood_pressure;
- this.form.diastolic_bp = monitor.diastolic_blood_pressure;
- this.form.pulse_frequency = monitor.pulse_frequency;
- this.form.breathing_rated = monitor.breathing_rate;
- this.form.blood_flow_volume = monitor.blood_flow_volume;
- this.form.venous_pressure = monitor.venous_pressure;
- this.form.arterial_pressure = monitor.arterial_pressure;
- this.form.transmembrane_pressure = monitor.transmembrane_pressure;
- this.form.ultrafiltration_rate = monitor.ultrafiltration_rate;
- this.form.ultrafiltration_volume = monitor.ultrafiltration_volume;
- this.form.sodium_concentration = monitor.sodium_concentration;
- this.form.dialysate_temperature = monitor.dialysate_temperature;
- this.form.replacement_rate = monitor.replacement_rate;
- this.form.displacement_quantity = monitor.displacement_quantity;
- this.form.ktv = monitor.ktv;
- this.form.symptom = monitor.symptom;
- this.form.dispose = monitor.dispose;
- this.form.result = monitor.result;
- this.form.operate_time = new Date(
- monitor.operate_time * 1000
- ).getTime();
- this.form.id = -1;
- }
- });
- },
- selectRow(index, row) {
- this.currentIndex = index;
- this.currentRow = row;
- },
-
- inputFocus: function(event) {
- var input = event.target;
- setTimeout(function() {
- input.parentNode.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();
- // }
- },
- lastInputFocus: function(event) {
- var input = event.target;
- setTimeout(function() {
- input.style.marginBottom = "2rem";
- input.parentNode.scrollIntoView();
- }, 0);
- },
- lastInputBlur: function(event) {
- var input = event.target;
- setTimeout(function() {
- input.style.marginBottom = "";
- }, 0);
- },
- close: function() {
- this.$emit("close");
- },
- setRecords(records) {
- if (records == null) {
- records = [];
- }
- this.tableDate.splice(0, this.tableDate.length);
- this.tableDate.push(...records);
- },
- parseTime(time, layout) {
- return parseTime(time, layout);
- },
- addRecords(records) {
- this.tableDate.push(...records);
- },
- deleteForm() {
- if (this.currentIndex < 0 || this.currentRow == null) {
- Toast.fail("请先选择要删除的记录");
- return false;
- }
-
- Dialog.confirm({
- title: "删除监测记录",
- message: "是否删除该监测记录"
- })
- .then(() => {
- let params = {
- record_id: this.currentRow.id,
- patient_id: this.patient.id
- };
- deleteMonitorRecord(params).then(rs => {
- var resp = rs.data;
- if (resp.state == 1) {
- var recordId = resp.data.record_id;
- this.$emit("did_delete_monitor", recordId);
- Toast.success("删除成功");
- } else {
- Toast.fail(resp.msg);
- }
- });
- })
- .catch(() => {});
- },
- handleConfirm(time) {
- this.form.operate_time = time.getTime();
- // var timeMap = time.split(":");
- // this.form.monitor_time = time;
- // this.monitor_time_str =
- // parseTime(this.form.monitor_date, "{y}-{m}-{d}") +
- // " " +
- // this.form.monitor_time;
-
- // this.monitor_time_str = this.handleTime(time);
- // this.form.monitor_time = parseTime(time, "{h}:{i}")
- // this.form.monitor_date = Math.round(new Date(parseTime(time, "{y}-{m}-{d}") + " 00:00:00").getTime()/1000);
- },
- handleTime(time) {
- var year = time.getFullYear();
- var month = time.getMonth() + 1;
- var day = time.getDate();
- var hour = time.getHours();
- var minute = time.getMinutes();
- if (month < 10) {
- month = "0" + month;
- }
- if (day < 10) {
- day = "0" + day;
- }
- if (hour < 10) {
- hour = "0" + hour;
- }
- if (minute < 10) {
- minute = "0" + minute;
- }
- return year + "-" + month + "-" + day + " " + hour + ":" + minute + ":00";
- },
- chooseTime() {
- this.$refs.picker.open();
- },
- openEidtForm() {
- if (this.currentIndex < 0 || this.currentRow == null) {
- Toast.fail("请先选择要修改的记录");
- return false;
- }
- this.formTitle = "修改监测";
- this.formPanel = true;
- this.listPanel = false;
- // console.log("this.currentRow", this.currentRow);
-
- this.form.pulse_frequency = this.currentRow.pulse_frequency;
- this.form.breathing_rated = this.currentRow.breathing_rate;
- this.form.systolic_bp = this.currentRow.systolic_blood_pressure;
- this.form.diastolic_bp = this.currentRow.diastolic_blood_pressure;
- this.form.blood_flow_volume = this.currentRow.blood_flow_volume;
- this.form.venous_pressure = this.currentRow.venous_pressure;
- this.form.arterial_pressure = this.currentRow.arterial_pressure;
- this.form.transmembrane_pressure = this.currentRow.transmembrane_pressure;
- this.form.ultrafiltration_rate = this.currentRow.ultrafiltration_rate;
- this.form.ultrafiltration_volume = this.currentRow.ultrafiltration_volume;
- this.form.sodium_concentration = this.currentRow.sodium_concentration;
- this.form.dialysate_temperature = this.currentRow.dialysate_temperature;
- this.form.replacement_rate = this.currentRow.replacement_rate;
- this.form.displacement_quantity = this.currentRow.displacement_quantity;
- this.form.ktv = this.currentRow.ktv;
- this.form.symptom = this.currentRow.symptom;
- this.form.dispose = this.currentRow.dispose;
- this.form.result = this.currentRow.result;
- this.form.id = this.currentRow.id;
- this.form.operate_time = this.currentRow.operate_time * 1000;
- // this.monitor_time_str =
- // parseTime(this.form.monitor_date, "{y}-{m}-{d}") +
- // " " +
- // this.form.monitor_time;
- },
- openForm() {
- this.formTitle = "新增监测";
- this.formPanel = true;
- this.listPanel = false;
- // if(this.monitor_time_str == "") {
-
- 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();
- }
- var record_date =
- y + "-" + (m < 10 ? "0" + m : m) + "-" + (d < 10 ? "0" + d : d);
-
- this.form.monitor_date = Math.round(
- new Date(record_date + " 00:00:00").getTime() / 1000
- );
- var nowTime = new Date();
- // this.form.monitor_time = parseTime(nowTime, "{h}:{i}");
- // this.monitor_time_str = this.handleTime(nowTime);
- // this.monitor_time_str = record_date + " " + this.form.monitor_time;
-
- // this.getLastRecord()
-
- this.form.operate_time = Date.parse(new Date());
- this.form.pulse_frequency = ""; //this.last_monitor_record.pulse_frequency;
- this.form.breathing_rated = ""; //this.last_monitor_record.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 = this.last_monitor_record.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 = this.last_monitor_record.ultrafiltration_rate;
- this.form.ultrafiltration_volume = this.last_monitor_record.ultrafiltration_volume;
- this.form.sodium_concentration = this.last_monitor_record.sodium_concentration;
- this.form.dialysate_temperature = this.last_monitor_record.dialysate_temperature;
- this.form.replacement_rate = this.last_monitor_record.replacement_rate;
- this.form.displacement_quantity = this.last_monitor_record.displacement_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;
- this.form.id = -1;
- console.log(this.form);
- // }
- },
- submitEditAction: function() {
- Toast.loading({ forbidClick: true, duration: 0 });
- var params = {};
- params.patient_id = this.patient.id;
- params.order_id = this.order == null ? 0 : this.order.id;
- params.date = this.form.monitor_date;
- // params.time = this.form.monitor_time;
- params.operate_time = parseInt(this.form.operate_time / 1000);
- params.pulse_frequency = this.form.pulse_frequency;
- params.breathing_rated = this.form.breathing_rated;
- params.systolic_bp = this.form.systolic_bp;
- params.diastolic_bp = this.form.diastolic_bp;
- params.blood_flow_volume = this.form.blood_flow_volume;
- params.venous_pressure = this.form.venous_pressure;
- params.arterial_pressure = this.form.arterial_pressure;
- params.transmembrane_pressure = this.form.transmembrane_pressure;
- params.ultrafiltration_rate = this.form.ultrafiltration_rate;
- params.ultrafiltration_volume = this.form.ultrafiltration_volume;
- params.sodium_concentration = this.form.sodium_concentration;
- params.dialysate_temperature = this.form.dialysate_temperature;
- params.replacement_rate = this.form.replacement_rate;
- params.displacement_quantity = this.form.displacement_quantity;
- params.ktv = this.form.ktv;
- params.symptom = this.form.symptom;
- params.dispose = this.form.dispose;
- params.result = this.form.result;
- params.monitoring_nurse = this.form.monitoring_nurse;
- params.id = this.form.id;
- editMonitorRecord(params).then(rs => {
- var resp = rs.data;
- if (resp.state == 1) {
- var monitor = resp.data.monitor;
- this.$emit("did_edit_monitor", monitor);
-
- this.selectRow(-1, null);
-
- this.form.pulse_frequency = "";
- this.form.breathing_rated = "";
- this.form.systolic_bp = "";
- this.form.diastolic_bp = "";
- this.form.blood_flow_volume = "";
- this.form.venous_pressure = "";
- this.form.arterial_pressure = "";
- this.form.transmembrane_pressure = "";
- this.form.ultrafiltration_rate = "";
- this.form.ultrafiltration_volume = "";
- this.form.sodium_concentration = "";
- this.form.dialysate_temperature = "";
- this.form.replacement_rate = "";
- this.form.displacement_quantity = "";
- this.form.ktv = "";
- this.form.symptom = "";
- this.form.dispose = "";
- this.form.result = "";
- this.form.id = -1;
-
- Toast.success("修改成功");
- this.formPanel = false;
- this.listPanel = true;
- } else {
- Toast.fail(resp.msg);
- }
- });
- },
- submitAction: function() {
- Toast.loading({ forbidClick: true, duration: 0 });
- var params = {};
- params.patient_id = this.patient.id;
- params.order_id = this.order == null ? 0 : this.order.id;
- params.date = this.form.monitor_date;
- params.operate_time = parseInt(this.form.operate_time / 1000);
- params.pulse_frequency = this.form.pulse_frequency;
- params.breathing_rated = this.form.breathing_rated;
- params.systolic_bp = this.form.systolic_bp;
- params.diastolic_bp = this.form.diastolic_bp;
- params.blood_flow_volume = this.form.blood_flow_volume;
- params.venous_pressure = this.form.venous_pressure;
- params.arterial_pressure = this.form.arterial_pressure;
- params.transmembrane_pressure = this.form.transmembrane_pressure;
- params.ultrafiltration_rate = this.form.ultrafiltration_rate;
- params.ultrafiltration_volume = this.form.ultrafiltration_volume;
- params.sodium_concentration = this.form.sodium_concentration;
- params.dialysate_temperature = this.form.dialysate_temperature;
- params.replacement_rate = this.form.replacement_rate;
- params.displacement_quantity = this.form.displacement_quantity;
- params.ktv = this.form.ktv;
- params.symptom = this.form.symptom;
- params.dispose = this.form.dispose;
- params.result = this.form.result;
- params.monitoring_nurse = this.form.monitoring_nurse;
- addMonitorRecord(params)
- .then(rs => {
- var resp = rs.data;
- if (resp.state == 1) {
- var monitor = resp.data.monitor;
- this.$emit("did_add_monitor", monitor);
-
- // this.monitor_records.unshift(monitor)
-
- // this.monitor_records= this.quickSort(this.monitor_records,"operate_time",false)
-
- this.form.pulse_frequency = "";
- this.form.breathing_rated = "";
- this.form.systolic_bp = "";
- this.form.diastolic_bp = "";
- this.form.blood_flow_volume = "";
- this.form.venous_pressure = "";
- this.form.arterial_pressure = "";
- this.form.transmembrane_pressure = "";
- this.form.ultrafiltration_rate = "";
- this.form.ultrafiltration_volume = "";
- this.form.sodium_concentration = "";
- this.form.dialysate_temperature = "";
- this.form.replacement_rate = "";
- this.form.displacement_quantity = "";
- this.form.ktv = "";
- this.form.symptom = "";
- this.form.dispose = "";
- this.form.result = "";
-
- this.last_monitor_record.sodium_concentration =
- monitor.sodium_concentration;
- this.last_monitor_record.dialysate_temperature =
- monitor.dialysate_temperature;
-
- Toast.success("新增成功");
- this.formPanel = false;
- this.listPanel = true;
- } else {
- Toast.fail(resp.msg);
- }
- })
- .catch(err => {
- Toast.fail(err);
- });
- },
- showSubMenu: function(val) {
- switch (val) {
- case "symptom":
- this.propForm.type = 1;
- this.formPanel = false;
- this.propForm.title = "病情变化";
- this.visibility = true;
- this.propForm.list = getDataConfig("hemodialysis", "symptoms");
- this.propForm.optionList = [];
- this.propForm.isMultiple = 2;
- if (this.form.symptom.length > 0) {
- this.propForm.result = this.form.symptom.split(",");
- } else {
- this.propForm.result = [];
- }
- break;
-
- case "dispose":
- this.propForm.type = 2;
- this.formPanel = false;
- this.propForm.title = "处理";
- this.visibility = true;
- this.propForm.list = getDataConfig("hemodialysis", "deals");
- this.propForm.optionList = [];
- this.propForm.isMultiple = 2;
- if (this.form.dispose.length > 0) {
- this.propForm.result = this.form.dispose.split(",");
- } else {
- this.propForm.result = [];
- }
- break;
-
- case "result":
- this.propForm.type = 3;
- this.formPanel = false;
- this.propForm.title = "结果";
- this.visibility = true;
- this.propForm.list = getDataConfig("hemodialysis", "results");
- this.propForm.optionList = [];
- this.propForm.isMultiple = 2;
- if (this.form.result.length > 0) {
- this.propForm.result = this.form.result.split(",");
- } else {
- this.propForm.result = [];
- }
- break;
- }
- },
- menuCancle: function() {
- this.visibility = false;
- this.formPanel = true;
- },
- menuComfirm: function(val) {
- this.visibility = false;
- this.formPanel = true;
- switch (val.type) {
- case 1:
- this.form.symptom = val.result.join(",");
- break;
- case 2:
- this.form.dispose = val.result.join(",");
- break;
- case 3:
- this.form.result = val.result.join(",");
- break;
- }
- },
- open: function() {
- this.listPanel = true;
- this.formPanel = false;
- this.visibility = false;
- this.$refs.picker.close();
- var dialogTop = document.querySelector("#dialogTop");
- if (dialogTop != null) {
- this.$nextTick(() => {
- dialogTop.scrollTop = 0;
- });
- }
- },
- parseTime: function(time, format) {
- return parseTime(time, format);
- },
- quickSort(arr, name, snum) {
- //如果数组<=1,则直接返回
- if (arr.length <= 1) {
- return arr;
- }
- var pivotIndex = Math.floor(arr.length / 2);
- //找基准,并把基准从原数组删除
- var pivot = arr.splice(pivotIndex, 1)[0];
- var middleNum = pivot[name];
- // 定义左右数组
- var left = [];
- var right = [];
- //比基准小的放在left,比基准大的放在right
- if (snum) {
- for (var i = 0; i < arr.length; i++) {
- if (arr[i][name] <= middleNum) {
- left.push(arr[i]);
- } else {
- right.push(arr[i]);
- }
- }
- } else {
- for (var i = 0; i < arr.length; i++) {
- if (arr[i][name] <= middleNum) {
- left.push(arr[i]);
- } else {
- right.push(arr[i]);
- }
- }
- }
- //递归,返回所需数组
- return this.quickSort(left, name, snum).concat(
- [pivot],
- this.quickSort(right, name, snum)
- );
- }
- },
- components: {
- CheckBoxSubMenu
- }
- };
- </script>
-
- <style style="stylesheet/scss" lang="scss" scoped>
- .DialogContent {
- .content {
- .cell {
- float: left;
- width: 4.93rem;
- margin: 0.35rem 0 0 0.5rem !important;
- label {
- display: block;
- height: 0.55rem;
- line-height: 0.55rem;
- color: $pgh-color;
- }
- select {
- width: 100%;
- padding: 0.2rem 0;
- border: 1px $border-color solid;
- border-radius: 2px;
- padding-left: 5px;
- }
-
- .inputBox {
- border: 1px $border-color solid;
- border-radius: 2px;
- padding: 0.18rem 0;
- padding-left: 5px;
- width: 100%;
- }
- .input_focus {
- margin-bottom: 2rem;
- }
- .textarea {
- width: 100%;
- height: 1.22rem;
- border: 1px $border-color solid;
- border-radius: 2px;
- padding-left: 5px;
- }
- }
- .width {
- width: 95%;
- @include box-sizing;
- label {
- display: inline-block;
- }
- button {
- background: $main-color;
- color: #fff;
- border-radius: 6px;
- width: 3.1rem;
- height: 0.9rem;
- line-height: 0.9rem;
- text-align: center;
- margin: 0 0 0.9rem 0;
- }
- }
- .center {
- text-align: center;
- }
- }
- }
-
- .row-class-active > td {
- background: #badcff !important;
- }
- </style>
-
|