|
@@ -311,6 +311,11 @@ export default {
|
311
|
311
|
}
|
312
|
312
|
},
|
313
|
313
|
methods: {
|
|
314
|
+ handleStartTimeChange(){
|
|
315
|
+ this.getlist()
|
|
316
|
+ }, handleEndTimeChange(){
|
|
317
|
+ this.getlist()
|
|
318
|
+ },
|
314
|
319
|
handleSizeChange(limit) {
|
315
|
320
|
this.tableData = []
|
316
|
321
|
this.listQuery.limit = limit
|
|
@@ -329,6 +334,7 @@ export default {
|
329
|
334
|
this.$message.error('结束时间不能小于开始时间')
|
330
|
335
|
this.listQuery.start_time = ''
|
331
|
336
|
} else {
|
|
337
|
+ this.getlist()
|
332
|
338
|
|
333
|
339
|
}
|
334
|
340
|
|
|
@@ -340,6 +346,7 @@ export default {
|
340
|
346
|
this.$message.error('结束时间不能小于开始时间')
|
341
|
347
|
this.listQuery.end_time = ''
|
342
|
348
|
} else {
|
|
349
|
+ this.getlist()
|
343
|
350
|
|
344
|
351
|
}
|
345
|
352
|
},
|
|
@@ -516,7 +523,7 @@ export default {
|
516
|
523
|
// }
|
517
|
524
|
// }
|
518
|
525
|
// }
|
519
|
|
-
|
|
526
|
+
|
520
|
527
|
} else {
|
521
|
528
|
this.isLoadingTwo = false
|
522
|
529
|
|
|
@@ -529,7 +536,7 @@ export default {
|
529
|
536
|
if (response.data.state == 1) {
|
530
|
537
|
this.isLoadingTwo = false
|
531
|
538
|
var patients = response.data.data.patients
|
532
|
|
-
|
|
539
|
+
|
533
|
540
|
this.tablePatients = patients
|
534
|
541
|
|
535
|
542
|
// let dataInfothree = {}
|
|
@@ -552,7 +559,7 @@ export default {
|
552
|
559
|
var control = response.data.data.control
|
553
|
560
|
|
554
|
561
|
var infectiousControl = response.data.data.infectiousControl
|
555
|
|
-
|
|
562
|
+
|
556
|
563
|
infectiousControl.map(item => {
|
557
|
564
|
control.push(item)
|
558
|
565
|
})
|
|
@@ -572,18 +579,22 @@ export default {
|
572
|
579
|
// 分页
|
573
|
580
|
for (let i = 0; i < control.length; i++) {
|
574
|
581
|
for (let j = 0; j < patients.length; j++) {
|
575
|
|
- if (control[i].inspect_date == patients[j].inspect_date) {
|
|
582
|
+ if (control[i].patient_id == patients[j].patient_id) {
|
576
|
583
|
newArr.push(control[i])
|
577
|
584
|
}
|
578
|
585
|
}
|
579
|
586
|
}
|
|
587
|
+ console.log(newArr)
|
|
588
|
+
|
|
589
|
+ console.log("newArr")
|
|
590
|
+
|
|
591
|
+
|
580
|
592
|
|
581
|
593
|
let dataInfo = {}
|
582
|
594
|
newArr.forEach((item, index) => {
|
583
|
|
- let { inspect_date } = item
|
584
|
|
- if (!dataInfo[inspect_date]) {
|
585
|
|
- dataInfo[inspect_date] = {
|
586
|
|
- inspect_date,
|
|
595
|
+ let { patient_id } = item
|
|
596
|
+ if (!dataInfo[patient_id]) {
|
|
597
|
+ dataInfo[patient_id] = {
|
587
|
598
|
name: item.name,
|
588
|
599
|
child: [],
|
589
|
600
|
patient_id: item.patient_id,
|
|
@@ -593,14 +604,17 @@ export default {
|
593
|
604
|
})
|
594
|
605
|
let list = Object.values(dataInfo)
|
595
|
606
|
|
|
607
|
+
|
596
|
608
|
list.map(item => {
|
597
|
609
|
for (let i = 0; i < newArr.length; i++) {
|
598
|
|
- if (item.inspect_date == newArr[i].inspect_date) {
|
|
610
|
+ if (item.patient_id == newArr[i].patient_id) {
|
599
|
611
|
item.child.push(newArr[i])
|
600
|
612
|
}
|
601
|
613
|
}
|
602
|
614
|
})
|
603
|
615
|
|
|
616
|
+
|
|
617
|
+
|
604
|
618
|
var newarrtwo = []
|
605
|
619
|
list.map(item => {
|
606
|
620
|
item.child.map(it => {
|
|
@@ -608,6 +622,11 @@ export default {
|
608
|
622
|
})
|
609
|
623
|
})
|
610
|
624
|
|
|
625
|
+ console.log("list")
|
|
626
|
+ console.log(list)
|
|
627
|
+ console.log(newarrtwo)
|
|
628
|
+
|
|
629
|
+
|
611
|
630
|
// 配置的才显示
|
612
|
631
|
var arrthree = []
|
613
|
632
|
for (let i = 0; i < newarrtwo.length; i++) {
|
|
@@ -624,27 +643,28 @@ export default {
|
624
|
643
|
arrthree.push(item)
|
625
|
644
|
})
|
626
|
645
|
|
|
646
|
+
|
|
647
|
+
|
627
|
648
|
var dd = {}
|
628
|
649
|
for (const index in arrthree) {
|
629
|
|
- if (!(arrthree[index].inspect_date in dd)) {
|
630
|
|
- dd[arrthree[index].inspect_date] = {}
|
|
650
|
+ if (!(arrthree[index].patient_id in dd)) {
|
|
651
|
+ dd[arrthree[index].patient_id] = {}
|
631
|
652
|
}
|
632
|
|
- if (!(arrthree[index].item_name in dd[arrthree[index].inspect_date]) && arrthree[index].item_name != 0) {
|
633
|
|
- dd[arrthree[index].inspect_date][arrthree[index].item_name] = arrthree[index]
|
|
653
|
+ if (!(arrthree[index].item_name in dd[arrthree[index].patient_id]) && arrthree[index].item_name != 0) {
|
|
654
|
+ dd[arrthree[index].patient_id][arrthree[index].item_name] = arrthree[index]
|
634
|
655
|
|
635
|
656
|
}
|
636
|
657
|
}
|
637
|
658
|
|
638
|
659
|
let dataInfotwo = {}
|
639
|
660
|
newArr.forEach((item, index) => {
|
640
|
|
- let { inspect_date } = item
|
641
|
|
- if (!dataInfotwo[inspect_date]) {
|
642
|
|
- dataInfotwo[inspect_date] = {
|
643
|
|
- inspect_date,
|
|
661
|
+ let { patient_id } = item
|
|
662
|
+ if (!dataInfotwo[patient_id]) {
|
|
663
|
+ dataInfotwo[patient_id] = {
|
|
664
|
+ patient_id,
|
644
|
665
|
name: item.name,
|
645
|
666
|
inspect_value: item.inspect_value,
|
646
|
667
|
id: item.id,
|
647
|
|
- inspect_date: item.inspect_date
|
648
|
668
|
}
|
649
|
669
|
}
|
650
|
670
|
})
|
|
@@ -666,13 +686,14 @@ export default {
|
666
|
686
|
|
667
|
687
|
listtwo.map(item => {
|
668
|
688
|
this.tableData.map(it => {
|
669
|
|
- if (item.inspect_date == parseInt(it.name)) {
|
|
689
|
+ if (item.patient_id == parseInt(it.name)) {
|
670
|
690
|
it.name = item.name
|
671
|
691
|
it.id = item.id
|
672
|
692
|
it.inspect_date = item.inspect_date
|
673
|
693
|
}
|
674
|
694
|
})
|
675
|
695
|
})
|
|
696
|
+
|
676
|
697
|
for (let i = 0; i < this.patientsArr.length; i++) {
|
677
|
698
|
for (let j = 0; j < this.tableData.length; j++) {
|
678
|
699
|
if (this.patientsArr[i].name == this.tableData[j].name) {
|