|
@@ -81,7 +81,7 @@
|
81
|
81
|
<el-row :gutter="20">
|
82
|
82
|
<el-col :span="23" align="right" class="button">
|
83
|
83
|
<el-button @click="hide()">取消</el-button>
|
84
|
|
- <el-button @click="savedata();updatedata();sighdata();" type="primary">保存</el-button>
|
|
84
|
+ <el-button @click="updateSignweight();sighdata();" type="primary">保存</el-button>
|
85
|
85
|
</el-col>
|
86
|
86
|
</el-row>
|
87
|
87
|
</div>
|
|
@@ -93,7 +93,7 @@
|
93
|
93
|
</template>
|
94
|
94
|
|
95
|
95
|
<script>
|
96
|
|
-import { fetchSignPatients, getPatientSign, SignWeigh, getDialysisInforInfomation, getDialysisAfterInfomation, createdata, editdata, sighdata } from '@/api/signandweigh'
|
|
96
|
+import { fetchSignPatients, getPatientSign, SignWeigh, getDialysisInforInfomation, getDialysisAfterInfomation, createdata, updateSignweight,sighdata} from '@/api/signandweigh'
|
97
|
97
|
import BreadCrumb from '../components/bread-crumb'
|
98
|
98
|
export default {
|
99
|
99
|
name: 'sign',
|
|
@@ -279,48 +279,6 @@ export default {
|
279
|
279
|
//console.log("是否有数据",this.weigh_list.id)
|
280
|
280
|
// this.getsignweigh(row.id)
|
281
|
281
|
},
|
282
|
|
- // submitSign() {
|
283
|
|
- // SignWeigh(this.querySignParams, this.weigh_form).then(response => {
|
284
|
|
- // if (response.data.state === 1) {
|
285
|
|
- // this.$message({
|
286
|
|
- // type: 'success',
|
287
|
|
- // message: '成功!'
|
288
|
|
- // })
|
289
|
|
-
|
290
|
|
- // var tlen = this.patients.length
|
291
|
|
- // for (let index = 0; index < tlen; index++) {
|
292
|
|
- // if (this.patients[index].id === this.querySignParams.patient_id) {
|
293
|
|
- // var signin = this.patients[index].signin
|
294
|
|
- // this.patients[index].signin = response.data.data.sign
|
295
|
|
-
|
296
|
|
- // if (this.patients[index].schedule.id > 0 && (this.patients[index].schedule.schedule_type >= 1 || this.patients[index].schedule.schedule_type <= 3)) {
|
297
|
|
- // var sl = this.schedules.length
|
298
|
|
- // for (let j = 0; j < sl; j++) {
|
299
|
|
- // if (this.schedules[j].type === this.patients[index].schedule.schedule_type) {
|
300
|
|
- // if (this.weigh_form.id <= 0) {
|
301
|
|
- // this.schedules[j].sign++
|
302
|
|
- // }
|
303
|
|
- // if (signin.weigh_before_time === 0 && response.data.data.sign.weigh_before_time > 0) {
|
304
|
|
- // this.schedules[j].before++
|
305
|
|
- // }
|
306
|
|
-
|
307
|
|
- // if (signin.weigh_time === 0 && response.data.data.sign.weigh_time > 0) {
|
308
|
|
- // this.schedules[j].after++
|
309
|
|
- // }
|
310
|
|
- // }
|
311
|
|
- // }
|
312
|
|
- // }
|
313
|
|
- // break
|
314
|
|
- // }
|
315
|
|
- // }
|
316
|
|
- // this.weigh_form.id = response.data.data.sign.id
|
317
|
|
- // } else {
|
318
|
|
- // this.$message.error(response.data.msg)
|
319
|
|
- // return false
|
320
|
|
- // }
|
321
|
|
- // })
|
322
|
|
- // },
|
323
|
|
-
|
324
|
282
|
getDialysisInforInfomation(id) {
|
325
|
283
|
getDialysisInforInfomation(id).then(response => {
|
326
|
284
|
if (response.data.data.patientlist != null) {
|
|
@@ -404,49 +362,40 @@ export default {
|
404
|
362
|
this.show = true
|
405
|
363
|
this.disa = false
|
406
|
364
|
},
|
407
|
|
- savedata() {
|
|
365
|
+
|
|
366
|
+ updateSignweight() {
|
408
|
367
|
var params = new Object()
|
|
368
|
+ var data_time = this.querySignParams.date_time
|
|
369
|
+ params.date_time = data_time
|
409
|
370
|
params.patient_id = this.weigh_form.patient_id
|
410
|
371
|
params.dry_weight = this.weigh_list.dry_weight
|
411
|
372
|
params.weight_before = this.weigh_list.weight_before
|
412
|
373
|
params.temperature = this.weigh_list.temperature
|
413
|
374
|
params.pulse_frequency = this.weigh_list.pulse_frequency
|
414
|
|
- params.breathing_rate = this.weigh_list.breathing_rate
|
415
|
375
|
params.systolic_blood_pressure = this.weigh_list.systolic_blood_pressure
|
416
|
376
|
params.diastolic_blood_pressure = this.weigh_list.diastolic_blood_pressure
|
417
|
|
- createdata(params).then(response => {
|
418
|
|
- if (response.data.state === 1) {
|
419
|
|
- this.$message({
|
|
377
|
+
|
|
378
|
+ params.patient_id = this.weigh_form.patient_id
|
|
379
|
+ params.weight_after = this.weigh_infor.weight_after
|
|
380
|
+ params.temperatureafter = this.weigh_infor.temperature
|
|
381
|
+ params.pulse_frequencyafter = this.weigh_infor.pulse_frequency
|
|
382
|
+ params.systolic_blood_pressureafter = this.weigh_infor.systolic_blood_pressure
|
|
383
|
+ params.diastolic_blood_pressureafter = this.weigh_infor.diastolic_blood_pressure
|
|
384
|
+ console.log("干体重:"+ params.dry_weight)
|
|
385
|
+ updateSignweight(params).then(response =>{
|
|
386
|
+ if(response.data.state ===1){
|
|
387
|
+ this.$message({
|
420
|
388
|
type: 'success',
|
421
|
389
|
message: '成功!'
|
422
|
|
- })
|
423
|
|
- }
|
|
390
|
+ })
|
|
391
|
+ }
|
424
|
392
|
})
|
|
393
|
+ console.log("params数据",params)
|
425
|
394
|
},
|
426
|
395
|
hide() {
|
427
|
396
|
this.show = false
|
428
|
397
|
},
|
429
|
|
- updatedata() {
|
430
|
|
- var params = new Object()
|
431
|
|
- params.patient_id = this.weigh_form.patient_id
|
432
|
|
- params.dry_weight = this.weigh_infor.dry_weight
|
433
|
|
- params.weight_after = this.weigh_infor.weight_after
|
434
|
|
- params.temperature = this.weigh_infor.temperature
|
435
|
|
- params.pulse_frequency = this.weigh_infor.pulse_frequency
|
436
|
|
- params.breathing_rate = this.weigh_infor.breathing_rate
|
437
|
|
- params.systolic_blood_pressure = this.weigh_infor.systolic_blood_pressure
|
438
|
|
- params.diastolic_blood_pressure = this.weigh_infor.diastolic_blood_pressure
|
439
|
|
- editdata(params).then(response => {
|
440
|
|
- if (response.data.state === 1) {
|
441
|
|
- this.$message({
|
442
|
|
- type: 'success',
|
443
|
|
- message: '成功!'
|
444
|
|
- })
|
445
|
|
- }
|
446
|
|
- })
|
447
|
|
- console.log('hahahahah')
|
448
|
|
- console.log(params)
|
449
|
|
- },
|
|
398
|
+
|
450
|
399
|
sighdata() {
|
451
|
400
|
// 透前数据
|
452
|
401
|
var params = new Object()
|
|
@@ -465,13 +414,12 @@ export default {
|
465
|
414
|
params.weight_after = this.weigh_infor.weight_after
|
466
|
415
|
params.temperatureafter = this.weigh_infor.temperature
|
467
|
416
|
params.pulse_frequencyafter = this.weigh_infor.pulse_frequency
|
468
|
|
- params.breathing_rateafter = this.weigh_infor.breathing_rate
|
469
|
417
|
params.systolic_blood_pressureafter = this.weigh_infor.systolic_blood_pressure
|
470
|
418
|
params.diastolic_blood_pressureafter = this.weigh_infor.diastolic_blood_pressure
|
471
|
419
|
console.log('params是什么?', params)
|
472
|
420
|
sighdata(params).then(response => {
|
473
|
421
|
var signs = response.data.data.signs
|
474
|
|
- // this.patients[this.table_current_index].signin.id = 1
|
|
422
|
+ console.log("signs是什么?",signs)
|
475
|
423
|
if (response.data.state === 1) {
|
476
|
424
|
this.$message({
|
477
|
425
|
type: 'success',
|