Просмотр исходного кода

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

see999 4 лет назад
Родитель
Сommit
98e7edf88a
2 измененных файлов: 239 добавлений и 51 удалений
  1. 21 27
      src/xt_pages/workforce/appointment.vue
  2. 218 24
      src/xt_pages/workforce/components/tableData.vue

+ 21 - 27
src/xt_pages/workforce/appointment.vue Просмотреть файл

290
             return false
290
             return false
291
           }
291
           }
292
           var partitions = response.data.data.partitions
292
           var partitions = response.data.data.partitions
293
-          console.log("分区",partitions)
293
+          // console.log("分区",partitions)
294
           this.theWeek.thisWeek = response.data.data.theWeek
294
           this.theWeek.thisWeek = response.data.data.theWeek
295
           this.theWeek.lastWeek = this.theWeek.thisWeek - 1
295
           this.theWeek.lastWeek = this.theWeek.thisWeek - 1
296
           this.theWeek.nextWeek = this.theWeek.thisWeek + 1
296
           this.theWeek.nextWeek = this.theWeek.thisWeek + 1
510
             }
510
             }
511
             i++
511
             i++
512
           }
512
           }
513
-          console.log("listw22222222",list)
514
             var data = []
513
             var data = []
515
 
514
 
516
           this.tableList.map(item=>{
515
           this.tableList.map(item=>{
517
             data.push(Object.values(item))
516
             data.push(Object.values(item))
518
 
517
 
519
           })
518
           })
520
-          console.log("data",data)
519
+        
521
           
520
           
522
           const filename = '排班模版'
521
           const filename = '排班模版'
523
         
522
         
532
           }
531
           }
533
           
532
           
534
           if(this.export_type == 1){
533
           if(this.export_type == 1){
535
-
536
-            console.log("44444444",this.tableList)
537
             //  const multiHeader = [['区号', '机号', '周一'+"("+this.newDay[0]+")" , '', '', '周二'+"("+this.newDay[1]+")", '', '', '周三'+"("+this.newDay[2]+")" , '', '', '周四'+"("+this.newDay[3]+")" , '', '', '周五'+"("+this.newDay[4]+")" , '', '', '周六'+"("+this.newDay[5]+")" , '', '', '周日'+"("+this.newDay[6]+")" , '', '', '周一'+"("+this.days[7]+")" , '', '', '周二'+"("+this.days[8]+")" , '', '', '周三'+"("+this.days[9]+")" , '', '', '周四'+"("+this.days[10]+")" , '', '', '周五'+"("+this.days[11]+")" , '', '', '周六'+"("+this.days[12]+")" , '', '', '周日'+"("+this.days[13]+")", '', '', '周一'+"("+this.days[14]+")", '', '', '周二'+"("+this.days[15]+")", '', '', '周三'+"("+this.days[16]+")", '', '', '周四'+"("+this.days[17]+")", '', '', '周五'+"("+this.days[18]+")", '', '', '周六'+"("+this.days[19]+")", '', '', '周日'+"("+this.days[20]+")", '', '']]
534
             //  const multiHeader = [['区号', '机号', '周一'+"("+this.newDay[0]+")" , '', '', '周二'+"("+this.newDay[1]+")", '', '', '周三'+"("+this.newDay[2]+")" , '', '', '周四'+"("+this.newDay[3]+")" , '', '', '周五'+"("+this.newDay[4]+")" , '', '', '周六'+"("+this.newDay[5]+")" , '', '', '周日'+"("+this.newDay[6]+")" , '', '', '周一'+"("+this.days[7]+")" , '', '', '周二'+"("+this.days[8]+")" , '', '', '周三'+"("+this.days[9]+")" , '', '', '周四'+"("+this.days[10]+")" , '', '', '周五'+"("+this.days[11]+")" , '', '', '周六'+"("+this.days[12]+")" , '', '', '周日'+"("+this.days[13]+")", '', '', '周一'+"("+this.days[14]+")", '', '', '周二'+"("+this.days[15]+")", '', '', '周三'+"("+this.days[16]+")", '', '', '周四'+"("+this.days[17]+")", '', '', '周五'+"("+this.days[18]+")", '', '', '周六'+"("+this.days[19]+")", '', '', '周日'+"("+this.days[20]+")", '', '']]
538
             //  const header = ['', '', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上']
535
             //  const header = ['', '', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上']
539
             //  const merges = ['A1:A2', 'B1:B2', 'C1:E1', 'F1:H1', 'I1:K1', 'L1:N1', 'O1:Q1', 'R1:T1', 'U1:W1', 'X1:Z1', 'AA1:AC1', 'AD1:AF1', 'AG1:AI1', 'AJ1:AL1', 'AM1:AO1', 'AP1:AR1', 'AS1:AU1', 'AV1:AX1', 'AY1:BA1', 'BB1:BD1', 'BE1:BG1', 'BH1:BJ1', 'BK1:BM1']
536
             //  const merges = ['A1:A2', 'B1:B2', 'C1:E1', 'F1:H1', 'I1:K1', 'L1:N1', 'O1:Q1', 'R1:T1', 'U1:W1', 'X1:Z1', 'AA1:AC1', 'AD1:AF1', 'AG1:AI1', 'AJ1:AL1', 'AM1:AO1', 'AP1:AR1', 'AS1:AU1', 'AV1:AX1', 'AY1:BA1', 'BB1:BD1', 'BE1:BG1', 'BH1:BJ1', 'BK1:BM1']
569
               data.push(Object.values(item))
566
               data.push(Object.values(item))
570
 
567
 
571
             })
