123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131 |
- <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('超滤量')" 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">
- </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">
- </div>
- <div class="cell" v-if="isShow('超滤量')">
- <label>超滤量(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">
- </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',
-
- 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
- // 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: {
- 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.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 = ''// this.last_monitor_record.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>
-
|