|
@@ -9,12 +9,13 @@
|
9
|
9
|
<el-col :span="8">
|
10
|
10
|
<div class="dataTitle">患者列表</div>
|
11
|
11
|
<div style="margin-bottom: 10px;">
|
12
|
|
- <el-input v-model="queryParams.keywords" placeholder="姓名/透析号" style="width: 180px;" @change="changeSearch"></el-input>
|
|
12
|
+ <el-input v-model="queryParams.keywords" placeholder="姓名/透析号" style="width: 180px;" @change="changeSearch"></el-input>
|
|
13
|
+ <el-button type="primary" @change="changeSearch">搜索</el-button>
|
13
|
14
|
<el-select v-model="queryParams.schedule_type" style="width: 100px;" @change="changeSearch">
|
14
|
15
|
<el-option v-for="item in shiftOptions" :label="item.label" :value="item.value" :key="item.value"></el-option>
|
15
|
16
|
</el-select>
|
16
|
17
|
</div>
|
17
|
|
- <el-table :data="patients" :class="signAndWeighBoxPatients" style="width: 100%" border highlight-current-row :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)'}" max-height="300" @current-change="handleCurrentChange">
|
|
18
|
+ <el-table :data="patients" :class="signAndWeighBoxPatients" style="width: 100%" border highlight-current-row :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)'}" max-height="300" @current-change="handleCurrentChange">
|
18
|
19
|
<el-table-column type="index" label="序号" width="50px" align="center"></el-table-column>
|
19
|
20
|
<el-table-column prop="name" label="姓名" min-width="20" align="center">
|
20
|
21
|
<template slot-scope="scope">
|
|
@@ -24,7 +25,7 @@
|
24
|
25
|
|
25
|
26
|
<el-table-column prop="state" label="状态" min-width="30" align="center">
|
26
|
27
|
<template slot-scope="scope">
|
27
|
|
- <span v-if="scope.row.id==0">未签到</span>
|
|
28
|
+ <span v-if="scope.row.signin.id ==0">未签到</span>
|
28
|
29
|
<span v-else-if="scope.row.dialysis_order.stage==2">已经下机</span>
|
29
|
30
|
<span v-else>已签到</span>
|
30
|
31
|
</template>
|
|
@@ -78,7 +79,7 @@
|
78
|
79
|
<el-row :gutter="20">
|
79
|
80
|
<el-col :span="23" align="right" class="button">
|
80
|
81
|
<el-button @click="hide()">取消</el-button>
|
81
|
|
- <el-button @click="savedata();updatedata();sighdata()" type="primary">保存</el-button>
|
|
82
|
+ <el-button @click="savedata();updatedata();sighdata();" type="primary">保存</el-button>
|
82
|
83
|
</el-col>
|
83
|
84
|
</el-row>
|
84
|
85
|
</div>
|
|
@@ -136,6 +137,7 @@ export default {
|
136
|
137
|
DBP_after: '', // 舒张压
|
137
|
138
|
SBP_after: '', // 收缩压
|
138
|
139
|
dialysis_no: ''
|
|
140
|
+
|
139
|
141
|
},
|
140
|
142
|
weigh_list: {
|
141
|
143
|
weight_before: '', // 透前体重
|
|
@@ -192,18 +194,30 @@ export default {
|
192
|
194
|
methods: {
|
193
|
195
|
fetchSignPatients() {
|
194
|
196
|
fetchSignPatients(this.queryParams).then(response => {
|
195
|
|
- this.patients = []
|
|
197
|
+ this.patients = []
|
196
|
198
|
if (response.data.state === 1) {
|
197
|
199
|
this.patients = response.data.data.patients
|
198
|
|
- console.log("排班数据是什么呢?")
|
199
|
|
- console.log(this.patients)
|
|
200
|
+ console.log("病人信息",this.patients[0].schedule)
|
|
201
|
+ //将没有排班的信息排除
|
|
202
|
+ for(let i = this.patients.length-1;i >= 0;i--){
|
|
203
|
+
|
|
204
|
+ if(this.patients[i].schedule.id == 0){
|
|
205
|
+ this.patients.splice(i,1)
|
|
206
|
+ }
|
|
207
|
+
|
|
208
|
+ }
|
|
209
|
+
|
200
|
210
|
this.queryParams.schedule_type = response.data.data.schedule_type
|
201
|
211
|
this.querySignParams.date_time = response.data.data.today
|
202
|
212
|
|
203
|
213
|
if (this.queryParams.need_schedule_type === 1) {
|
204
|
214
|
var sl = this.schedules.length
|
|
215
|
+ console.log("s1是什么东西")
|
|
216
|
+ console.log(sl)
|
205
|
217
|
for (let index = 0; index < sl; index++) {
|
206
|
218
|
if (this.schedules[index].type in response.data.data.panel) {
|
|
219
|
+ console.log(this.schedules[index].type)
|
|
220
|
+ console.log(response.data.data.panel[this.schedules[index].type].schedule)
|
207
|
221
|
this.schedules[index].arrange = response.data.data.panel[this.schedules[index].type].schedule
|
208
|
222
|
this.schedules[index].sign = response.data.data.panel[this.schedules[index].type].sign
|
209
|
223
|
this.schedules[index].before = response.data.data.panel[this.schedules[index].type].before
|
|
@@ -250,127 +264,60 @@ export default {
|
250
|
264
|
this.fetchSignPatients()
|
251
|
265
|
},
|
252
|
266
|
handleCurrentChange(row, old) {
|
253
|
|
-
|
254
|
|
- // this.weigh_form = {
|
255
|
|
- // id:0,
|
256
|
|
- // choose:false,
|
257
|
|
- // name: '',
|
258
|
|
- // dry_weight: '',
|
259
|
|
- // clothes_weight: '',
|
260
|
|
- // // 透前
|
261
|
|
- // weigh_before: '',
|
262
|
|
- // dehydrated_weight: '',
|
263
|
|
- // dehydrated_percent: '',
|
264
|
|
- // weight_before: '',
|
265
|
|
- // temperature_before: '',
|
266
|
|
- // pulse_rate_before: '', // P 脉率
|
267
|
|
- // respiratory_rate_before: '', // R 呼吸频率
|
268
|
|
- // DBP_before: '', // 舒张压
|
269
|
|
- // SBP_before: '', // 收缩压
|
270
|
|
- // // 透后
|
271
|
|
- // weigh_after: '',
|
272
|
|
- // weight_reduce_after: '',
|
273
|
|
- // weight_after: '',
|
274
|
|
- // temperature_after: '',
|
275
|
|
- // pulse_rate_after: '', // P 脉率
|
276
|
|
- // respiratory_rate_after: '', // R 呼吸频率
|
277
|
|
- // DBP_after: '', // 舒张压
|
278
|
|
- // SBP_after: '', // 收缩压
|
279
|
|
- // patient_id: 0,
|
280
|
|
- // dialysis_no:'',
|
281
|
|
- // };
|
282
|
267
|
this.disa = true
|
283
|
268
|
this.show=false
|
284
|
269
|
this.weigh_form.choose = true
|
285
|
270
|
this.weigh_form.name = row.name
|
286
|
271
|
this.weigh_form.dialysis_no = row.dialysis_no
|
287
|
|
- // if (row.alias.length>0) {
|
288
|
|
- // this.weigh_form.name += "("+row.alias+")";
|
289
|
|
- // }
|
290
|
272
|
this.weigh_form.patient_id = row.id
|
291
|
273
|
this.querySignParams.patient_id = row.id
|
292
|
274
|
this.dialysis_stege = row.dialysis_order.stage
|
293
|
275
|
this.getDialysisInforInfomation(row.id)
|
294
|
|
- this.getDialysisAfterInfomation(row.id)
|
295
|
|
- if (row.signin != null) {
|
296
|
|
- this.weigh_form.dry_weight = '' + row.signin.dry_weight;
|
297
|
|
- this.weigh_form.clothes_weight = '' + row.signin.clothing_weight;
|
298
|
|
- // 透前
|
299
|
|
- this.weigh_form.weigh_before = '' + row.signin.weighing_before;
|
300
|
|
- this.weigh_form.dehydrated_weight = '' + row.signin.target_dewatering;
|
301
|
|
-
|
302
|
|
- if (this.weigh_form.dry_weight == 0) {
|
303
|
|
- this.weigh_form.dehydrated_percent = '';
|
304
|
|
- }else {
|
305
|
|
- var dehydrated_percent = ((this.weigh_form.dehydrated_weight/this.weigh_form.dry_weight) * 100).toFixed(2);
|
306
|
|
- if (isNaN(dehydrated_percent)) {
|
307
|
|
- this.weigh_form.dehydrated_percent = '';
|
308
|
|
- }else {
|
309
|
|
- this.weigh_form.dehydrated_percent = dehydrated_percent + "%";
|
310
|
|
- }
|
311
|
|
- }
|
|
276
|
+ this.getDialysisAfterInfomation(row.id)
|
312
|
277
|
|
313
|
|
- this.weigh_form.weight_before = '' + row.signin.weight_before;
|
314
|
|
- this.weigh_form.temperature_before = '' + row.signin.temperature_before;
|
315
|
|
- this.weigh_form.pulse_rate_before = '' + row.signin.pulse_frequency_before;
|
316
|
|
- this.weigh_form.respiratory_rate_before = '' + row.signin.breathing_rate_before;
|
317
|
|
- this.weigh_form.DBP_before = '' + row.signin.diastolic_blood_pressure_before;
|
318
|
|
- this.weigh_form.SBP_before = '' + row.signin.systolic_blood_pressure_before;
|
319
|
|
-
|
320
|
|
- this.weigh_form.weigh_after = '' + row.signin.weighing_after;
|
321
|
|
- this.weigh_form.weight_reduce_after = '' + row.signin.weight_loss;
|
322
|
|
- this.weigh_form.weight_after = '' + row.signin.weight_after;
|
323
|
|
- this.weigh_form.temperature_after = '' + row.signin.temperature_after;
|
324
|
|
- this.weigh_form.pulse_rate_after = '' + row.signin.pulse_frequency_after;
|
325
|
|
- this.weigh_form.respiratory_rate_after = '' + row.signin.breathing_rate_after;
|
326
|
|
- this.weigh_form.DBP_after = '' + row.signin.diastolic_blood_pressure_after;
|
327
|
|
- this.weigh_form.SBP_after = '' + row.signin.systolic_blood_pressure_after;
|
328
|
|
- this.weigh_form.id = row.id;
|
329
|
|
- console.log("好难哦")
|
330
|
|
- console.log(this.weigh_form.id)
|
331
|
|
- }
|
|
278
|
+ //this.getsignweigh(row.id)
|
332
|
279
|
},
|
333
|
|
- submitSign() {
|
334
|
|
- SignWeigh(this.querySignParams, this.weigh_form).then(response => {
|
335
|
|
- if (response.data.state === 1) {
|
336
|
|
- this.$message({
|
337
|
|
- type: 'success',
|
338
|
|
- message: '成功!'
|
339
|
|
- })
|
|
280
|
+ // submitSign() {
|
|
281
|
+ // SignWeigh(this.querySignParams, this.weigh_form).then(response => {
|
|
282
|
+ // if (response.data.state === 1) {
|
|
283
|
+ // this.$message({
|
|
284
|
+ // type: 'success',
|
|
285
|
+ // message: '成功!'
|
|
286
|
+ // })
|
340
|
287
|
|
341
|
|
- var tlen = this.patients.length
|
342
|
|
- for (let index = 0; index < tlen; index++) {
|
343
|
|
- if (this.patients[index].id === this.querySignParams.patient_id) {
|
344
|
|
- var signin = this.patients[index].signin
|
345
|
|
- this.patients[index].signin = response.data.data.sign
|
|
288
|
+ // var tlen = this.patients.length
|
|
289
|
+ // for (let index = 0; index < tlen; index++) {
|
|
290
|
+ // if (this.patients[index].id === this.querySignParams.patient_id) {
|
|
291
|
+ // var signin = this.patients[index].signin
|
|
292
|
+ // this.patients[index].signin = response.data.data.sign
|
346
|
293
|
|
347
|
|
- if (this.patients[index].schedule.id > 0 && (this.patients[index].schedule.schedule_type >= 1 || this.patients[index].schedule.schedule_type <= 3)) {
|
348
|
|
- var sl = this.schedules.length
|
349
|
|
- for (let j = 0; j < sl; j++) {
|
350
|
|
- if (this.schedules[j].type === this.patients[index].schedule.schedule_type) {
|
351
|
|
- if (this.weigh_form.id <= 0) {
|
352
|
|
- this.schedules[j].sign++
|
353
|
|
- }
|
354
|
|
- if (signin.weigh_before_time === 0 && response.data.data.sign.weigh_before_time > 0) {
|
355
|
|
- this.schedules[j].before++
|
356
|
|
- }
|
|
294
|
+ // if (this.patients[index].schedule.id > 0 && (this.patients[index].schedule.schedule_type >= 1 || this.patients[index].schedule.schedule_type <= 3)) {
|
|
295
|
+ // var sl = this.schedules.length
|
|
296
|
+ // for (let j = 0; j < sl; j++) {
|
|
297
|
+ // if (this.schedules[j].type === this.patients[index].schedule.schedule_type) {
|
|
298
|
+ // if (this.weigh_form.id <= 0) {
|
|
299
|
+ // this.schedules[j].sign++
|
|
300
|
+ // }
|
|
301
|
+ // if (signin.weigh_before_time === 0 && response.data.data.sign.weigh_before_time > 0) {
|
|
302
|
+ // this.schedules[j].before++
|
|
303
|
+ // }
|
357
|
304
|
|
358
|
|
- if (signin.weigh_time === 0 && response.data.data.sign.weigh_time > 0) {
|
359
|
|
- this.schedules[j].after++
|
360
|
|
- }
|
361
|
|
- }
|
362
|
|
- }
|
363
|
|
- }
|
364
|
|
- break
|
365
|
|
- }
|
366
|
|
- }
|
367
|
|
- this.weigh_form.id = response.data.data.sign.id
|
368
|
|
- } else {
|
369
|
|
- this.$message.error(response.data.msg)
|
370
|
|
- return false
|
371
|
|
- }
|
372
|
|
- })
|
373
|
|
- },
|
|
305
|
+ // if (signin.weigh_time === 0 && response.data.data.sign.weigh_time > 0) {
|
|
306
|
+ // this.schedules[j].after++
|
|
307
|
+ // }
|
|
308
|
+ // }
|
|
309
|
+ // }
|
|
310
|
+ // }
|
|
311
|
+ // break
|
|
312
|
+ // }
|
|
313
|
+ // }
|
|
314
|
+ // this.weigh_form.id = response.data.data.sign.id
|
|
315
|
+ // } else {
|
|
316
|
+ // this.$message.error(response.data.msg)
|
|
317
|
+ // return false
|
|
318
|
+ // }
|
|
319
|
+ // })
|
|
320
|
+ // },
|
374
|
321
|
|
375
|
322
|
getDialysisInforInfomation(id) {
|
376
|
323
|
getDialysisInforInfomation(id).then(response => {
|
|
@@ -517,36 +464,34 @@ export default {
|
517
|
464
|
params.breathing_rateafter = this.weigh_infor.breathing_rate
|
518
|
465
|
params.systolic_blood_pressureafter = this.weigh_infor.systolic_blood_pressure
|
519
|
466
|
params.diastolic_blood_pressureafter = this.weigh_infor.diastolic_blood_pressure
|
520
|
|
- console.log("params数据",params)
|
|
467
|
+ console.log("params是什么?",params)
|
521
|
468
|
sighdata(params).then(response => {
|
522
|
|
- var signs = response.data.data.signs
|
523
|
|
- console.log(signs)
|
|
469
|
+ var signs = response.data.data.signs
|
|
470
|
+ // this.patients[this.table_current_index].signin.id = 1
|
524
|
471
|
if (response.data.state === 1) {
|
525
|
472
|
this.$message({
|
526
|
473
|
type: 'success',
|
527
|
474
|
message: '成功!'
|
528
|
475
|
})
|
529
|
476
|
var tlen = this.patients.length
|
|
477
|
+
|
530
|
478
|
for(let index=0;index<tlen;index++ ){
|
531
|
|
- if(this.patients[index].id ==params.patient_id){
|
|
479
|
+ if(this.patients[index].id == params.patient_id){
|
532
|
480
|
var signin = this.patients[index].signin
|
533
|
|
- this.patients[index].signin = response.data.data.signs
|
534
|
|
-
|
|
481
|
+ this.patients[index].signin = response.data.data.signs
|
|
482
|
+
|
535
|
483
|
if(this.patients[index].schedule.id > 0 && (this.patients[index].schedule.schedule_type >= 1 || this.patients[index].schedule.schedule_type <= 3)){
|
536
|
484
|
var sl = this.schedules.length
|
537
|
485
|
for(let j = 0; j < sl; j++){
|
538
|
|
- if(this.schedules[j].type === this.patients[index].schedule.schedule_type){
|
539
|
|
- // if(this.weigh_form.id>= 0){
|
540
|
|
- // this.schedules[j].sign++
|
541
|
|
- // }
|
542
|
|
- if((signin.weigh_before_time === 0 && response.data.data.signs.weigh_before_time > 0)||(signin.weigh_time === 0 && response.data.data.signs.weigh_time > 0)){
|
|
486
|
+ if(this.schedules[j].type == this.patients[index].schedule.schedule_type){
|
|
487
|
+ if((signin.weigh_before_time == 0 && response.data.data.signs.weigh_before_time > 0)||(signin.weigh_time === 0 && response.data.data.signs.weigh_time > 0)){
|
543
|
488
|
this.schedules[j].sign++
|
544
|
489
|
}
|
545
|
|
- if(signin.weigh_before_time === 0 && response.data.data.signs.weigh_before_time > 0){
|
546
|
|
-
|
|
490
|
+ if(signin.weigh_before_time == 0 && response.data.data.signs.weigh_before_time > 0){
|
|
491
|
+
|
547
|
492
|
this.schedules[j].before++
|
548
|
493
|
}
|
549
|
|
- if(signin.weigh_time === 0 && response.data.data.signs.weigh_time > 0){
|
|
494
|
+ if(signin.weigh_time == 0 && response.data.data.signs.weigh_time > 0){
|
550
|
495
|
this.schedules[j].after++
|
551
|
496
|
}
|
552
|
497
|
}
|
|
@@ -561,7 +506,7 @@ export default {
|
561
|
506
|
return false
|
562
|
507
|
}
|
563
|
508
|
})
|
564
|
|
- }
|
|
509
|
+ }
|
565
|
510
|
},
|
566
|
511
|
watch: {
|
567
|
512
|
'weigh_form.weigh_before': function() {
|