1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144 |
- <template>
- <div>
- <div v-loading="loading">
- <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 v-if="isShow('监测时间')" width="124px">时间</th>
- <th v-if="isShow('血压')" width="72px">血压(mmHg)</th>
- <th v-if="isShow('脉搏')" width="80px">脉搏(次/分)</th>
- <th v-if="isShow('体温')" width="80px">体温(℃)</th>
- <th v-if="isShow('呼吸频率')" width="110px">呼吸频率(次/分)</th>
- <th v-if="isShow('血流量')" width="92px">血流量(ml/min)</th>
- <th width="76px">静脉压/动脉压(mmHg)</th>
- <th v-if="isShow('跨膜压')" width="76px">跨膜压(mmHg)</th>
- <th v-if="isShow('超滤量') && template_id ==6" width="76px">超滤量(ml)</th>
- <th v-if="isShow('超滤量') && template_id !=6" width="76px">超滤量(L)</th>
- <th v-if="isShow('钠浓度')" width="92px">钠浓度(mmol/L)</th>
- <th v-if="isShow('透析液温度')" width="82px">透析液温度(℃)</th>
- <th v-if="isShow('置换率')" width="92px">置换率(L/h)</th>
- <th v-if="isShow('置换量')" width="50px">置换量(L)</th>
- <th v-if="isShow('电导度')" width="50px">电导度(mS/m)</th>
- <th v-if="isShow('置换液流量')" width="50px">置换液流量(ml/h)</th>
-
- <th v-if="isShow('病情变化')" width="92px">病情变化</th>
- <th v-if="isShow('处理')" width="92px">处理</th>
- <th v-if="isShow('结果')" 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 v-if="isShow('监测时间')">{{parseTime(item.operate_time, '{y}-{m}-{d} {h}:{i}')}}</td>
- <td v-if="isShow('血压')">
- {{item.systolic_blood_pressure?item.systolic_blood_pressure:''}}/{{item.diastolic_blood_pressure?item.diastolic_blood_pressure:''}}
- </td>
- <td v-if="isShow('脉搏')">{{item.pulse_frequency?item.pulse_frequency:''}}</td>
- <td v-if="isShow('体温')">{{item.temperature?item.temperature:''}}</td>
- <td v-if="isShow('呼吸频率')">{{item.breathing_rate?item.breathing_rate:''}}</td>
- <td v-if="isShow('血流量')">{{item.blood_flow_volume?item.blood_flow_volume:''}}</td>
- <td>
- {{item.venous_pressure?item.venous_pressure:''}}/{{item.arterial_pressure?item.arterial_pressure:''}}
- </td>
- <td v-if="isShow('跨膜压')">{{item.transmembrane_pressure?item.transmembrane_pressure:''}}</td>
- <td v-if="isShow('超滤量')">{{item.ultrafiltration_volume?item.ultrafiltration_volume:''}}</td>
- <td v-if="isShow('钠浓度')">{{item.sodium_concentration?item.sodium_concentration:''}}</td>
- <td v-if="isShow('透析液温度')">{{item.dialysate_temperature?item.dialysate_temperature:''}}</td>
- <td v-if="isShow('置换率')">{{item.replacement_rate?item.replacement_rate:''}}</td>
- <td v-if="isShow('置换量')">{{item.displacement_quantity?item.displacement_quantity:''}}</td>
- <td v-if="isShow('电导度')">{{item.conductivity?item.conductivity:''}}</td>
- <td v-if="isShow('置换液流量')">{{item.displacement_flow_quantity?item.displacement_flow_quantity:''}}</td>
- <td v-if="isShow('病情变化')">{{item.symptom}}</td>
- <td v-if="isShow('处理')">{{item.dispose}}</td>
- <td v-if="isShow('结果')">{{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" v-if="isShow('监测时间')">
- <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" v-if="isShow('收缩压')">
- <label>收缩压(mmHg)</label>
- <input type="number" @focus="inputFocus" onclick="this.select();" class="inputBox"
- v-model="form.systolic_bp">
- </div>
- <div class="cell" v-if="isShow('舒张压')">
- <label>舒张压(mmHg)</label>
- <input type="number" @focus="inputFocus" onclick="this.select();" class="inputBox"
- v-model="form.diastolic_bp">
- </div>
- <div class="cell" v-if="isShow('脉搏')">
- <label>脉搏(次/分)</label>
- <input type="number" @focus="inputFocus" onclick="this.select();" class="inputBox"
- v-model="form.pulse_frequency">
- </div>
- <div class="cell" v-if="isShow('体温')">
- <label>体温(℃)</label>
- <input type="number" @focus="inputFocus" onclick="this.select();" class="inputBox"
- v-model="form.temperature">
- </div>
- <div class="cell" v-if="isShow('呼吸频率')">
- <label>呼吸频率(次/分)</label>
- <input type="number" @focus="inputFocus" onclick="this.select();" class="inputBox"
- v-model="form.breathing_rated">
- </div>
- <div class="cell" v-if="isShow('血流量')">
- <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" style="width:60%">
- <button style="width:30%;padding: 0.18rem 0; color: #fff; background: #409eff;" @click="venousPressureChange(1)" >转换</button>
- </div>
- <div class="cell" v-if="isShow('跨膜压')">
- <label>跨膜压(mmHg)</label>
- <input type="number" @focus="inputFocus" onclick="this.select();" class="inputBox" v-model="form.transmembrane_pressure" style="width:60%">
- <button style="width:30%;padding: 0.18rem 0; color: #fff; background: #409eff;" @click="venousPressureChange(2)" >转换</button>
- </div>
- <div class="cell" v-if="isShow('超滤量')">
- <label v-if="template_id == 6">超滤量(ml)</label>
- <label v-else>超滤量(L)</label>
- <input type="number" @focus="inputFocus" onclick="this.select();" class="inputBox"
- v-model="form.ultrafiltration_volume">
- </div>
- <div class="cell" v-if="isShow('超滤率')">
- <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" style="width:60%">
- <button style="width:30%;padding: 0.18rem 0; color: #fff; background: #409eff;" @click="venousPressureChange(3)" >转换</button>
- </div>
- <div class="cell" v-if="isShow('钠浓度')">
- <label>钠浓度(mmol/L)</label>
- <input type="number" @focus="inputFocus" onclick="this.select();" class="inputBox"
- v-model="form.sodium_concentration">
- </div>
- <div class="cell" v-if="isShow('透析液温度')">
- <label>透析液温度(℃)</label>
- <input type="number" @focus="inputFocus" onclick="this.select();" class="inputBox"
- v-model="form.dialysate_temperature">
- </div>
- <div class="cell" v-if="isShow('置换率')">
- <label>置换率(L/h)</label>
- <input type="number" @focus="inputFocus" onclick="this.select();" class="inputBox"
- v-model="form.replacement_rate">
- </div>
- <div class="cell" v-if="isShow('置换量')">
- <label>置换量(L)</label>
- <input type="number" @focus="inputFocus" onclick="this.select();" class="inputBox"
- v-model="form.displacement_quantity">
- </div>
- <div class="cell" v-if="isShow('电导度')">
- <label>电导度(mS/m)</label>
- <input type="number" @focus="inputFocus" onclick="this.select();" class="inputBox"
- v-model="form.conductivity">
- </div>
-
- <div class="cell" v-if="isShow('置换液流量')">
- <label>置换液流量(ml/h)</label>
- <input type="number" @focus="inputFocus" onclick="this.select();" class="inputBox"
- v-model="form.displacement_flow_quantity">
- </div>
-
- <div class="cell width" v-if="isShow('KT/V')">
- <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" v-if="isShow('病情变化')">
- <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" v-if="isShow('处理')">
- <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" v-if="isShow('结果')">
- <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>
- </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, deleteMonitorRecord, editMonitorRecord, GetMonitor,GetMonitorToday} from '@/api/dialysis'
- import {parseTime} from '@/utils'
- import {Dialog, Toast} from 'vant'
- import CheckBoxSubMenu from './subMenu/checkBoxSubMenu'
- import {getDataConfig} from '@/utils/data'
-
- export default {
- name: 'MonitDialog',
-
- props: {
- monitor_records: {
- type: Array
- },
- patient: {
- type: Object
- },
- order: {
- type: Object
- },
- last_monitor_record: {
- type: Object
- }
- },
- data () {
- return {
- loading: false,
- 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',
- template_id: 0,
- visibility: false,
- today_last_monitor_record : {},
- 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: '', // 透析液温度
- temperature: '', // 体温
- replacement_rate: '', // 置换率
- displacement_quantity: '', // 置换量
- conductivity:'',
- displacement_flow_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
- this.template_id = this.$store.getters.user.template_info.template_id;
- // 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: {
- venousPressureChange(type){
- if (type == 1) {
- this.form.venous_pressure = this.form.venous_pressure * 7.5
- } else if(type == 2) {
- this.form.transmembrane_pressure = this.form.transmembrane_pressure * 7.5
- } else {
- this.form.arterial_pressure = this.form.arterial_pressure * 7.5
- }
- },
- isShow (name) {
- var filedList = this.$store.getters.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
- },
- getLastRecordTody(){
- let params = {
- patient_id: this.patient.id
- }
-
- GetMonitorToday(params).then(rs => {
- var resp =rs.data.data
- this.today_last_monitor_record = resp.monitor
-
-
- // this.form.operate_time = Date.parse(new Date())
- 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;
- this.form.id = -1
- console.log(this.form)
- })
- },
-
- 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
- if (monitor.systolic_blood_pressure == 0) {
- this.form.systolic_bp = ''
- } else {
- this.form.systolic_bp = monitor.systolic_blood_pressure
- }
-
- if (monitor.diastolic_blood_pressure == 0) {
- this.form.diastolic_bp = ''
- } else {
- this.form.diastolic_bp = monitor.diastolic_blood_pressure
- }
-
- if (monitor.pulse_frequency == 0) {
- this.form.pulse_frequency = ''
- } else {
- this.form.pulse_frequency = monitor.pulse_frequency
- }
-
- if (monitor.breathing_rate == 0) {
- this.form.breathing_rated = ''
- } else {
- this.form.breathing_rated = monitor.breathing_rate
- }
-
- if (monitor.blood_flow_volume == 0) {
- this.form.blood_flow_volume = ''
- } else {
- this.form.blood_flow_volume = monitor.blood_flow_volume
- }
-
- if (monitor.venous_pressure == 0) {
- this.form.venous_pressure = ''
- } else {
- this.form.venous_pressure = monitor.venous_pressure
- }
-
- if (monitor.arterial_pressure == 0) {
- this.form.arterial_pressure = ''
- } else {
- this.form.arterial_pressure = monitor.arterial_pressure
- }
-
- if (monitor.transmembrane_pressure == 0) {
- this.form.transmembrane_pressure = ''
- } else {
- this.form.transmembrane_pressure = monitor.transmembrane_pressure
- }
-
- if (monitor.ultrafiltration_rate == 0) {
- this.form.ultrafiltration_rate = ''
- } else {
- this.form.ultrafiltration_rate = monitor.ultrafiltration_rate
- }
-
- if (monitor.ultrafiltration_volume == 0) {
- this.form.ultrafiltration_volume = ''
- } else {
- this.form.ultrafiltration_volume = monitor.ultrafiltration_volume
- }
-
- if (monitor.sodium_concentration == 0) {
- this.form.sodium_concentration = ''
- } else {
- this.form.sodium_concentration = monitor.sodium_concentration
- }
-
- if (monitor.dialysate_temperature == 0) {
- this.form.dialysate_temperature = ''
- } else {
- this.form.dialysate_temperature = monitor.dialysate_temperature
- }
-
- if (monitor.temperature == 0) {
- this.form.temperature = ''
- } else {
- this.form.temperature = monitor.temperature
- }
-
- if (monitor.replacement_rate == 0) {
- this.form.replacement_rate = ''
- } else {
- this.form.replacement_rate = monitor.replacement_rate
- }
-
- if (monitor.displacement_quantity == 0) {
- this.form.displacement_quantity = ''
- } else {
- this.form.displacement_quantity = monitor.displacement_quantity
- }
-
- if (monitor.conductivity == 0) {
- this.form.conductivity = ''
- } else {
- this.form.conductivity = monitor.conductivity
- }
-
- if (monitor.displacement_flow_quantity == 0) {
- this.form.displacement_flow_quantity = ''
- } else {
- this.form.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.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);
-
- if (this.currentRow.systolic_blood_pressure == 0) {
- this.form.systolic_bp = ''
- } else {
- this.form.systolic_bp = this.currentRow.systolic_blood_pressure
- }
-
- if (this.currentRow.diastolic_blood_pressure == 0) {
- this.form.diastolic_bp = ''
- } else {
- this.form.diastolic_bp = this.currentRow.diastolic_blood_pressure
- }
-
- if (this.currentRow.pulse_frequency == 0) {
- this.form.pulse_frequency = ''
- } else {
- this.form.pulse_frequency = this.currentRow.pulse_frequency
- }
-
- if (this.currentRow.breathing_rate == 0) {
- this.form.breathing_rated = ''
- } else {
- this.form.breathing_rated = this.currentRow.breathing_rate
- }
-
- if (this.currentRow.blood_flow_volume == 0) {
- this.form.blood_flow_volume = ''
- } else {
- this.form.blood_flow_volume = this.currentRow.blood_flow_volume
- }
-
- if (this.currentRow.venous_pressure == 0) {
- this.form.venous_pressure = ''
- } else {
- this.form.venous_pressure = this.currentRow.venous_pressure
- }
-
- if (this.currentRow.arterial_pressure == 0) {
- this.form.arterial_pressure = ''
- } else {
- this.form.arterial_pressure = this.currentRow.arterial_pressure
- }
-
- if (this.currentRow.transmembrane_pressure == 0) {
- this.form.transmembrane_pressure = ''
- } else {
- this.form.transmembrane_pressure = this.currentRow.transmembrane_pressure
- }
-
- if (this.currentRow.ultrafiltration_rate == 0) {
- this.form.ultrafiltration_rate = ''
- } else {
- this.form.ultrafiltration_rate = this.currentRow.ultrafiltration_rate
- }
-
- if (this.currentRow.ultrafiltration_volume == 0) {
- this.form.ultrafiltration_volume = ''
- } else {
- this.form.ultrafiltration_volume = this.currentRow.ultrafiltration_volume
- }
-
- if (this.currentRow.sodium_concentration == 0) {
- this.form.sodium_concentration = ''
- } else {
- this.form.sodium_concentration = this.currentRow.sodium_concentration
- }
-
- if (this.currentRow.dialysate_temperature == 0) {
- this.form.dialysate_temperature = ''
- } else {
- this.form.dialysate_temperature = this.currentRow.dialysate_temperature
- }
-
- if (this.currentRow.temperature == 0) {
- this.form.temperature = ''
- } else {
- this.form.temperature = this.currentRow.temperature
- }
-
- if (this.currentRow.replacement_rate == 0) {
- this.form.replacement_rate = ''
- } else {
- this.form.replacement_rate = this.currentRow.replacement_rate
- }
-
- if (this.currentRow.displacement_quantity == 0) {
- this.form.displacement_quantity = ''
- } else {
- this.form.displacement_quantity = this.currentRow.displacement_quantity
- }
-
- if (this.currentRow.conductivity == 0) {
- this.form.conductivity = ''
- } else {
- this.form.conductivity = this.currentRow.conductivity
- }
-
- if (this.currentRow.displacement_flow_quantity == 0) {
- this.form.displacement_flow_quantity = ''
- } else {
- this.form.displacement_flow_quantity = this.currentRow.displacement_flow_quantity
- }
-
-
- if (this.currentRow.ktv == 0) {
- this.form.ktv = ''
- } else {
- 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()
- var record_date =
- y + '/' + (m < 10 ? '0' + m : m) + '/' + (d < 10 ? '0' + d : d)
- this.form.monitor_date = 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.getLastRecordTody()
-
- // }
- },
- submitEditAction: function () {
- this.loading = true
- 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.temperature = this.form.temperature
- params.replacement_rate = this.form.replacement_rate
- params.displacement_quantity = this.form.displacement_quantity
- params.ktv = this.form.ktv
- params.conductivity = this.form.conductivity
- params.symptom = this.form.symptom
- params.dispose = this.form.dispose
- params.result = this.form.result
- params.monitoring_nurse = this.form.monitoring_nurse
- params.displacement_flow_quantity = this.form.displacement_flow_quantity
-
-
- params.id = this.form.id
- editMonitorRecord(params).then(rs => {
- var resp = rs.data
- if (resp.state == 1) {
- this.loading = false
-
- 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.temperature = ''
- this.form.replacement_rate = ''
- this.form.displacement_quantity = ''
- this.form.ktv = ''
- this.form.symptom = ''
- this.form.dispose = ''
- this.form.result = ''
- this.form.conductivity = ''
- this.form.displacement_flow_quantity = ''
- this.form.id = -1
-
- Toast.success('修改成功')
- this.formPanel = false
- this.listPanel = true
- } else {
- this.loading = false
- Toast.fail(resp.msg)
- }
- })
- },
- submitAction: function () {
- this.loading = true
- 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.temperature = this.form.temperature
- params.replacement_rate = this.form.replacement_rate
- params.displacement_quantity = this.form.displacement_quantity
- params.conductivity = this.form.conductivity
- params.displacement_flow_quantity = this.form.displacement_flow_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) {
- this.loading = false
-
- 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.temperature = ''
- this.form.replacement_rate = ''
- this.form.displacement_quantity = ''
- this.form.ktv = ''
- this.form.symptom = ''
- this.form.dispose = ''
- this.form.result = ''
- this.form.conductivity = ''
- this.form.displacement_flow_quantity = ''
-
- // 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 {
- this.loading = false
- Toast.fail(resp.msg)
- }
- })
- .catch(err => {
- this.loading = false
- 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>
-
|