Browse Source

医护管理

XMLWAN 4 years ago
parent
commit
4d3fae7fa6
1 changed files with 34 additions and 28 deletions
  1. 34 28
      src/xt_pages/medicalScheduling/schedulingStatistics.vue

+ 34 - 28
src/xt_pages/medicalScheduling/schedulingStatistics.vue View File

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