568
             })
572
-            console.log("data",data)
569
+            // console.log("data",data)
573
             
570
             
574
             const filename = '排班模版'
571
             const filename = '排班模版'
575
            
572
            
596
           const merges = ['A1:A2', 'B1:B2', 'C1:E1', 'F1:H1', 'I1:K1', 'L1:N1', 'O1:Q1', 'R1:T1', 'U1:W1', 'X1:Z1', 'AA1:AC1', 'AD1:AF1', 'AG1:AI1', 'AJ1:AL1', 'AM1:AO1', 'AP1:AR1', 'AS1:AU1', 'AV1:AX1', 'AY1:BA1', 'BB1:BD1', 'BE1:BG1', 'BH1:BJ1', 'BK1:BM1']
593
           const merges = ['A1:A2', 'B1:B2', 'C1:E1', 'F1:H1', 'I1:K1', 'L1:N1', 'O1:Q1', 'R1:T1', 'U1:W1', 'X1:Z1', 'AA1:AC1', 'AD1:AF1', 'AG1:AI1', 'AJ1:AL1', 'AM1:AO1', 'AP1:AR1', 'AS1:AU1', 'AV1:AX1', 'AY1:BA1', 'BB1:BD1', 'BE1:BG1', 'BH1:BJ1', 'BK1:BM1']
597
 
594
 
598
           var data = []
595
           var data = []
599
-          console.log("33333",this.tableList)
596
+          // console.log("33333",this.tableList)
600
          
597
          
