Selaa lähdekoodia

Merge branch '20200710_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20200710_pc_vue_new_branch

csx 5 vuotta sitten
vanhempi
commit
c0d9ca2cc5

+ 1 - 26
src/xt_pages/medicalScheduling/class.vue Näytä tiedosto

380
            getDoctorScheduleList(params).then(response=>{
380
            getDoctorScheduleList(params).then(response=>{
381
               if(response.data.state == 1){
381
               if(response.data.state == 1){
382
                  var schedules = response.data.data.schedules
382
                  var schedules = response.data.data.schedules
383
-                  console.log("schedules",schedules)
384
                  for(let i=0;i<schedules.length;i++){
383
                  for(let i=0;i<schedules.length;i++){
385
                     if(schedules[i].class_attributes == 1){
384
                     if(schedules[i].class_attributes == 1){
386
                         schedules[i].class_attributes ="出勤"
385
                         schedules[i].class_attributes ="出勤"
429
         getScheduleDetail(id).then(response=>{
428
         getScheduleDetail(id).then(response=>{
430
            if(response.data.state == 1){
429
            if(response.data.state == 1){
431
              var scheduleDetail = response.data.data.scheduleDetail
430
              var scheduleDetail = response.data.data.scheduleDetail
432
-             console.log("scheduledetail",scheduleDetail)
433
              this.form.id = scheduleDetail.id
431
              this.form.id = scheduleDetail.id
434
              this.form.class_name = scheduleDetail.class_name
432
              this.form.class_name = scheduleDetail.class_name
435
              this.form.class_attributes = scheduleDetail.class_attributes
433
              this.form.class_attributes = scheduleDetail.class_attributes
546
         },
544
         },
547
      changtime(){
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
         var longtime = 0
547
         var longtime = 0
553
         var timeone = 0
548
         var timeone = 0
554
         var timetwo = 0
549
         var timetwo = 0
564
           var timeone =  this.timeDifference(this.form.timeone_start,oneHours)
559
           var timeone =  this.timeDifference(this.form.timeone_start,oneHours)
565
          timeone = timeone
560
          timeone = timeone
566
         }
561
         }
567
-       console.log("时间选择1时长",this.timeStamp(timeone))
562
+     
568
                 
563
                 
569
         //时间选择2的时间差
564
         //时间选择2的时间差
570
         if(this.form.timetwo_type == 1){
565
         if(this.form.timetwo_type == 1){
578
             var timetwo =  this.timeDifference(this.form.timetwo_start,oneHours)
573
             var timetwo =  this.timeDifference(this.form.timetwo_start,oneHours)
579
             timetwo = timetwo
574
             timetwo = timetwo
580
         }
575
         }
581
-          console.log("timetwo",timetwo)
582
-          console.log("时间选择2时长",this,this.timeStamp(timetwo))
583
                   
576
                   
584
         longtime = timeone + timetwo
577
         longtime = timeone + timetwo
585
-        console.log("longtime",longtime)
586
         this.form.work_time = this.timeStamp(longtime)
578
         this.form.work_time = this.timeStamp(longtime)
587
      },
579
      },
588
      changtimeTwo(){
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
         var longtime = 0
582
         var longtime = 0
594
         var timeone = 0
583
         var timeone = 0
595
         var timetwo = 0
584
         var timetwo = 0
605
           var timeone =  this.timeDifference(this.form.timeone_start,oneHours)
594
           var timeone =  this.timeDifference(this.form.timeone_start,oneHours)
606
          timeone = timeone
595
          timeone = timeone
607
         }
596
         }
608
-       console.log("时间选择1时长",this.timeStamp(timeone))
609
                 
597
                 
610
         //时间选择2的时间差
598
         //时间选择2的时间差
611
         if(this.form.timetwo_type == 1){
599
         if(this.form.timetwo_type == 1){
619
             var timetwo =  this.timeDifference(this.form.timetwo_start,oneHours)
607
             var timetwo =  this.timeDifference(this.form.timetwo_start,oneHours)
620
             timetwo = timetwo
608
             timetwo = timetwo
621
         }
609
         }
622
-          console.log("timetwo",timetwo)
623
-          console.log("时间选择2时长",this,this.timeStamp(timetwo))
624
                   
610
                   
625
         longtime = timeone + timetwo
611
         longtime = timeone + timetwo
626
-        console.log("longtime",longtime)
627
         this.form.work_time = this.timeStamp(longtime) 
612
         this.form.work_time = this.timeStamp(longtime) 
628
      }
613
      }
629
     },
614
     },
631
         //获取班种列表
616
         //获取班种列表
632
         this.getList()
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
 </script>
620
 </script>
646
 <style scoped>
621
 <style scoped>

+ 19 - 26
src/xt_pages/medicalScheduling/index.vue Näytä tiedosto

40
             </div>
40
             </div>
41
             <div class="schedulingTable" style="display:flex;justify-content: space-between;">
41
             <div class="schedulingTable" style="display:flex;justify-content: space-between;">
42
                 <div style="width: 70%">
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
                         <el-table-column prop="name" label="医护姓名" style="width:16%" align="center">
44
                         <el-table-column prop="name" label="医护姓名" style="width:16%" align="center">
45
                             <template slot-scope="scope">
45
                             <template slot-scope="scope">
46
                                  {{scope.row.user_name}}
46
                                  {{scope.row.user_name}}
51
                                 <div @click="hangdleClick(scope.row,scope.$index,0)">
51
                                 <div @click="hangdleClick(scope.row,scope.$index,0)">
52
                                     <el-dropdown trigger="click" @command="changeSchedule">
52
                                     <el-dropdown trigger="click" @command="changeSchedule">
53
                                         <span class="el-dropdown-link">
53
                                         <span class="el-dropdown-link">
54
-                                        {{ getClass(scope.row.user_name,1) }}<i class="el-icon-arrow-down el-icon--right"></i>
54
+                                        {{ getClass(scope.row.user_name,1) }}<i v-if="getTimestamp(weekDayArr[0])>=timeNow?true:false" class="el-icon-arrow-down el-icon--right"></i>
55
                                         </span>
55
                                         </span>
56
                                         <el-dropdown-menu slot="dropdown" >
56
                                         <el-dropdown-menu slot="dropdown" >
57
                                             <el-dropdown-item  :command="item.id" icon="el-icon-plus" :disabled="getTimestamp(weekDayArr[0])<timeNow?true:false" v-for="(item,index) in schedulelist" :key="index">{{item.class_name}}</el-dropdown-item>
57
                                             <el-dropdown-item  :command="item.id" icon="el-icon-plus" :disabled="getTimestamp(weekDayArr[0])<timeNow?true:false" v-for="(item,index) in schedulelist" :key="index">{{item.class_name}}</el-dropdown-item>
65
                                 <div @click="hangdleClick(scope.row,scope.$index,1)">
65
                                 <div @click="hangdleClick(scope.row,scope.$index,1)">
66
                                     <el-dropdown trigger="click" @command="changeSchedule">
66
                                     <el-dropdown trigger="click" @command="changeSchedule">
67
                                         <span class="el-dropdown-link">
67
                                         <span class="el-dropdown-link">
68
-                                        {{ getClass(scope.row.user_name,2) }}<i class="el-icon-arrow-down el-icon--right"></i>
68
+                                        {{ getClass(scope.row.user_name,2) }}<i v-if="getTimestamp(weekDayArr[1])>=timeNow?true:false" class="el-icon-arrow-down el-icon--right"></i>
69
                                         </span>
69
                                         </span>
70
                                         <el-dropdown-menu slot="dropdown" >
70
                                         <el-dropdown-menu slot="dropdown" >
71
                                             <el-dropdown-item  :command="item.id" icon="el-icon-plus" :disabled="getTimestamp(weekDayArr[1])<timeNow?true:false" v-for="(item,index) in schedulelist" :key="index">{{item.class_name}}</el-dropdown-item>
71
                                             <el-dropdown-item  :command="item.id" icon="el-icon-plus" :disabled="getTimestamp(weekDayArr[1])<timeNow?true:false" v-for="(item,index) in schedulelist" :key="index">{{item.class_name}}</el-dropdown-item>
79
                                 <div @click="hangdleClick(scope.row,scope.$index,2)">
79
                                 <div @click="hangdleClick(scope.row,scope.$index,2)">
80
                                     <el-dropdown trigger="click" @command="changeSchedule">
80
                                     <el-dropdown trigger="click" @command="changeSchedule">
81
                                         <span class="el-dropdown-link">
81
                                         <span class="el-dropdown-link">
82
-                                        {{ getClass(scope.row.user_name,3) }}<i class="el-icon-arrow-down el-icon--right"></i>
82
+                                        {{ getClass(scope.row.user_name,3) }}<i v-if="getTimestamp(weekDayArr[2])>=timeNow?true:false" class="el-icon-arrow-down el-icon--right"></i>
83
                                         </span>
83
                                         </span>
84
                                         <el-dropdown-menu slot="dropdown" >
84
                                         <el-dropdown-menu slot="dropdown" >
85
                                             <el-dropdown-item  :command="item.id" icon="el-icon-plus" :disabled="getTimestamp(weekDayArr[2])<timeNow?true:false" v-for="(item,index) in schedulelist" :key="index">{{item.class_name}}</el-dropdown-item>
85
                                             <el-dropdown-item  :command="item.id" icon="el-icon-plus" :disabled="getTimestamp(weekDayArr[2])<timeNow?true:false" v-for="(item,index) in schedulelist" :key="index">{{item.class_name}}</el-dropdown-item>
93
                                 <div @click="hangdleClick(scope.row,scope.$index,3)">
93
                                 <div @click="hangdleClick(scope.row,scope.$index,3)">
94
                                     <el-dropdown trigger="click" @command="changeSchedule">
94
                                     <el-dropdown trigger="click" @command="changeSchedule">
95
                                         <span class="el-dropdown-link">
95
                                         <span class="el-dropdown-link">
96
-                                        {{ getClass(scope.row.user_name,4) }}<i class="el-icon-arrow-down el-icon--right"></i>
96
+                                        {{ getClass(scope.row.user_name,4) }}<i v-if="getTimestamp(weekDayArr[3])>=timeNow?true:false" class="el-icon-arrow-down el-icon--right"></i>
97
                                         </span>
97
                                         </span>
98
                                         <el-dropdown-menu slot="dropdown" >
98
                                         <el-dropdown-menu slot="dropdown" >
99
                                             <el-dropdown-item  :command="item.id" icon="el-icon-plus" :disabled="getTimestamp(weekDayArr[3])<timeNow?true:false" v-for="(item,index) in schedulelist" :key="index">{{item.class_name}}</el-dropdown-item>
99
                                             <el-dropdown-item  :command="item.id" icon="el-icon-plus" :disabled="getTimestamp(weekDayArr[3])<timeNow?true:false" v-for="(item,index) in schedulelist" :key="index">{{item.class_name}}</el-dropdown-item>
107
                                 <div @click="hangdleClick(scope.row,scope.$index,4)">
107
                                 <div @click="hangdleClick(scope.row,scope.$index,4)">
108
                                     <el-dropdown trigger="click" @command="changeSchedule">
108
                                     <el-dropdown trigger="click" @command="changeSchedule">
109
                                         <span class="el-dropdown-link">
109
                                         <span class="el-dropdown-link">
110
-                                        {{ getClass(scope.row.user_name,5) }}<i class="el-icon-arrow-down el-icon--right"></i>
110
+                                        {{ getClass(scope.row.user_name,5) }}<i v-if="getTimestamp(weekDayArr[4])>=timeNow?true:false" class="el-icon-arrow-down el-icon--right"></i>
111
                                         </span>
111
                                         </span>
112
                                         <el-dropdown-menu slot="dropdown" >
112
                                         <el-dropdown-menu slot="dropdown" >
113
                                             <el-dropdown-item  :command="item.id" icon="el-icon-plus" :disabled="getTimestamp(weekDayArr[4])<timeNow?true:false" v-for="(item,index) in schedulelist" :key="index">{{item.class_name}}</el-dropdown-item>
113
                                             <el-dropdown-item  :command="item.id" icon="el-icon-plus" :disabled="getTimestamp(weekDayArr[4])<timeNow?true:false" v-for="(item,index) in schedulelist" :key="index">{{item.class_name}}</el-dropdown-item>
121
                                 <div @click="hangdleClick(scope.row,scope.$index,5)">
121
                                 <div @click="hangdleClick(scope.row,scope.$index,5)">
122
                                     <el-dropdown trigger="click" @command="changeSchedule">
122
                                     <el-dropdown trigger="click" @command="changeSchedule">
123
                                         <span class="el-dropdown-link">
123
                                         <span class="el-dropdown-link">
124
-                                        {{ getClass(scope.row.user_name,6) }}<i class="el-icon-arrow-down el-icon--right"></i>
124
+                                        {{ getClass(scope.row.user_name,6) }}<i v-if="getTimestamp(weekDayArr[5])>=timeNow?true:false" class="el-icon-arrow-down el-icon--right"></i>
125
                                         </span>
125
                                         </span>
126
                                         <el-dropdown-menu slot="dropdown" >
126
                                         <el-dropdown-menu slot="dropdown" >
127
                                             <el-dropdown-item  :command="item.id" icon="el-icon-plus" :disabled="getTimestamp(weekDayArr[5])<timeNow?true:false" v-for="(item,index) in schedulelist" :key="index">{{item.class_name}}</el-dropdown-item>
127
                                             <el-dropdown-item  :command="item.id" icon="el-icon-plus" :disabled="getTimestamp(weekDayArr[5])<timeNow?true:false" v-for="(item,index) in schedulelist" :key="index">{{item.class_name}}</el-dropdown-item>
135
                                 <div @click="hangdleClick(scope.row,scope.$index,6)">
135
                                 <div @click="hangdleClick(scope.row,scope.$index,6)">
136
                                     <el-dropdown trigger="click" @command="changeSchedule">
136
                                     <el-dropdown trigger="click" @command="changeSchedule">
137
                                         <span class="el-dropdown-link">
137
                                         <span class="el-dropdown-link">
138
-                                        {{ getClass(scope.row.user_name,0) }}<i class="el-icon-arrow-down el-icon--right"></i>
138
+                                        {{ getClass(scope.row.user_name,0) }}<i v-if="getTimestamp(weekDayArr[6])>=timeNow?true:false" class="el-icon-arrow-down el-icon--right"></i>
139
                                         </span>
139
                                         </span>
140
                                         <el-dropdown-menu slot="dropdown" >
140
                                         <el-dropdown-menu slot="dropdown" >
141
                                             <el-dropdown-item  :command="item.id" icon="el-icon-plus" :disabled="getTimestamp(weekDayArr[6])<timeNow?true:false" v-for="(item,index) in schedulelist" :key="index">{{item.class_name}}</el-dropdown-item>
141
                                             <el-dropdown-item  :command="item.id" icon="el-icon-plus" :disabled="getTimestamp(weekDayArr[6])<timeNow?true:false" v-for="(item,index) in schedulelist" :key="index">{{item.class_name}}</el-dropdown-item>
244
         search(){},
244
         search(){},
245
         toPrint(){
245
         toPrint(){
246
             this.$router.push({
246
             this.$router.push({
247
-                path: '/medicalScheduling/schedule/print?starttime='+this.getTimestamp(this.weekDayArr[0])+"&endtime="+this.getTimestamp(this.weekDayArr[6]),
247
+                path: '/medicalScheduling/schedule/print?starttime='+this.getTimestamp(this.weekDayArr[0])+"&endtime="+this.getTimestamp(this.weekDayArr[6])+"&weekArr="+ this.weekDayArr,
248
                 // query: { date: date }
248
                 // query: { date: date }
249
             })
249
             })
250
         },
250
         },
450
             getStaffScheduleList(params).then(response=>{
450
             getStaffScheduleList(params).then(response=>{
451
                 if(response.data.state == 1){
451
                 if(response.data.state == 1){
452
                     var staffList =  response.data.data.staffList
452
                     var staffList =  response.data.data.staffList
453
-                   console.log("所有排班数据",staffList)
454
                     for(let i=0;i<staffList.length;i++){
453
                     for(let i=0;i<staffList.length;i++){
455
                     if(staffList[i].schedule_week == 0){
454
                     if(staffList[i].schedule_week == 0){
456
                         staffList[i].class_index = 0
455
                         staffList[i].class_index = 0
474
                         staffList[i].class_index = 6
473
                         staffList[i].class_index = 6
475
                     }
474
                     }
476
                     }
475
                     }
477
-                    console.log("staffList--------",staffList)
478
                     let tempArr = [], newArr = []
476
                     let tempArr = [], newArr = []
479
                     for (let i = 0; i < staffList.length; i++) {
477
                     for (let i = 0; i < staffList.length; i++) {
480
                         if (tempArr.indexOf(staffList[i].user_name) === -1) {
478
                         if (tempArr.indexOf(staffList[i].user_name) === -1) {
501
                     
499
                     
502
                       }else{
500
                       }else{
503
                         arr.splice(index, 0, {user_name: item.user_name, admin_user_id: item.admin_user_id, list: [],user_type:item.user_type})
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
                     console.log("arr=======",arr)
504
                     console.log("arr=======",arr)
626
                             // console.log("arr",arr)
623
                             // console.log("arr",arr)
627
                           }
624
                           }
628
                         })
625
                         })
629
-                        console.log("全部=======",arr)
630
                         arr.sort(this.compare('user_type'))
626
                         arr.sort(this.compare('user_type'))
631
                         this.tableData = arr
627
                         this.tableData = arr
632
                     }
628
                     }
675
         })
671
         })
676
         },
672
         },
677
         toSearch(){
673
         toSearch(){
678
-            console.log("医护人员姓名",this.keywords)
679
-            
680
             const params = {
674
             const params = {
681
             user_name: this.keywords,
675
             user_name: this.keywords,
682
             start_time:this.getTimestamp(this.weekDayArr[0]),
676
             start_time:this.getTimestamp(this.weekDayArr[0]),
685
             toSearchScheduleList(params).then(response=>{
679
             toSearchScheduleList(params).then(response=>{
686
                 if(response.data.state == 1){
680
                 if(response.data.state == 1){
687
                     var staffList =  response.data.data.staffList
681
                     var staffList =  response.data.data.staffList
688
-                    console.log("stafflist",staffList)
689
                     let tempArr = [], newArr = []
682
                     let tempArr = [], newArr = []
690
                     for (let i = 0; i < staffList.length; i++) {
683
                     for (let i = 0; i < staffList.length; i++) {
691
                         if (tempArr.indexOf(staffList[i].user_name) === -1) {
684
                         if (tempArr.indexOf(staffList[i].user_name) === -1) {
729
             start_time:this.getTimestamp(this.weekDayArr[0]),
722
             start_time:this.getTimestamp(this.weekDayArr[0]),
730
             end_time:this.getTimestamp(this.weekDayArr[6])
723
             end_time:this.getTimestamp(this.weekDayArr[6])
731
             }
724
             }
732
-            console.log("params",params)
733
             this.$confirm(
725
             this.$confirm(
734
             '是否要清除当周排班? <br>清除后,信息将无法恢复',
726
             '是否要清除当周排班? <br>清除后,信息将无法恢复',
735
             '删除提示',
727
             '删除提示',
780
             UpdateContinusSchedule(params).then(response=>{
772
             UpdateContinusSchedule(params).then(response=>{
781
                 if(response.data.state == 1){
773
                 if(response.data.state == 1){
782
                 var schedule =  response.data.data.schedule
774
                 var schedule =  response.data.data.schedule
783
-                console.log("schedule",schedule)
784
                 this.$message.success("保存成功")
775
                 this.$message.success("保存成功")
785
                 }
776
                 }
786
             })
777
             })
798
             this.currentFirstDate1 = num + 1
789
             this.currentFirstDate1 = num + 1
799
         },
790
         },
800
         submitAction(formName){
791
         submitAction(formName){
801
-            console.log("数据",this.typeOptions)
802
-            console.log("2222",this.timeOptions)
803
             var label = ""
792
             var label = ""
804
             for(let i=0;i<this.timeOptions.length;i++){
793
             for(let i=0;i<this.timeOptions.length;i++){
805
                if(this.form.copyWeek == this.timeOptions[i].value){
794
                if(this.form.copyWeek == this.timeOptions[i].value){
808
             }
797
             }
809
            var start = label.split('~')
798
            var start = label.split('~')
810
            var copy_startime = this.getTimestamp(start[0])   
799
            var copy_startime = this.getTimestamp(start[0])   
811
-           console.log("copy_startime",copy_startime)   
812
            var copy_endtime = this.getTimestamp(start[1]) 
800
            var copy_endtime = this.getTimestamp(start[1]) 
813
-           console.log("copy_endtime",copy_endtime)
814
 
801
 
815
             const params = {
802
             const params = {
816
               start_time:this.getTimestamp(this.weekDayArr[0]),
803
               start_time:this.getTimestamp(this.weekDayArr[0]),
818
               copy_startime:copy_startime,
805
               copy_startime:copy_startime,
819
               copy_endtime:copy_endtime,
806
               copy_endtime:copy_endtime,
820
             }
807
             }
821
-            console.log("params",params)
822
            this.$refs[formName].validate(valid=>{
808
            this.$refs[formName].validate(valid=>{
823
               if(valid){
809
               if(valid){
824
                 copyStaffSchedule(params).then(response=>{
810
                 copyStaffSchedule(params).then(response=>{
825
                    if(response.data.state == 1){
811
                    if(response.data.state == 1){
826
                      var msg = response.data.data.msg
812
                      var msg = response.data.data.msg
827
-                     console.log("msg",msg)
828
                      this.$message.success("复制成功")
813
                      this.$message.success("复制成功")
829
                      this.newVisible = false
814
                      this.newVisible = false
830
                    }else{
815
                    }else{
841
                 return value2 - value1;
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
     created(){
840
     created(){
846
         //获取医护人员
841
         //获取医护人员
877
             
872
             
878
         }
873
         }
879
       var now = moment().locale('zh-cn').format('YYYY-MM-DD 00:00:00')
874
       var now = moment().locale('zh-cn').format('YYYY-MM-DD 00:00:00')
880
-      console.log('now',now)
881
       this.timeNow = this.getTimestamp(now)
875
       this.timeNow = this.getTimestamp(now)
882
-      console.log("timenow",this.timeNow)
883
       
876
       
884
     }
877
     }
885
 }
878
 }

+ 24 - 15
src/xt_pages/medicalScheduling/medical_print.vue Näytä tiedosto

22
                             <thead>
22
                             <thead>
23
                                 <tr>
23
                                 <tr>
24
                                     <td width="120">医护姓名</td>
24
                                     <td width="120">医护姓名</td>
25
-                                    <td width="120">周一</td>
26
-                                    <td width="120">周二</td>
27
-                                    <td width="120">周三</td>
28
-                                    <td width="120">周四</td>
29
-                                    <td width="120">周五</td>
30
-                                    <td width="120">周六</td>
31
-                                    <td width="120">周日</td>
25
+                                    <td width="120">周一<br />({{ weekArr[0] }})</td>
26
+                                    <td width="120">周二<br />({{ weekArr[1] }})</td>
27
+                                    <td width="120">周三<br />({{ weekArr[2] }})</td>
28
+                                    <td width="120">周四<br />({{ weekArr[3] }})</td>
29
+                                    <td width="120">周五<br />({{ weekArr[4] }})</td>
30
+                                    <td width="120">周六<br />({{ weekArr[5] }})</td>
31
+                                    <td width="120">周日<br />({{ weekArr[6] }})</td>
32
                                 </tr>
32
                                 </tr>
33
                             </thead>
33
                             </thead>
34
                             <tbody>
34
                             <tbody>
74
     },
74
     },
75
     methods:{
75
     methods:{
76
       printAction: function() {
76
       printAction: function() {
77
-          const style = '@media print { .print_main_content { background-color: white; width:960px;  margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 20px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 18px; padding: 10px 5px; } .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } }'
77
+          const style = '@media print { .print_main_content { background-color: white; width:960px;  margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 16px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 16px; padding: 10px 5px; white-space: pre-line;} .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } }'
78
 
78
 
79
           printJS({
79
           printJS({
80
           printable: 'print_content',
80
           printable: 'print_content',
87
       getDoctorList(){
87
       getDoctorList(){
88
         getDoctorList().then(response=>{
88
         getDoctorList().then(response=>{
89
           var list =  response.data.data.list
89
           var list =  response.data.data.list
90
-          console.log("医护列表",list)
91
           this.doctorlist = list
90
           this.doctorlist = list
92
           this.getStaffScheduleList()
91
           this.getStaffScheduleList()
93
         })
92
         })
101
          getStaffScheduleList(params).then(response=>{
100
          getStaffScheduleList(params).then(response=>{
102
             if(response.data.state == 1){
101
             if(response.data.state == 1){
103
               var staffList = response.data.data.staffList
102
               var staffList = response.data.data.staffList
104
-              console.log("staffList",staffList)
105
 
103
 
106
               let tempArr = [], newArr = []
104
               let tempArr = [], newArr = []
107
               for (let i = 0; i < staffList.length; i++) {
105
               for (let i = 0; i < staffList.length; i++) {
129
               
127
               
130
                 }else{
128
                 }else{
131
                   arr.splice(index, 0, {user_name: item.user_name, admin_user_id: item.admin_user_id, list: [],user_type:item.user_type})
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
               arr.sort(this.compare('user_type'))
132
               arr.sort(this.compare('user_type'))
133
+              console.log("表哥数据----------",arr)
136
               this.tableData = arr
134
               this.tableData = arr
137
               
135
               
138
             }
136
             }
152
               } 
150
               } 
153
             }
151
             }
154
           })
152
           })
155
-          return newClass
153
+          if(newClass.indexOf("(") > -1){
154
+            let num = newClass.indexOf("(")
155
+            let a = newClass.slice(0, num) + '\n' + newClass.slice(num)
156
+            return a
157
+          }else if(newClass.indexOf("(") > -1) {
158
+            let num = newClass.indexOf("(")
159
+            let a = newClass.slice(0, num) + '\n' + newClass.slice(num)
160
+            return a
161
+          }else{
162
+            return newClass
163
+          }
164
+          
156
         }
165
         }
157
       },
166
       },
158
       getNowFormatDate() {
167
       getNowFormatDate() {
180
     },
189
     },
181
     created(){
190
     created(){
182
       var starttime =  this.$route.query.starttime
191
       var starttime =  this.$route.query.starttime
183
-      console.log("starttime",starttime)
184
       this.start_time = starttime
192
       this.start_time = starttime
185
       var endtime =  this.$route.query.endtime
193
       var endtime =  this.$route.query.endtime
186
-      console.log("endtime",endtime)
187
       this.end_time = endtime
194
       this.end_time = endtime
195
+      this.weekArr = this.$route.query.weekArr.split(',')
188
       //获取该机构所有医护人员
196
       //获取该机构所有医护人员
189
       this.getDoctorList()
197
       this.getDoctorList()
190
     }
198
     }
214
       border: 1px solid;
222
       border: 1px solid;
215
       border-collapse: collapse;
223
       border-collapse: collapse;
216
       padding: 2px;
224
       padding: 2px;
225
+      
217
 
226
 
218
       thead {
227
       thead {
219
         tr {
228
         tr {
232
             text-align: center;
241
             text-align: center;
233
             font-size: 18px;
242
             font-size: 18px;
234
             padding: 10px 5px;
243
             padding: 10px 5px;
235
-
244
+            white-space: pre-line;
236
             .proj {
245
             .proj {
237
               padding: 5px 0;
246
               padding: 5px 0;
238
               text-align: left;
247
               text-align: left;