소스 검색

医护管理

XMLWAN 4 년 전
부모
커밋
4d3fae7fa6
1개의 변경된 파일34개의 추가작업 그리고 28개의 파일을 삭제
  1. 34 28
      src/xt_pages/medicalScheduling/schedulingStatistics.vue

+ 34 - 28
src/xt_pages/medicalScheduling/schedulingStatistics.vue 파일 보기

94
                 <el-table-column align="center" prop="address" label="总工时/小时">
94
                 <el-table-column align="center" prop="address" label="总工时/小时">
95
                    <template slot-scope="scope">
95
                    <template slot-scope="scope">
96
                         <span v-if="scope.row.totalminute">{{ scope.row.totalminute / 60 }}</span>
96
                         <span v-if="scope.row.totalminute">{{ scope.row.totalminute / 60 }}</span>
97
-                    </template> 
97
+                    </template>
98
                 </el-table-column>
98
                 </el-table-column>
99
                 <el-table-column align="center" prop="attendance" label="出勤/天">
99
                 <el-table-column align="center" prop="attendance" label="出勤/天">
100
                     <!-- <span v-if='scope.row.attendance'>{{ scope.row.attendance ? scope.row.attendance : '' }}</span> -->
100
                     <!-- <span v-if='scope.row.attendance'>{{ scope.row.attendance ? scope.row.attendance : '' }}</span> -->
275
 
275
 
276
         //获取所有排班种
276
         //获取所有排班种
277
         this.getScheduleList()
277
         this.getScheduleList()
278
-    
278
+
279
         // 获取统计表的数据
279
         // 获取统计表的数据
280
         this.getlist()
280
         this.getlist()
281
-        
281
+
282
         //获取统计图数据
282
         //获取统计图数据
283
         this.getchartlist()
283
         this.getchartlist()
284
-      
284
+
285
     },
285
     },
286
     methods:{
286
     methods:{
287
         getDoctorList(){
287
         getDoctorList(){
295
 
295
 
296
                 this.doctorlist.push(...nurselist)
296
                 this.doctorlist.push(...nurselist)
297
                 this.doctorlist.push(...doctorlist)
297
                 this.doctorlist.push(...doctorlist)
298
-                
298
+
299
                 console.log("医护列表",this.doctorlist)
299
                 console.log("医护列表",this.doctorlist)
300
              }
300
              }
301
-               
301
+
302
            })
302
            })
303
         },
303
         },
304
         //搜索
304
         //搜索
308
                this.end_time = this.getTimestamp(this.weekDayArr[6])
308
                this.end_time = this.getTimestamp(this.weekDayArr[6])
309
             }
309
             }
310
             const params = {
310
             const params = {
311
-              keyword:this.keywords, 
311
+              keyword:this.keywords,
312
+              start_time:this.start_time,
313
+              end_time:this.end_time,
312
             }
314
             }
313
             console.log("params",params)
315
             console.log("params",params)
314
             toSearchTotal(params).then(response=>{
316
             toSearchTotal(params).then(response=>{
315
              if(response.data.state == 1){
317
              if(response.data.state == 1){
316
-                var scheudleTotal = response.data.data.scheduletotal 
317
-                console.log("scheduletotal",scheudleTotal) 
318
+                var scheudleTotal = response.data.data.scheduletotal
319
+                console.log("scheduletotal",scheudleTotal)
318
                 var list = response.data.data.list
320
                 var list = response.data.data.list
319
                 console.log("list",list)
321
                 console.log("list",list)
320
                 var workday = response.data.data.workDay
322
                 var workday = response.data.data.workDay
362
                         }
364
                         }
363
                     })
365
                     })
364
                 })
366
                 })
365
-                
367
+
366
                 let arr = [...newArr]
368
                 let arr = [...newArr]