601
          this.tableList.map(item=>{
598
          this.tableList.map(item=>{
602
            data.push(Object.values(item))
599
            data.push(Object.values(item))
621
       formatJson(filterVal, jsonData) {
618
       formatJson(filterVal, jsonData) {
622
         return jsonData.map(v =>
619
         return jsonData.map(v =>
623
           filterVal.map(j => {
620
           filterVal.map(j => {
624
-            console.log(v)
625
-            console.log(j)
626
-            console.log(v[j])
627
-
621
+        
628
             if (j === 'timestamp') {
622
             if (j === 'timestamp') {
629
               return parseTime(v[j])
623
               return parseTime(v[j])
630
             } else {
624
             } else {
2133
               partition_id:this.partition_id,
2127
               partition_id:this.partition_id,
2134
               schedule_type:this.schedule_type
2128
               schedule_type:this.schedule_type
2135
             }
2129
             }
2136
-           console.log("params2222",params)
2130
+          //  console.log("params2222",params)
2137
          getThreeWeekList(params).then(response=>{
2131
          getThreeWeekList(params).then(response=>{
2138
            if(response.data.state == 1){
2132
            if(response.data.state == 1){
2139
              var partitions =  response.data.data.partitions
2133
              var partitions =  response.data.data.partitions
2140
-             console.log("数据22222",this.partitions)
2134
+            //  console.log("数据22222",this.partitions)
2141
 
2135
 
2142
              const merges = ['A1:A2', 'B1:B2', 'C1:E1', 'F1:H1', 'I1:K1', 'L1:N1', 'O1:Q1', 'R1:T1', 'U1:W1', 'X1:Z1', 'AA1:AC1', 'AD1:AF1', 'AG1:AI1', 'AJ1:AL1', 'AM1:AO1', 'AP1:AR1', 'AS1:AU1', 'AV1:AX1', 'AY1:BA1', 'BB1:BD1', 'BE1:BG1', 'BH1:BJ1', 'BK1:BM1']
2136
              const merges = ['A1:A2', 'B1:B2', 'C1:E1', 'F1:H1', 'I1:K1', 'L1:N1', 'O1:Q1', 'R1:T1', 'U1:W1', 'X1:Z1', 'AA1:AC1', 'AD1:AF1', 'AG1:AI1', 'AJ1:AL1', 'AM1:AO1', 'AP1:AR1', 'AS1:AU1', 'AV1:AX1', 'AY1:BA1', 'BB1:BD1', 'BE1:BG1', 'BH1:BJ1', 'BK1:BM1']
2143
               var list = []
2137
               var list = []
2305
               var lastWeek = []
2299
               var lastWeek = []
2306
               var next_start = this.getNextWeekOne(1)
2300
               var next_start = this.getNextWeekOne(1)
2307
               var nextstart = this.getTimestamp(next_start) - 28800
2301
               var nextstart = this.getTimestamp(next_start) - 28800
2308
-              console.log("下周开始时间",nextstart)
2302
+              // console.log("下周开始时间",nextstart)
2309
               var next_end = this.getNextWeek(1)
2303
               var next_end = this.getNextWeek(1)
2310
               var nextend = this.getTimestamp(next_end) - 28800
2304
               var nextend = this.getTimestamp(next_end) - 28800
2311
-              console.log("下周结束时间",nextend)
2305
+              // console.log("下周结束时间",nextend)
2312
               var last_start = this.getNextWeekOne(2)
2306
               var last_start = this.getNextWeekOne(2)
2313
               var last_end = this.getNextWeek(2)
2307
               var last_end = this.getNextWeek(2)
2314
               var laststart = this.getTimestamp(last_start) - 28800
2308
               var laststart = this.getTimestamp(last_start) - 28800
2315
-              console.log("下下周数据时间",laststart)
2309
+              // console.log("下下周数据时间",laststart)
2316
               var lastend = this.getTimestamp(last_end) - 28800
2310
               var lastend = this.getTimestamp(last_end) - 28800
2317
-              console.log("下下周数据时间",lastend)
2311
+              // console.log("下下周数据时间",lastend)
2318
                
2312
                
2319
               if(this.export_type == 0){
2313
               if(this.export_type == 0){
2320
                 for(let i = 0;i<scheduleList.length;i++){
2314
                 for(let i = 0;i<scheduleList.length;i++){
2431
               }
2425
               }
2432
              }
2426
              }
2433
 
2427
 
2434
-             console.log("list5555555555",list)
2428
+            //  console.log("list5555555555",list)
2435
 
2429
 
2436
              if(nextWeek.length > 0 ){
2430
              if(nextWeek.length > 0 ){
2437
                for(let i=0;i<list.length;i++){
2431
                for(let i=0;i<list.length;i++){
2534
               }
2528
               }
2535
              }
2529
              }
2536
 
2530
 
2537
-             console.log("nextWeek",nextWeek)
2531
+            //  console.log("nextWeek",nextWeek)
2538
 
2532
 
2539
              if(lastWeek.length > 0 ){
2533
              if(lastWeek.length > 0 ){
2540
                for(let i=0;i<list.length;i++){
2534
                for(let i=0;i<list.length;i++){
2695
       
2689
       
2696
      
2690
      
2697
 
2691
 
2698
-         console.log("33333333",this.newDay)
2692
+        //  console.log("33333333",this.newDay)
2699
          this.export_type = 1
2693
          this.export_type = 1
2700
          this.getThreeWeekList()
2694
          this.getThreeWeekList()
2701
        },
2695
        },
2773
                 let weekOfday = parseInt(moment().format('d')) 
2767
                 let weekOfday = parseInt(moment().format('d')) 
2774
                 start_time =  this.getTimestamp(moment().subtract(weekOfday + 6, 'days').format('YYYY-MM-DD')) -28800
2768
                 start_time =  this.getTimestamp(moment().subtract(weekOfday + 6, 'days').format('YYYY-MM-DD')) -28800
2775
                 end_time =  this.getTimestamp(moment().subtract(weekOfday, 'days').format('YYYY-MM-DD')) -28800
2769
                 end_time =  this.getTimestamp(moment().subtract(weekOfday, 'days').format('YYYY-MM-DD')) -28800
2776
-                console.log("start",start_time)
2777
-                console.log("end",end_time)
2770
+                // console.log("start",start_time)
2771
+                // console.log("end",end_time)
2778
              }
2772
              }
2779
             
2773
             
2780
             //本周
2774
             //本周
2781
              if(this.form.lastweek == "2"){
2775
              if(this.form.lastweek == "2"){
2782
                 start_time = this.getTimestamp(this.weekDayArr[0])
2776
                 start_time = this.getTimestamp(this.weekDayArr[0])
2783
                 end_time = this.getTimestamp(this.weekDayArr[6])
2777
                 end_time = this.getTimestamp(this.weekDayArr[6])
2784
-                console.log("start",start_time)
2785
-                console.log("end",end_time)
2778
+                // console.log("start",start_time)
2779
+                // console.log("end",end_time)
2786
              }
2780
              }
2787
 
2781
 
2788
             var label = ""
2782
             var label = ""
2801
               copy_startime:copy_startime,
2795
               copy_startime:copy_startime,
2802
               copy_endtime:copy_endtime,
2796
               copy_endtime:copy_endtime,
2803
             }
2797
             }
2804
-           console.log("时间",params)
2798
+         
2805
          
2799
          
2806
            this.$refs[formName].validate(valid=>{
2800
            this.$refs[formName].validate(valid=>{
2807
               if(valid){
2801
               if(valid){
2820
     },
2814
     },
2821
     created() {
2815
     created() {
2822
      var start_time = moment().weekday(1).format('YYYY-MM-DD');
2816
      var start_time = moment().weekday(1).format('YYYY-MM-DD');
2823
-     console.log("开始时间",start_time)
2817
+   
2824
      this.start_time = start_time
2818
      this.start_time = start_time
2825
 
2819
 
2826
      var end_time = this.getNextWeek(2)
2820
      var end_time = this.getNextWeek(2)
2827
-     console.log("结束时间222222",end_time)
2821
+   
2828
      this.end_time = end_time
2822
      this.end_time = end_time
2829
       this.getWeekPanels()
2823
       this.getWeekPanels()
2830
       this.getInitDate()
2824
       this.getInitDate()

+ 218 - 24
src/xt_pages/workforce/components/tableData.vue Просмотреть файл

1
 <template>
1
 <template>
2
   <div id="table_data">
2
   <div id="table_data">
3
-    <!-- <div style="margin-bottom:-30px">
3
+    <div style="margin-bottom:-30px;margin-left:300px">
4
       <span>分区:</span>
4
       <span>分区:</span>
5
        <el-select v-model="partition_id" placeholder="请选择" @change="changePartiton">
5
        <el-select v-model="partition_id" placeholder="请选择" @change="changePartiton">
6
         <el-option
6
         <el-option
10
           :value="item.id">
10
           :value="item.id">
11
          </el-option>
11
          </el-option>
12
         </el-select>
12
         </el-select>
13
-       <span style="margin-left:100px">班次:</span>
13
+       <!-- <span style="margin-left:100px">班次:</span>
14
        <el-select v-model="schedule_type" placeholder="请选择" @change="changeSchedule_type">
14
        <el-select v-model="schedule_type" placeholder="请选择" @change="changeSchedule_type">
15
         <el-option
15
         <el-option
16
           v-for="item in options"
16
           v-for="item in options"
18
           :label="item.name"
18
           :label="item.name"
19
           :value="item.id">
19
           :value="item.id">
20
          </el-option>
20
          </el-option>
21
-       </el-select>
22
-    </div> -->
21
+       </el-select> -->
22
+    </div>
23
    
23
    
24
     <div class="cell clearfix" v-if="weekTime == 'thisWeek' || weekTime == 'nextWeek'  || weekTime == 'nextTwoWeek' ">
24
     <div class="cell clearfix" v-if="weekTime == 'thisWeek' || weekTime == 'nextWeek'  || weekTime == 'nextTwoWeek' ">
25
       <el-input
25
       <el-input
643
       type: Array,
643
       type: Array,
644
       dafault: []
644
       dafault: []
645
     },
645
     },
646
-    scheduleZoneProp: {
647
-      type: Array,
648
-      dafault: []
649
-    },
646
+    // scheduleZoneProp: {
647
+    //   type: Array,
648
+    //   dafault: []
649
+    // },
650
     partitionsProp: {
650
     partitionsProp: {
651
       type: Object,
651
       type: Object,
652
       dafault: {}
652
       dafault: {}
688
       tzDialogVisible: false,
688
       tzDialogVisible: false,
689
       msDialogVisible: false,
689
       msDialogVisible: false,
690
       jhDialogVisible: false,
690
       jhDialogVisible: false,
691
-      scheduleZone: this.scheduleZoneProp,
691
+     // scheduleZone: this.scheduleZoneProp,
692
       scheduleZoneRow: -1,
692
       scheduleZoneRow: -1,
693
       partitions: [],
693
       partitions: [],
694
       jihaos: [],
694
       jihaos: [],
758
         {id:2,name:"下午"},
758
         {id:2,name:"下午"},
759
         {id:3,name:"晚上"},
759
         {id:3,name:"晚上"},
760
       ],
760
       ],
761
-      partition_id:"",
761
+      partition_id:0,
762
       schedule_type:"",
762
       schedule_type:"",
763
       zones:[{id:0,name:"全部"}],
763
       zones:[{id:0,name:"全部"}],
764
-      theType:""
764
+      theType:"",
765
+      scheduleZone:[],
766
+      theWeek: {
767
+        lastWeek: 0,
768
+        thisWeek: 0,
769
+        nextWeek: 0,
770
+        nextTwoWeek: 0
771
+      },
765
     };
772
     };
766
   },
773
   },
767
 
774
 
768
   watch: {
775
   watch: {
769
     weekTime: function() {
776
     weekTime: function() {
770
       var theType = this.weekType(this.weekTime);
777
       var theType = this.weekType(this.weekTime);
771
-      console.log("999999999",theType)
778
+      // console.log("999999999",theType)
772
       this.theType = theType
779
       this.theType = theType
773
       this.getSchedules();
780
       this.getSchedules();
774
     },
781
     },
789
     }
796
     }
790
   },
797
   },
791
   methods: {
798
   methods: {
799
+       getWeekPanels() {
800
+        this.scheduleZone=[]
801
+        getWeekPanels(1,this.partition_id).then(response => {
802
+          if (response.data.state == 0) {
803
+            return false
804
+          }
805
+          var partitions = response.data.data.partitions
806
+          console.log("分区",partitions)
807
+          console.log("scheduleZoneRow",this.scheduleZoneRow)
808
+          this.theWeek.thisWeek = response.data.data.theWeek
809
+          this.theWeek.lastWeek = this.theWeek.thisWeek - 1
810
+          this.theWeek.nextWeek = this.theWeek.thisWeek + 1
811
+          this.theWeek.nextTwoWeek = this.theWeek.thisWeek + 2
812
+          var that = this
813
+          if (partitions.length > 0) {
814
+            partitions.forEach(function(partition) {
815
+              if (partition.jihaos.length == 0) {
816
+                return false
817
+              }
818
+              that.scheduleZoneRow.push(partition.jihaos.length)
819
+
820
+              that.partitions[partition.id] = partition
821
+              
822
+              console.log("partition",partition)
823
+
824
+             
825
+              partition.jihaos.forEach(function(jihao) {
826
+                var thisPa = {
827
+                  area: partition.name,
828
+                  zone_id: partition.id,
829
+                  zone_type: partition.type,
830
+                  cut: jihao.number,
831
+                  jihao_id: jihao.id,
832
+                  Mon_M: {
833
+                    schedule_id: 0,
834
+                    mode_id: 0,
835
+                    mode_name: '',
836
+                    patient_id: 0,
837
+                    patient: ''
838
+                  },
839
+                  Mon_A: {
840
+                    schedule_id: 0,
841
+                    mode_id: 0,
842
+                    mode_name: '',
843
+                    patient_id: 0,
844
+                    patient: ''
845
+                  },
846
+                  Mon_N: {
847
+                    schedule_id: 0,
848
+                    mode_id: 0,
849
+                    mode_name: '',
850
+                    patient_id: 0,
851
+                    patient: ''
852
+                  },
853
+                  Tue_M: {
854
+                    schedule_id: 0,
855
+                    mode_id: 0,
856
+                    mode_name: '',
857
+                    patient_id: 0,
858
+                    patient: ''
859
+                  },
860
+                  Tue_A: {
861
+                    schedule_id: 0,
862
+                    mode_id: 0,
863
+                    mode_name: '',
864
+                    patient_id: 0,
865
+                    patient: ''
866
+                  },
867
+                  Tue_N: {
868
+                    schedule_id: 0,
869
+                    mode_id: 0,
870
+                    mode_name: '',
871
+                    patient_id: 0,
872
+                    patient: ''
873
+                  },
874
+                  Wed_M: {
875
+                    schedule_id: 0,
876
+                    mode_id: 0,
877
+                    mode_name: '',
878
+                    patient_id: 0,
879
+                    patient: ''
880
+                  },
881
+                  Wed_A: {
882
+                    schedule_id: 0,
883
+                    mode_id: 0,
884
+                    mode_name: '',
885
+                    patient_id: 0,
886
+                    patient: ''
887
+                  },
888
+                  Wed_N: {
889
+                    schedule_id: 0,
890
+                    mode_id: 0,
891
+                    mode_name: '',
892
+                    patient_id: 0,
893
+                    patient: ''
894
+                  },
895
+                  Thurs_M: {
896
+                    schedule_id: 0,
897
+                    mode_id: 0,
898
+                    mode_name: '',
899
+                    patient_id: 0,
900
+                    patient: ''
901
+                  },
902
+                  Thurs_A: {
903
+                    schedule_id: 0,
904
+                    mode_id: 0,
905
+                    mode_name: '',
906
+                    patient_id: 0,
907
+                    patient: ''
908
+                  },
909
+                  Thurs_N: {
910
+                    schedule_id: 0,
911
+                    mode_id: 0,
912
+                    mode_name: '',
913
+                    patient_id: 0,
914
+                    patient: ''
915
+                  },
916
+                  Fri_M: {
917
+                    schedule_id: 0,
918
+                    mode_id: 0,
919
+                    mode_name: '',
920
+                    patient_id: 0,
921
+                    patient: ''
922
+                  },
923
+                  Fri_A: {
924
+                    schedule_id: 0,
925
+                    mode_id: 0,
926
+                    mode_name: '',
927
+                    patient_id: 0,
928
+                    patient: ''
929
+                  },
930
+                  Fri_N: {
931
+                    schedule_id: 0,
932
+                    mode_id: 0,
933
+                    mode_name: '',
934
+                    patient_id: 0,
935
+                    patient: ''
936
+                  },
937
+                  Sat_M: {
938
+                    schedule_id: 0,
939
+                    mode_id: 0,
940
+                    mode_name: '',
941
+                    patient_id: 0,
942
+                    patient: ''
943
+                  },
944
+                  Sat_A: {
945
+                    schedule_id: 0,
946
+                    mode_id: 0,
947
+                    mode_name: '',
948
+                    patient_id: 0,
949
+                    patient: ''
950
+                  },
951
+                  Sat_N: {
952
+                    schedule_id: 0,
953
+                    mode_id: 0,
954
+                    mode_name: '',
955
+                    patient_id: 0,
956
+                    patient: ''
957
+                  },
958
+                  Sun_A: {
959
+                    schedule_id: 0,
960
+                    mode_id: 0,
961
+                    mode_name: '',
962
+                    patient_id: 0,
963
+                    patient: ''
964
+                  },
965
+                  Sun_N: {
966
+                    schedule_id: 0,
967
+                    mode_id: 0,
968
+                    mode_name: '',
969
+                    patient_id: 0,
970
+                    patient: ''
971
+                  },
972
+                  Sun_M: {
973
+                    schedule_id: 0,
974
+                    mode_id: 0,
975
+                    mode_name: '',
976
+                    patient_id: 0,
977
+                    patient: ''
978
+                  },
979
+                  total: 0
980
+                }
981
+                // tha.scheduleZone = []
982
+                that.scheduleZone.push(thisPa)
983
+              })
984
+            })
985
+            console.log("分区列表22222222222222",this.scheduleZone)
986
+          }
987
+        })
988
+     },
792
     cellClass({ row, column, rowIndex, columnIndex }) {
989
     cellClass({ row, column, rowIndex, columnIndex }) {
793
       if (columnIndex == 0 || columnIndex == 1 || columnIndex == 23) {
990
       if (columnIndex == 0 || columnIndex == 1 || columnIndex == 23) {
794
         return "";
991
         return "";
910
           partition_id:this.partition_id,
1107
           partition_id:this.partition_id,
911
           schedule_type:this.schedule_type,
1108
           schedule_type:this.schedule_type,
912
         }
1109
         }
1110
+
913
       getSchedules(params).then(response => {
1111
       getSchedules(params).then(response => {
914
         if (response.data.state == 1) {
1112
         if (response.data.state == 1) {
915
           this.weekTitle = response.data.data.weekTitle;
1113
           this.weekTitle = response.data.data.weekTitle;
917
           this.toDay = response.data.data.today;
1115
           this.toDay = response.data.data.today;
918
           var theSchedules = response.data.data.schdules;
1116
           var theSchedules = response.data.data.schdules;
919
           
1117
           
920
-        
1118
+          // console.log("分区2222222222",this.scheduleZone)
1119
+          
921
         
1120
         
922
           var that = this;
1121
           var that = this;
923
           console.log('that.scheduleZonethat.scheduleZone',that.scheduleZone)
1122
           console.log('that.scheduleZonethat.scheduleZone',that.scheduleZone)
1062
                   );
1261
                   );
1063
 
1262
 
1064
                   if (weekPath.length == 2) {
1263
                   if (weekPath.length == 2) {
1065
-                    console.log(schedule);
1264
+                   
1066
 
1265
 
1067
                     var weekPathKey = weekPath[0] + "_" + weekPath[1];
1266
                     var weekPathKey = weekPath[0] + "_" + weekPath[1];
1068
                     that.scheduleZone[index][weekPathKey] = {
1267
                     that.scheduleZone[index][weekPathKey] = {
1268
     },
1467
     },
1269
     clickThis(row, column, cell, event) {
1468
     clickThis(row, column, cell, event) {
1270
       // debugger
1469
       // debugger
1271
-      console.log("aaa",column.property);
1272
       var week = this.weekDay(column.property);
1470
       var week = this.weekDay(column.property);
1273
-      console.log("week",week);
1471
+  
1274
 
1472
 
1275
       if (week[0] == -1 || week[1] == -1) {
1473
       if (week[0] == -1 || week[1] == -1) {
1276
         return false;
1474
         return false;
1291
       this.currentData.bed_name = row.cut;
1489
       this.currentData.bed_name = row.cut;
1292
       this.currentData.partition_type = row.zone_type;
1490
       this.currentData.partition_type = row.zone_type;
1293
 
1491
 
1294
-      console.log(this.currentData);
1295
 
1492
 
1296
       if (row[column.property].schedule_id > 0) {
1493
       if (row[column.property].schedule_id > 0) {
1297
         this.currentData.mode_id = row[column.property].mode_id;
1494
         this.currentData.mode_id = row[column.property].mode_id;
1332
             }
1529
             }
1333
           }
1530
           }
1334
 
1531
 
1335
-          // console.log(this.scheduleZone)
1336
-
1337
           this.changeSchedule.change_action = "change_device";
1532
           this.changeSchedule.change_action = "change_device";
1338
           this.changeScheduleActon(formName);
1533
           this.changeScheduleActon(formName);
1339
 
1534
 
1521
               this.current_devices = this.zone_device_map[this.zone_name];
1716
               this.current_devices = this.zone_device_map[this.zone_name];
1522
               this.device_id = this.current_devices[0].id;
1717
               this.device_id = this.current_devices[0].id;
1523
             }
1718
             }
1524
-            console.log(this.current_devices);
1719
+         
1525
 
1720
 
1526
             this.zone_device_options = [
1721
             this.zone_device_options = [
1527
               { values: this.zone_names },
1722
               { values: this.zone_names },
1529
               { values: this.current_devices }
1724
               { values: this.current_devices }
1530
             ];
1725
             ];
1531
 
1726
 
1532
-            console.log(this.current_devices);
1533
           } else {
1727
           } else {
1534
           }
1728
           }
1535
         })
1729
         })
1607
                   if (this.zone_names.length > 0) {
1801
                   if (this.zone_names.length > 0) {
1608
                     this.zone_name = this.zone_names[0];
1802
                     this.zone_name = this.zone_names[0];
1609
                     this.current_devices = this.zone_device_map[this.zone_name];
1803
                     this.current_devices = this.zone_device_map[this.zone_name];
1610
-
1611
-                    console.log(this.zone_device_map[this.zone_name]);
1612
-
1613
                     this.device_id = this.current_devices[0].id;
1804
                     this.device_id = this.current_devices[0].id;
1614
                   }
1805
                   }
1615
                   this.zone_device_options = [
1806
                   this.zone_device_options = [
2009
     changePartiton(val){
2200
     changePartiton(val){
2010
      this.$emit('event1', val)
2201
      this.$emit('event1', val)
2011
       this.partition_id = val
2202
       this.partition_id = val
2203
+      this.getWeekPanels()
2012
       this.getSchedules()
2204
       this.getSchedules()
2205
+    
2013
     },
2206
     },
2014
     changeSchedule_type(val){
2207
     changeSchedule_type(val){
2015
      this.$emit('event2', val)
2208
      this.$emit('event2', val)
2042
   //    this.tableContainHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 160
2235
   //    this.tableContainHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 160
2043
   // },
2236
   // },
2044
   created() {
2237
   created() {
2238
+    this.getWeekPanels()
2045
     this.changeScheduleType(1)
2239
     this.changeScheduleType(1)
2046
     rowNumber = 0;
2240
     rowNumber = 0;
2047
     this.modeOptions = this.$store.getters.treatment_mode;
2241
     this.modeOptions = this.$store.getters.treatment_mode;