|
@@ -289,12 +289,15 @@ export default {
|
289
|
289
|
},
|
290
|
290
|
methods: {
|
291
|
291
|
handleSizeChange(limit){
|
|
292
|
+ this.tableData = []
|
292
|
293
|
this.listQuery.limit = limit
|
|
294
|
+
|
293
|
295
|
this.getlist()
|
|
296
|
+
|
294
|
297
|
},
|
295
|
298
|
handleCurrentChange(page){
|
|
299
|
+ this.tableData = []
|
296
|
300
|
this.listQuery.page = page
|
297
|
|
-
|
298
|
301
|
this.getlist()
|
299
|
302
|
},
|
300
|
303
|
changeTime() {
|
|
@@ -490,7 +493,7 @@ export default {
|
490
|
493
|
getPatientsControl(this.lapstor,this.listQuery.start_time,this.listQuery.end_time,this.listQuery.page,this.listQuery.limit).then(response=>{
|
491
|
494
|
if(response.data.state == 1){
|
492
|
495
|
var patients = response.data.data.patients
|
493
|
|
-
|
|
496
|
+ console.log("patients",patients)
|
494
|
497
|
this.tablePatients = patients
|
495
|
498
|
var total = response.data.data.total
|
496
|
499
|
this.total = total
|
|
@@ -644,101 +647,32 @@ export default {
|
644
|
647
|
}
|
645
|
648
|
return result;
|
646
|
649
|
},
|
647
|
|
-
|
|
650
|
+ //统计柱状图
|
648
|
651
|
getCartogramlist(){
|
649
|
652
|
getCartogramlist(this.lapstor,this.listQuery.start_time,this.listQuery.end_time,this.limit,this.page).then(response=>{
|
650
|
653
|
if(response.data.state == 1){
|
651
|
|
- var cartogramlist = response.data.data.cartogramlist
|
652
|
|
- console.log("cartogramlist",cartogramlist)
|
653
|
|
- var totaltwo = response.data.data.total
|
654
|
|
- // console.log("totaltwo",totaltwo)
|
655
|
|
- var infectiouscontrol = response.data.data.infectiouscontrol
|
656
|
|
- // console.log("infectiouscontrol",infectiouscontrol)
|
657
|
|
- infectiouscontrol.map(item=>{
|
658
|
|
- cartogramlist.push(item)
|
659
|
|
- })
|
660
|
|
- var cart = []
|
661
|
|
- // console.log("已配置的选项",this.normData)
|
662
|
|
- //过滤已经配置的选项
|
663
|
|
- for(let i=0;i<cartogramlist.length;i++){
|
664
|
|
- for(let j=0;j<this.normData.length;j++){
|
665
|
|
- if(cartogramlist[i].item_id == this.normData[j].inspection_minor){
|
666
|
|
- cart.push(cartogramlist[i])
|
667
|
|
- }
|
668
|
|
- }
|
669
|
|
- }
|
670
|
|
- let dataInfo = {}
|
671
|
|
- cart.forEach((item, index) => {
|
672
|
|
- let { patient_id } = item
|
673
|
|
- if (!dataInfo[patient_id]) {
|
674
|
|
- dataInfo[patient_id] = {
|
675
|
|
- patient_id,
|
676
|
|
- name:item.name,
|
677
|
|
- child: [],
|
678
|
|
- inspect_date:item.inspect_date,
|
679
|
|
- total:0,
|
680
|
|
- count:0,
|
681
|
|
- infectotal:0,
|
682
|
|
- }
|
683
|
|
- }
|
684
|
|
- })
|
685
|
|
- let list = Object.values(dataInfo)
|
686
|
|
-
|
|
654
|
+ var total = response.data.data.total
|
|
655
|
+
|
|
656
|
+ var standtotal = response.data.data.standtotal
|
|
657
|
+
|
|
658
|
+ var standtotalone = response.data.data.standtotalOne
|
687
|
659
|
|
688
|
|
- var arr = []
|
689
|
|
- list.map(item=>{
|
690
|
|
- for(let i=0;i<cart.length;i++){
|
691
|
|
- if(item.inspect_date == cart[i].inspect_date && item.patient_id == cart[i].patient_id){
|
692
|
|
- item.child.push(cart[i])
|
693
|
|
- }
|
694
|
|
- }
|
695
|
|
- })
|
696
|
|
-
|
697
|
|
-
|
698
|
|
- // console.log("list",list)
|
699
|
|
- list.map(item=>{
|
700
|
|
- item.child.map(it=>{
|
701
|
|
- // console.log("长度",item.child.length)
|
702
|
|
- // console.log("it",it)
|
703
|
|
- if(it.range_type == 1 && parseInt(it.range_min)<=parseInt(it.inspect_value) && parseInt(it.inspect_value)<=parseInt(it.range_max)){
|
704
|
|
- item.total ++
|
705
|
|
- }
|
706
|
|
- if(it.range_type == 2 && it.inspect_value == it.range_value){
|
707
|
|
- item.infectotal ++
|
708
|
|
- }
|
709
|
|
- })
|
710
|
|
- })
|
711
|
|
- // console.log("list",list)
|
712
|
|
- var standardTotal = 0
|
713
|
|
-
|
714
|
|
- list.map(item=>{
|
715
|
|
- if((item.total +item.infectotal) == item.child.length){
|
716
|
|
- item.count ++
|
717
|
|
- }
|
718
|
|
- })
|
719
|
|
- list.map(item=>{
|
720
|
|
- standardTotal += item.count
|
721
|
|
- })
|
722
|
|
- var totalCount = list.length
|
723
|
|
- // console.log("arr",list)
|
724
|
|
- // console.log("合格",standardTotal)
|
725
|
|
- // console.log("总人数",totalCount)
|
|
660
|
+
|
726
|
661
|
for(let i=0;i<this.dataCount.length;i++){
|
727
|
|
- this.dataCount[0].count = standardTotal
|
728
|
|
- this.dataCount[1].count = totalCount - standardTotal
|
|
662
|
+ this.dataCount[0].count = standtotal + standtotalone
|
|
663
|
+ this.dataCount[1].count = total -standtotal - standtotalone
|
729
|
664
|
this.obj.push(this.dataCount[i].count)
|
730
|
665
|
}
|
731
|
666
|
// console.log("dataCount",this.dataCount)
|
732
|
|
- for (let i = 0; i < this.dataName.length; i++) {
|
733
|
|
- this.modesData.xAxis.push(this.dataName[i].name)
|
734
|
|
-
|
735
|
|
- }
|
736
|
|
- for (let i = 0; i < this.dataCount.length; i++) {
|
737
|
|
- this.modesData.series.push(((this.dataCount[i].count / totalCount) * 100).toFixed(1))
|
|
667
|
+ for (let i = 0; i < this.dataName.length; i++) {
|
|
668
|
+ this.modesData.xAxis.push(this.dataName[i].name)
|
|
669
|
+ }
|
|
670
|
+ for (let i = 0; i < this.dataCount.length; i++) {
|
|
671
|
+ this.modesData.series.push(((this.dataCount[i].count / total) * 100).toFixed(1))
|
738
|
672
|
}
|
739
|
673
|
this.chart.series[0].data = this.modesData.series
|
740
|
674
|
this.chart.xAxis.data = this.modesData.xAxis
|
741
|
|
- // console.log("this",this.modesData)
|
|
675
|
+
|
742
|
676
|
}
|
743
|
677
|
})
|
744
|
678
|
},
|