See999 4 年之前
父節點
當前提交
53aa216d99
共有 1 個文件被更改,包括 72 次插入72 次删除
  1. 72 72
      src/xt_pages/medicalScheduling/schedulingStatistics.vue

+ 72 - 72
src/xt_pages/medicalScheduling/schedulingStatistics.vue 查看文件

@@ -584,89 +584,89 @@ export default {
584 584
 
585 585
 
586 586
                 let tempArr = [], newArr = []
587
-                    for (let i = 0; i < scheudleTotal.length; i++) {
588
-                        if (tempArr.indexOf(scheudleTotal[i].user_name) === -1) {
589
-                            newArr.push({
590
-                                user_name: scheudleTotal[i].user_name,
591
-                                doctor_id:scheudleTotal[i].doctor_id,
592
-                                list: [{class_name:scheudleTotal[i].class_name,doctor_id:scheudleTotal[i].doctor_id,Count:scheudleTotal[i].Count}]
593
-                            })
594
-                            tempArr.push(scheudleTotal[i].user_name);
595
-                        } else {
596
-                            for (let j = 0; j < newArr.length; j++) {
597
-                                if (newArr[j].user_name == scheudleTotal[i].user_name) {
598
-                                    newArr[j].list.push({class_name:scheudleTotal[i].class_name,doctor_id:scheudleTotal[i].doctor_id,Count:scheudleTotal[i].Count})
599
-                                }
587
+                for (let i = 0; i < scheudleTotal.length; i++) {
588
+                    if (tempArr.indexOf(scheudleTotal[i].user_name) === -1) {
589
+                        newArr.push({
590
+                            user_name: scheudleTotal[i].user_name,
591
+                            doctor_id:scheudleTotal[i].doctor_id,
592
+                            list: [{class_name:scheudleTotal[i].class_name,doctor_id:scheudleTotal[i].doctor_id,Count:scheudleTotal[i].Count}]
593
+                        })
594
+                        tempArr.push(scheudleTotal[i].user_name);
595
+                    } else {
596
+                        for (let j = 0; j < newArr.length; j++) {
597
+                            if (newArr[j].user_name == scheudleTotal[i].user_name) {
598
+                                newArr[j].list.push({class_name:scheudleTotal[i].class_name,doctor_id:scheudleTotal[i].doctor_id,Count:scheudleTotal[i].Count})
600 599
                             }
601 600
                         }
602 601
                     }
602
+                }
603 603
 
604
-                    newArr.map(item => {
605
-                        list.map(it => {
606
-                            if(item.doctor_id == it.doctor_id){
607
-                                item.totalminute = it.totalminute
608
-                            }
609
-                        })
604
+                newArr.map(item => {
605
+                    list.map(it => {
606
+                        if(item.doctor_id == it.doctor_id){
607
+                            item.totalminute = it.totalminute
608
+                        }
610 609
                     })
611
-                    newArr.map(item => {
612
-                        workday.map(it => {
613
-                            if(item.doctor_id == it.doctor_id){
614
-                                item.attendance = it.Count
615
-                            }
616
-                        })
610
+                })
611
+                newArr.map(item => {
612
+                    workday.map(it => {
613
+                        if(item.doctor_id == it.doctor_id){
614
+                            item.attendance = it.Count
615
+                        }
617 616
                     })
618
-                    newArr.map(item => {
619
-                        noWorkDay.map(it => {
620
-                            if(item.doctor_id == it.doctor_id){
621
-                                item.absence = it.Count
622
-                            }
623
-                        })
617
+                })
618
+                newArr.map(item => {
619
+                    noWorkDay.map(it => {
620
+                        if(item.doctor_id == it.doctor_id){
621
+                            item.absence = it.Count
622
+                        }
623
+                    })
624
+                })
625
+                
626
+                let arr = [...newArr]
627
+                if(val == 0){
628
+                    arr.sort(this.compare('doctor_id'))
629
+                    this.doctorlist.sort(this.compare('admin_user_id'))
630
+                    this.doctorlist.forEach((item, index) => {
631
+                      if (arr[index] && item.admin_user_id == arr[index].doctor_id) {
632
+                    
633
+                      }else{
634
+                        arr.splice(index, 0, {user_name: item.user_name, doctor_id: item.admin_user_id, list: []})
635
+                      }
624 636
                     })
625 637
                     
626
-                    let arr = [...newArr]
627
-                    if(val == 0){
628
-                        arr.sort(this.compare('doctor_id'))
629
-                        this.doctorlist.sort(this.compare('admin_user_id'))
630
-                        this.doctorlist.forEach((item, index) => {
631
-                          if (arr[index] && item.admin_user_id == arr[index].doctor_id) {
632
-                        
633
-                          }else{
634
-                            arr.splice(index, 0, {user_name: item.user_name, doctor_id: item.admin_user_id, list: []})
635
-                          }
636
-                        })
637
-                        
638 638
 
639
-                        console.log('newArr',arr)
640
-                        this.tableData = arr
641
-                    }else if(val == 2){
642
-                        arr.sort(this.compare('doctor_id'))
643
-                        this.doctorArr.sort(this.compare('admin_user_id'))
644
-                        this.doctorArr.forEach((item, index) => {
645
-                          if (arr[index] && item.admin_user_id == arr[index].doctor_id) {
646
-                        
647
-                          }else{
648
-                            arr.splice(index, 0, {user_name: item.user_name, doctor_id: item.admin_user_id, list: []})
649
-                          }
650
-                        })
651
-                        
639
+                    console.log('newArr',arr)
640
+                    this.tableData = arr
641
+                }else if(val == 2){
642
+                    arr.sort(this.compare('doctor_id'))
643
+                    this.doctorArr.sort(this.compare('admin_user_id'))
644
+                    this.doctorArr.forEach((item, index) => {
645
+                      if (arr[index] && item.admin_user_id == arr[index].doctor_id) {
646
+                    
647
+                      }else{
648
+                        arr.splice(index, 0, {user_name: item.user_name, doctor_id: item.admin_user_id, list: []})
649
+                      }
650
+                    })
651
+                    
652 652
 
653
-                        console.log('newArr',arr)
654
-                        this.tableData = arr
655
-                    }else if(val == 3){
656
-                        arr.sort(this.compare('doctor_id'))
657
-                        this.nurseArr.sort(this.compare('admin_user_id'))
658
-                        this.nurseArr.forEach((item, index) => {
659
-                          if (arr[index] && item.admin_user_id == arr[index].doctor_id) {
660
-                        
661
-                          }else{
662
-                            arr.splice(index, 0, {user_name: item.user_name, doctor_id: item.admin_user_id, list: []})
663
-                          }
664
-                        })
665
-                        
653
+                    console.log('newArr',arr)
654
+                    this.tableData = arr
655
+                }else if(val == 3){
656
+                    arr.sort(this.compare('doctor_id'))
657
+                    this.nurseArr.sort(this.compare('admin_user_id'))
658
+                    this.nurseArr.forEach((item, index) => {
659
+                      if (arr[index] && item.admin_user_id == arr[index].doctor_id) {
660
+                    
661
+                      }else{
662
+                        arr.splice(index, 0, {user_name: item.user_name, doctor_id: item.admin_user_id, list: []})
663
+                      }
664
+                    })
665
+                    
666 666
 
667
-                        console.log('newArr',arr)
668
-                        this.tableData = arr
669
-                    }
667
+                    console.log('newArr',arr)
668
+                    this.tableData = arr
669
+                }
670 670
                     
671 671
               }
672 672
             })