Browse Source

医护管理

XMLWAN 4 years ago
parent
commit
0110f2c4a5

+ 1 - 26
src/xt_pages/medicalScheduling/class.vue View File

@@ -380,7 +380,6 @@ export default {
380 380
            getDoctorScheduleList(params).then(response=>{
381 381
               if(response.data.state == 1){
382 382
                  var schedules = response.data.data.schedules
383
-                  console.log("schedules",schedules)
384 383
                  for(let i=0;i<schedules.length;i++){
385 384
                     if(schedules[i].class_attributes == 1){
386 385
                         schedules[i].class_attributes ="出勤"
@@ -429,7 +428,6 @@ export default {
429 428
         getScheduleDetail(id).then(response=>{
430 429
            if(response.data.state == 1){
431 430
              var scheduleDetail = response.data.data.scheduleDetail
432
-             console.log("scheduledetail",scheduleDetail)
433 431
              this.form.id = scheduleDetail.id
434 432
              this.form.class_name = scheduleDetail.class_name
435 433
              this.form.class_attributes = scheduleDetail.class_attributes
@@ -546,9 +544,6 @@ export default {
546 544
         },
547 545
      changtime(){
548 546
          //计算时长
549
-        console.log("timeone",this.form.timeone_start)
550
-        console.log("timeonend",this.form.timeone_end)
551
-        console.log("timeonetype",this.form.timeone_type)
552 547
         var longtime = 0
553 548
         var timeone = 0
554 549
         var timetwo = 0
@@ -564,7 +559,7 @@ export default {
564 559
           var timeone =  this.timeDifference(this.form.timeone_start,oneHours)
565 560
          timeone = timeone
566 561
         }
567
-       console.log("时间选择1时长",this.timeStamp(timeone))
562
+     
568 563
                 
569 564
         //时间选择2的时间差
570 565
         if(this.form.timetwo_type == 1){
@@ -578,18 +573,12 @@ export default {
578 573
             var timetwo =  this.timeDifference(this.form.timetwo_start,oneHours)
579 574
             timetwo = timetwo
580 575
         }
581
-          console.log("timetwo",timetwo)
582
-          console.log("时间选择2时长",this,this.timeStamp(timetwo))
583 576
                   
584 577
         longtime = timeone + timetwo
585
-        console.log("longtime",longtime)
586 578
         this.form.work_time = this.timeStamp(longtime)
587 579
      },
588 580
      changtimeTwo(){
589 581
            //计算时长
590
-        console.log("timeone",this.form.timeone_start)
591
-        console.log("timeonend",this.form.timeone_end)
592
-        console.log("timeonetype",this.form.timeone_type)
593 582
         var longtime = 0
594 583
         var timeone = 0
595 584
         var timetwo = 0
@@ -605,7 +594,6 @@ export default {
605 594
           var timeone =  this.timeDifference(this.form.timeone_start,oneHours)
606 595
          timeone = timeone
607 596
         }
608
-       console.log("时间选择1时长",this.timeStamp(timeone))
609 597
                 
610 598
         //时间选择2的时间差
611 599
         if(this.form.timetwo_type == 1){
@@ -619,11 +607,8 @@ export default {
619 607
             var timetwo =  this.timeDifference(this.form.timetwo_start,oneHours)
620 608
             timetwo = timetwo
621 609
         }
622
-          console.log("timetwo",timetwo)
623
-          console.log("时间选择2时长",this,this.timeStamp(timetwo))
624 610
                   
625 611
         longtime = timeone + timetwo
626
-        console.log("longtime",longtime)
627 612
         this.form.work_time = this.timeStamp(longtime) 
628 613
      }
629 614
     },
@@ -631,16 +616,6 @@ export default {
631 616
         //获取班种列表
632 617
         this.getList()
633 618
     },
634
-    watch: {
635
-    //  监听对象数据变化
636
-    work_time: {
637
-      handler(newVal, oldVal) {
638
-        console.log(newVal)
639
-        console,log(oldVal)
640
-      },
641
-      deep: true  // 非常非常重要,这个是深度监听,默认是false。true的时候才能监听到对象的变化
642
-    }
643
-   }
644 619
 }
645 620
 </script>
646 621
 <style scoped>

+ 11 - 18
src/xt_pages/medicalScheduling/index.vue View File

@@ -40,7 +40,7 @@
40 40
             </div>
41 41
             <div class="schedulingTable" style="display:flex;justify-content: space-between;">
42 42
                 <div style="width: 70%">
43
-                    <el-table :data="tableData" border :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)', color: '#606266'}" :row-style="{ color: '#303133' }"  @cell-click="clickThis">
43
+                    <el-table :data="tableData" border :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)', color: '#606266'}" :row-style="{ color: '#303133' }"  @cell-click="clickThis" :cell-style="tableCellStyle">
44 44
                         <el-table-column prop="name" label="医护姓名" style="width:16%" align="center">
45 45
                             <template slot-scope="scope">
46 46
                                  {{scope.row.user_name}}
@@ -450,7 +450,6 @@ export default {
450 450
             getStaffScheduleList(params).then(response=>{
451 451
                 if(response.data.state == 1){
452 452
                     var staffList =  response.data.data.staffList
453
-                   console.log("所有排班数据",staffList)
454 453
                     for(let i=0;i<staffList.length;i++){
455 454
                     if(staffList[i].schedule_week == 0){
456 455
                         staffList[i].class_index = 0
@@ -474,7 +473,6 @@ export default {
474 473
                         staffList[i].class_index = 6
475 474
                     }
476 475
                     }
477
-                    console.log("staffList--------",staffList)
478 476
                     let tempArr = [], newArr = []
479 477
                     for (let i = 0; i < staffList.length; i++) {
480 478
                         if (tempArr.indexOf(staffList[i].user_name) === -1) {
@@ -501,7 +499,6 @@ export default {
501 499
                     
502 500
                       }else{
503 501
                         arr.splice(index, 0, {user_name: item.user_name, admin_user_id: item.admin_user_id, list: [],user_type:item.user_type})
504
-                        // console.log("arr",arr)
505 502
                       }
506 503
                     })
507 504
                     console.log("arr=======",arr)
@@ -626,7 +623,6 @@ export default {
626 623
                             // console.log("arr",arr)
627 624
                           }
628 625
                         })
629
-                        console.log("全部=======",arr)
630 626
                         arr.sort(this.compare('user_type'))
631 627
                         this.tableData = arr
632 628
                     }
@@ -675,8 +671,6 @@ export default {
675 671
         })
676 672
         },
677 673
         toSearch(){
678
-            console.log("医护人员姓名",this.keywords)
679
-            
680 674
             const params = {
681 675
             user_name: this.keywords,
682 676
             start_time:this.getTimestamp(this.weekDayArr[0]),
@@ -685,7 +679,6 @@ export default {
685 679
             toSearchScheduleList(params).then(response=>{
686 680
                 if(response.data.state == 1){
687 681
                     var staffList =  response.data.data.staffList
688
-                    console.log("stafflist",staffList)
689 682
                     let tempArr = [], newArr = []
690 683
                     for (let i = 0; i < staffList.length; i++) {
691 684
                         if (tempArr.indexOf(staffList[i].user_name) === -1) {
@@ -729,7 +722,6 @@ export default {
729 722
             start_time:this.getTimestamp(this.weekDayArr[0]),
730 723
             end_time:this.getTimestamp(this.weekDayArr[6])
731 724
             }
732
-            console.log("params",params)
733 725
             this.$confirm(
734 726
             '是否要清除当周排班? <br>清除后,信息将无法恢复',
735 727
             '删除提示',
@@ -780,7 +772,6 @@ export default {
780 772
             UpdateContinusSchedule(params).then(response=>{
781 773
                 if(response.data.state == 1){
782 774
                 var schedule =  response.data.data.schedule
783
-                console.log("schedule",schedule)
784 775
                 this.$message.success("保存成功")
785 776
                 }
786 777
             })
@@ -798,8 +789,6 @@ export default {
798 789
             this.currentFirstDate1 = num + 1
799 790
         },
800 791
         submitAction(formName){
801
-            console.log("数据",this.typeOptions)
802
-            console.log("2222",this.timeOptions)
803 792
             var label = ""
804 793
             for(let i=0;i<this.timeOptions.length;i++){
805 794
                if(this.form.copyWeek == this.timeOptions[i].value){
@@ -808,9 +797,7 @@ export default {
808 797
             }
809 798
            var start = label.split('~')
810 799
            var copy_startime = this.getTimestamp(start[0])   
811
-           console.log("copy_startime",copy_startime)   
812 800
            var copy_endtime = this.getTimestamp(start[1]) 
813
-           console.log("copy_endtime",copy_endtime)
814 801
 
815 802
             const params = {
816 803
               start_time:this.getTimestamp(this.weekDayArr[0]),
@@ -818,13 +805,11 @@ export default {
818 805
               copy_startime:copy_startime,
819 806
               copy_endtime:copy_endtime,
820 807
             }
821
-            console.log("params",params)
822 808
            this.$refs[formName].validate(valid=>{
823 809
               if(valid){
824 810
                 copyStaffSchedule(params).then(response=>{
825 811
                    if(response.data.state == 1){
826 812
                      var msg = response.data.data.msg
827
-                     console.log("msg",msg)
828 813
                      this.$message.success("复制成功")
829 814
                      this.newVisible = false
830 815
                    }else{
@@ -841,6 +826,16 @@ export default {
841 826
                 return value2 - value1;
842 827
             }
843 828
         },
829
+       tableCellStyle (row, rowIndex, column) {
830
+         var week = (row.column.label).split('');
831
+         var weeks = week[4]+week[5]+week[6]+week[7]+week[8]+week[9]+week[10]+week[11]+week[12]
832
+        //  console.log("week",week)
833
+         console.log("weeks",weeks)
834
+         var weekdate =  this.getTimestamp(weeks)
835
+         if(weekdate  < this.timeNow){
836
+           return 'background-color:#e5e5e5;'
837
+          }
838
+       },
844 839
     },
845 840
     created(){
846 841
         //获取医护人员
@@ -877,9 +872,7 @@ export default {
877 872
             
878 873
         }
879 874
       var now = moment().locale('zh-cn').format('YYYY-MM-DD 00:00:00')
880
-      console.log('now',now)
881 875
       this.timeNow = this.getTimestamp(now)
882
-      console.log("timenow",this.timeNow)
883 876
       
884 877
     }
885 878
 }

+ 1 - 5
src/xt_pages/medicalScheduling/medical_print.vue View File

@@ -87,7 +87,6 @@ export default {
87 87
       getDoctorList(){
88 88
         getDoctorList().then(response=>{
89 89
           var list =  response.data.data.list
90
-          console.log("医护列表",list)
91 90
           this.doctorlist = list
92 91
           this.getStaffScheduleList()
93 92
         })
@@ -101,7 +100,6 @@ export default {
101 100
          getStaffScheduleList(params).then(response=>{
102 101
             if(response.data.state == 1){
103 102
               var staffList = response.data.data.staffList
104
-              console.log("staffList",staffList)
105 103
 
106 104
               let tempArr = [], newArr = []
107 105
               for (let i = 0; i < staffList.length; i++) {
@@ -129,11 +127,10 @@ export default {
129 127
               
130 128
                 }else{
131 129
                   arr.splice(index, 0, {user_name: item.user_name, admin_user_id: item.admin_user_id, list: [],user_type:item.user_type})
132
-                  // console.log("arr",arr)
133 130
                 }
134 131
               })
135 132
               arr.sort(this.compare('user_type'))
136
-              
133
+              console.log("表哥数据----------",arr)
137 134
               this.tableData = arr
138 135
               
139 136
             }
@@ -196,7 +193,6 @@ export default {
196 193
       var endtime =  this.$route.query.endtime
197 194
       this.end_time = endtime
198 195
       this.weekArr = this.$route.query.weekArr.split(',')
199
-      console.log(22222222222,this.$route.query.weekArr.split(','))
200 196
       //获取该机构所有医护人员
201 197
       this.getDoctorList()
202 198
     }