367
-                
369
+
368
                 if(this.keywords != ''){
370
                 if(this.keywords != ''){
369
                     this.tableData = arr
371
                     this.tableData = arr
370
                 }else {
372
                 }else {
372
                     this.doctorlist.sort(this.compare('admin_user_id'))
374
                     this.doctorlist.sort(this.compare('admin_user_id'))
373
                     this.doctorlist.forEach((item, index) => {
375
                     this.doctorlist.forEach((item, index) => {
374
                       if (arr[index] && item.admin_user_id == arr[index].doctor_id) {
376
                       if (arr[index] && item.admin_user_id == arr[index].doctor_id) {
375
-                    
377
+
376
                       }else{
378
                       }else{
377
                         arr.splice(index, 0, {user_name: item.user_name, doctor_id: item.admin_user_id, list: []})
379
                         arr.splice(index, 0, {user_name: item.user_name, doctor_id: item.admin_user_id, list: []})
378
                       }
380
                       }
381
                     this.tableData = arr
383
                     this.tableData = arr
382
                 }
384
                 }
383
               }
385
               }
384
-          })  
386
+          })
385
         },
387
         },
386
         formatDate(date){
388
         formatDate(date){
387
             var year = date.getFullYear()+'.'
389
             var year = date.getFullYear()+'.'
414
                 this.nowYear = this.nowYear - 1
416
                 this.nowYear = this.nowYear - 1
415
             }
417
             }
416
             this.weekNum = this.weekNum - 1
418
             this.weekNum = this.weekNum - 1
419
+            this.getlist()
417
         },
420
         },
418
         //下一周
421
         //下一周
419
         nextclick(){
422
         nextclick(){
427
                 this.weekNum = this.getYearWeek(year, month, date)
430
                 this.weekNum = this.getYearWeek(year, month, date)
428
                 this.nowYear = this.nowYear + 1
431
                 this.nowYear = this.nowYear + 1
429
             }
432
             }
433
+           this.getlist()
430
         },
434
         },
431
         getYearWeek(year,month,date){
435
         getYearWeek(year,month,date){
432
             /*
436
             /*
553
                             }
557
                             }
554
                         })
558
                         })
555
                     })
559
                     })
556
-                    
560
+
557
                     let arr = [...newArr]
561
                     let arr = [...newArr]
558
 
562
 
559
                     arr.sort(this.compare('doctor_id'))
563
                     arr.sort(this.compare('doctor_id'))
560
                     this.doctorlist.sort(this.compare('admin_user_id'))
564
                     this.doctorlist.sort(this.compare('admin_user_id'))
561
                     this.doctorlist.forEach((item, index) => {
565
                     this.doctorlist.forEach((item, index) => {
562
                       if (arr[index] && item.admin_user_id == arr[index].doctor_id) {
566
                       if (arr[index] && item.admin_user_id == arr[index].doctor_id) {
563
-                    
567
+
564
                       }else{
568
                       }else{
565
                         arr.splice(index, 0, {user_name: item.user_name, doctor_id: item.admin_user_id, list: []})
569
                         arr.splice(index, 0, {user_name: item.user_name, doctor_id: item.admin_user_id, list: []})
566
                       }
570
                       }
567
                     })
571
                     })
568
-                    
572
+
569
 
573
 
570
                     console.log('newArr',arr)
574
                     console.log('newArr',arr)
571
                     this.tableData = arr
575
                     this.tableData = arr
579
             }
583
             }
580
             const params = {
584
             const params = {
581
               doctor_type: parseInt(val),
585
               doctor_type: parseInt(val),
586
+              start_time:this.start_time,
587
+              end_time:this.end_time
582
             }
588
             }
583
-            console.log("params",params)
589
+            // console.log("params",params)
584
             changeOption(params).then(response=>{
590
             changeOption(params).then(response=>{
585
               if(response.data.state == 1){
591
               if(response.data.state == 1){
586
                 var scheudleTotal =  response.data.data.scheduletotal
592
                 var scheudleTotal =  response.data.data.scheduletotal
632
                             }
638
                             }
633
                         })
639
                         })
634
                     })
640
                     })
635
-                    
641
+
636
                     let arr = [...newArr]
642
                     let arr = [...newArr]
637
                     if(val == 0){
643
                     if(val == 0){
638
                         arr.sort(this.compare('doctor_id'))
644
                         arr.sort(this.compare('doctor_id'))
639
                         this.doctorlist.sort(this.compare('admin_user_id'))
645
                         this.doctorlist.sort(this.compare('admin_user_id'))
640
                         this.doctorlist.forEach((item, index) => {
646
                         this.doctorlist.forEach((item, index) => {
641
                           if (arr[index] && item.admin_user_id == arr[index].doctor_id) {
647
                           if (arr[index] && item.admin_user_id == arr[index].doctor_id) {
642
-                        
648
+
643
                           }else{
649
                           }else{
644
                             arr.splice(index, 0, {user_name: item.user_name, doctor_id: item.admin_user_id, list: []})
650
                             arr.splice(index, 0, {user_name: item.user_name, doctor_id: item.admin_user_id, list: []})
645
                           }
651
                           }
646
                         })
652
                         })
647
-                        
653
+
648
 
654
 
649
                         console.log('newArr',arr)
655
                         console.log('newArr',arr)
650
                         this.tableData = arr
656
                         this.tableData = arr
653
                         this.doctorArr.sort(this.compare('admin_user_id'))
659
                         this.doctorArr.sort(this.compare('admin_user_id'))
654
                         this.doctorArr.forEach((item, index) => {
660
                         this.doctorArr.forEach((item, index) => {
655
                           if (arr[index] && item.admin_user_id == arr[index].doctor_id) {
661
                           if (arr[index] && item.admin_user_id == arr[index].doctor_id) {
656
-                        
662
+
657
                           }else{
663
                           }else{
658
                             arr.splice(index, 0, {user_name: item.user_name, doctor_id: item.admin_user_id, list: []})
664
                             arr.splice(index, 0, {user_name: item.user_name, doctor_id: item.admin_user_id, list: []})
659
                           }
665
                           }
660
                         })
666
                         })
661
-                        
667
+
662
 
668
 
663
                         console.log('newArr',arr)
669
                         console.log('newArr',arr)
664
                         this.tableData = arr
670
                         this.tableData = arr
667
                         this.nurseArr.sort(this.compare('admin_user_id'))
673
                         this.nurseArr.sort(this.compare('admin_user_id'))
668
                         this.nurseArr.forEach((item, index) => {
674
                         this.nurseArr.forEach((item, index) => {
669
                           if (arr[index] && item.admin_user_id == arr[index].doctor_id) {
675
                           if (arr[index] && item.admin_user_id == arr[index].doctor_id) {
670
-                        
676
+
671
                           }else{
677
                           }else{
672
                             arr.splice(index, 0, {user_name: item.user_name, doctor_id: item.admin_user_id, list: []})
678
                             arr.splice(index, 0, {user_name: item.user_name, doctor_id: item.admin_user_id, list: []})
673
                           }
679
                           }
674
                         })
680
                         })
675
-                        
681
+
676
 
682
 
677
                         console.log('newArr',arr)
683
                         console.log('newArr',arr)
678
                         this.tableData = arr
684
                         this.tableData = arr
679
                     }
685
                     }
680
-                    
686
+
681
               }
687
               }
682
             })
688
             })
683
         },
689
         },
708
                                 }
714
                                 }
709
                             })
715
                             })
710
                         }
716
                         }
711
-                        
717
+
712
                     }
718
                     }
713
                 })
719
                 })
714
                 return Count
720
                 return Count
715
-            }   
721
+            }
716
         },
722
         },
717
         toPrint(){
723
         toPrint(){
718
             this.$router.push({
724
             this.$router.push({
719
                 path: '/medicalScheduling/statistics/print',
725
                 path: '/medicalScheduling/statistics/print',
720
                 // query: { date: date }
726
                 // query: { date: date }
721
-            }) 
727
+            })
722
         },
728
         },
723
         //获取统计图数据
729
         //获取统计图数据
724
         getchartlist(){
730
         getchartlist(){