XMLWAN 3 years ago
parent
commit
b639f7f142

+ 1 - 1
src/api/schedule.js View File

1
 import request from '@/utils/request'
1
 import request from '@/utils/request'
2
 
2
 
3
 export function getWeekPanels(t,patitionId) {
3
 export function getWeekPanels(t,patitionId) {
4
-  console.log("params33333",t,patitionId)
4
+  
5
   return request({
5
   return request({
6
     url: '/api/schedule/weekpanel?data=' + t+"&patitionid="+patitionId,
6
     url: '/api/schedule/weekpanel?data=' + t+"&patitionid="+patitionId,
7
     method: 'get'
7
     method: 'get'

+ 9 - 4
src/xt_pages/outpatientDoctorStation/doctorDesk.vue View File

143
       width="600px"
143
       width="600px"
144
       title="打印"
144
       title="打印"
145
       :visible.sync="recordVisible">
145
       :visible.sync="recordVisible">
146
-      <recordPrint :patientid="patientid"></recordPrint>
146
+      <recordPrint :patientid="patientid" ref="recordPrint"></recordPrint>
147
     </el-dialog>
147
     </el-dialog>
148
-
148
+  
149
   </div>
149
   </div>
150
 </template>
150
 </template>
151
 
151
 
1818
       },
1818
       },
1819
       currentChange(currentRow, oldCurrentRow) {
1819
       currentChange(currentRow, oldCurrentRow) {
1820
         this.newPatientId = oldCurrentRow.id
1820
         this.newPatientId = oldCurrentRow.id
1821
-        console.log('执行',this.newPatientId)
1821
+        console.log('老数据',oldCurrentRow.id)
1822
+        this.patientid = oldCurrentRow.id
1823
+       
1822
         let isShowDailog = false
1824
         let isShowDailog = false
1823
         for (let i = 0; i < this.prescriptions.length; i++) {
1825
         for (let i = 0; i < this.prescriptions.length; i++) {
1824
           if ((this.prescriptions[i].id == 0 && this.prescriptions[i].advices.length > 0) || (this.prescriptions[i].id == 0 && this.prescriptions[i].project.length > 0)) {
1826
           if ((this.prescriptions[i].id == 0 && this.prescriptions[i].advices.length > 0) || (this.prescriptions[i].id == 0 && this.prescriptions[i].project.length > 0)) {
1865
           }
1867
           }
1866
           this.$refs.child.createCaseHistory()
1868
           this.$refs.child.createCaseHistory()
1867
         } else if (index == 2) {
1869
         } else if (index == 2) {
1870
+          console.log("患者ID",this.patientid)
1871
+         
1868
           this.recordVisible = true
1872
           this.recordVisible = true
1869
-          // this.$router.push('/outpatientDoctorStation/recordPrint?record='+this.record_date+"&patient_id="+this.patientid)
1873
+          this.$refs.recordPrint.show(this.patientid)
1874
+         
1870
         } else if (index == 3) {
1875
         } else if (index == 3) {
1871
           var mode_status = this.$refs.saveRecordTemplate.mode_status
1876
           var mode_status = this.$refs.saveRecordTemplate.mode_status
1872
           this.$refs.medicalRecord.show(mode_status)
1877
           this.$refs.medicalRecord.show(mode_status)

+ 8 - 3
src/xt_pages/outpatientDoctorStation/recordPrint.vue View File

12
     </template>
12
     </template>
13
             
13
             
14
     <div class='dialysisPage' style="padding-top:40px;">
14
     <div class='dialysisPage' style="padding-top:40px;">
15
-      <printOne v-bind:childResponse="childResponse" :patient="patient" :hispatient="hispatient" :history="history" :patientid="patientid"></printOne>
15
+      <printOne ref="printOne"  v-bind:childResponse="childResponse" :patient="patient" :hispatient="hispatient" :history="history" :patientid="patientid"></printOne>
16
     </div>
16
     </div>
17
   </div>
17
   </div>
18
 </template>
18
 </template>
53
     };
53
     };
54
   },
54
   },
55
   methods: {
55
   methods: {
56
+    show(val){
57
+       
58
+       this.$refs.printOne.show(val)
59
+    },
56
     getAdminUser(id) {
60
     getAdminUser(id) {
57
       if (id == 0) {
61
       if (id == 0) {
58
         return "";
62
         return "";
136
     searchAction(){
140
     searchAction(){
137
       this.getPatientList()
141
       this.getPatientList()
138
     },
142
     },
139
-    
143
+  
140
   },
144
   },
141
   created() {
145
   created() {
142
     // this.getPatientList() 
146
     // this.getPatientList() 
143
-   
147
+    console.log("455555555555555",this.patientid)
148
+    this.$refs.printOne.show(this.patientid)
144
   },
149
   },
145
   // computed:{
150
   // computed:{
146
   //   filtedSchedules: function() {
151
   //   filtedSchedules: function() {

+ 14 - 1
src/xt_pages/outpatientDoctorStation/recordTemplate/printOne.vue View File

120
         }                   
120
         }                   
121
     },
121
     },
122
     methods:{
122
     methods:{
123
+      show(val){
124
+       
125
+        this.patientid = val
126
+        this.getAllDoctorList()
127
+        this.getPatientCaseHistory()
128
+      },
123
       getProfession(id){
129
       getProfession(id){
124
         var name = ""
130
         var name = ""
125
         for(let i=0;i<this.educationOptions.length;i++){
131
         for(let i=0;i<this.educationOptions.length;i++){
179
          }
185
          }
180
       }
186
       }
181
       return name
187
       return name
182
-    }
188
+    },
189
+  
190
+
183
     },
191
     },
184
     created(){
192
     created(){
185
         this.educationOptions = getDataConfig("patient", "education_types");
193
         this.educationOptions = getDataConfig("patient", "education_types");
192
         var month =data.getMonth() < 9 ? "0" + (data.getMonth() + 1) : data.getMonth() + 1;
200
         var month =data.getMonth() < 9 ? "0" + (data.getMonth() + 1) : data.getMonth() + 1;
193
         var date = data.getDate() <= 9 ? "0" + data.getDate() : data.getDate();
201
         var date = data.getDate() <= 9 ? "0" + data.getDate() : data.getDate();
194
         this.printDate = data.getFullYear() + "-" + month + "-" + date;
202
         this.printDate = data.getFullYear() + "-" + month + "-" + date;
203
+    },
204
+    watch:{
205
+       'patientid':function(val){
206
+         console.log("val22332323",val)
207
+       }
195
     }
208
     }
196
 }
209
 }
197
 </script>
210
 </script>

+ 1 - 1
src/xt_pages/workforce/appointment.vue View File

669
           headers.push(key)
669
           headers.push(key)
670
         }
670
         }
671
         if (header.length == 65) {
671
         if (header.length == 65) {
672
-          console.log("进来了吗")
672
+         
673
           var isHas_1 = headers.includes('区号')
673
           var isHas_1 = headers.includes('区号')
674
           console.log("1"+isHas_1)
674
           console.log("1"+isHas_1)
675
           var isHas_2 = headers.includes('机号')
675
           var isHas_2 = headers.includes('机号')

+ 362 - 50
src/xt_pages/workforce/template.vue View File

190
         this_week_schedules: {
190
         this_week_schedules: {
191
           id: 0,
191
           id: 0,
192
           items: []
192
           items: []
193
-        }
193
+        },
194
+        firstWeekData:[],
195
+        secondWeekData:[],
196
+        tableList:[]
194
       }
197
       }
195
     },
198
     },
196
     created() {
199
     created() {
203
           var mode = resp.data.template_mode
206
           var mode = resp.data.template_mode
204
           var device_numbers = resp.data.device_numbers
207
           var device_numbers = resp.data.device_numbers
205
           var templates = resp.data.templates
208
           var templates = resp.data.templates
209
+      
210
+          for(let i=0;i<templates.length;i++){
211
+            this.firstWeekData = templates[0].items
212
+            this.secondWeekData = templates[1].items
213
+          }
214
+      
206
           var patients = resp.data.patients
215
           var patients = resp.data.patients
207
           var schedules = resp.data.schedules
216
           var schedules = resp.data.schedules
208
-
217
+        
209
           this.template_mode = mode
218
           this.template_mode = mode
210
           this.origin_mode = mode.mode
219
           this.origin_mode = mode.mode
211
           this.device_numbers = device_numbers
220
           this.device_numbers = device_numbers
212
-          console.log(this.device_numbers)
221
+     
213
           this.patients = patients
222
           this.patients = patients
214
-
223
+         
215
           this.first_template = templates[0]
224
           this.first_template = templates[0]
216
           this.second_template = templates[1]
225
           this.second_template = templates[1]
217
 
226
 
253
             this.template_mode = mode
262
             this.template_mode = mode
254
             this.origin_mode = mode.mode
263
             this.origin_mode = mode.mode
255
             this.device_numbers = device_numbers
264
             this.device_numbers = device_numbers
256
-            console.log(this.device_numbers)
265
+           
257
             this.patients = patients
266
             this.patients = patients
258
 
267
 
259
             this.first_template = templates[0]
268
             this.first_template = templates[0]
448
           }
457
           }
449
 
458
 
450
         }else if(this.template_mode.mode == 2){
459
         }else if(this.template_mode.mode == 2){
460
+        
451
           if(results.length > 0) {
461
           if(results.length > 0) {
452
 
462
 
453
             var isHas_1 = headers.includes('区号')
463
             var isHas_1 = headers.includes('区号')
454
-            console.log(isHas_1)
464
+            console.log("区号",isHas_1)
455
             var isHas_2 = headers.includes('机号')
465
             var isHas_2 = headers.includes('机号')
456
-            console.log(isHas_2)
466
+            console.log("机号",isHas_2)
457
 
467
 
458
             var isHas_3 = headers.includes('周一')
468
             var isHas_3 = headers.includes('周一')
459
             console.log(isHas_3)
469
             console.log(isHas_3)
517
 
527
 
518
             var isHas_23 = headers.includes('_13')
528
             var isHas_23 = headers.includes('_13')
519
             console.log(isHas_1)
529
             console.log(isHas_1)
520
-
530
+         
521
             var isHas_24 = headers.includes('周一_1')
531
             var isHas_24 = headers.includes('周一_1')
522
             var isHas_25 = headers.includes('_14')
532
             var isHas_25 = headers.includes('_14')
523
             var isHas_26 = headers.includes('_15')
533
             var isHas_26 = headers.includes('_15')
581
           }
591
           }
582
 
592
 
583
         }
593
         }
584
-
594
+       
585
         const obj = {}
595
         const obj = {}
586
         zones = zones.reduce((cur, next) => {
596
         zones = zones.reduce((cur, next) => {
587
           obj[next] ? '' : obj[next] = true && cur.push(next)
597
           obj[next] ? '' : obj[next] = true && cur.push(next)
593
           obj2[next] ? '' : obj2[next] = true && cur.push(next)
603
           obj2[next] ? '' : obj2[next] = true && cur.push(next)
594
           return cur
604
           return cur
595
         }, []) // 设置cur默认类型为数组,并且初始值为空的数组
605
         }, []) // 设置cur默认类型为数组,并且初始值为空的数组
596
-        console.log("1111111111")
597
-        console.log(deviceNumber)
598
-        console.log("1111111111")
606
+       
607
+     
599
 
608
 
600
         var total_zones = []
609
         var total_zones = []
601
         var total_device_number = []
610
         var total_device_number = []
623
           }
632
           }
624
         }
633
         }
625
 
634
 
626
-        //
635
+      
627
 
636
 
628
         let tempObj = null
637
         let tempObj = null
629
         if (results.length > 0) {
638
         if (results.length > 0) {
630
           tempObj = results[0]
639
           tempObj = results[0]
631
         }
640
         }
632
-
641
+       
633
         let datas = []
642
         let datas = []
634
         for (let i = 0; i < results.length; i++) {
643
         for (let i = 0; i < results.length; i++) {
635
           for (let key in results[i + 1]) {
644
           for (let key in results[i + 1]) {
645
+            
636
             let tempObjTwo = { partition_name: '', device_number_name: '' }
646
             let tempObjTwo = { partition_name: '', device_number_name: '' }
637
-
638
-            if (key != '区号' && key != '机号') {
647
+            //去除空的
648
+            if (key != '区号' && key != '机号' && results[i+1][key]!="") {
639
               let obj = {}
649
               let obj = {}
640
               obj['name'] = results[i + 1][key].replace(/\s/g,"")
650
               obj['name'] = results[i + 1][key].replace(/\s/g,"")
641
               if (tempObj[key] == '上午') {
651
               if (tempObj[key] == '上午') {
657
 
667
 
658
               tempObjTwo = obj
668
               tempObjTwo = obj
659
             }
669
             }
660
-
670
+          
661
             tempObjTwo['partition_name'] = results[i + 1]['区号']
671
             tempObjTwo['partition_name'] = results[i + 1]['区号']
662
             tempObjTwo['device_number_name'] = results[i + 1]['机号']
672
             tempObjTwo['device_number_name'] = results[i + 1]['机号']
663
             tempObjTwo['index'] = i + 3
673
             tempObjTwo['index'] = i + 3
708
 
718
 
709
           }
719
           }
710
         }
720
         }
711
-
721
+       
712
         //校验文档中同一天同个人是否存在多个排班
722
         //校验文档中同一天同个人是否存在多个排班
713
         let is_exist_repeat = false
723
         let is_exist_repeat = false
714
         const obj3 = {}
724
         const obj3 = {}
731
           obj[key] = value
741
           obj[key] = value
732
           tempObjArr.push(obj)
742
           tempObjArr.push(obj)
733
         }
743
         }
734
-
744
+      
735
         for (let i = 0; i < tempObjArr.length; i++) {
745
         for (let i = 0; i < tempObjArr.length; i++) {
736
           for (let key in tempObjArr[i]) {
746
           for (let key in tempObjArr[i]) {
737
             let arr = tempObjArr[i][key]
747
             let arr = tempObjArr[i][key]
740
               obj[next] ? '' : obj[next] = true && cur.push(next)
750
               obj[next] ? '' : obj[next] = true && cur.push(next)
741
               return cur
751
               return cur
742
             }, []) // 设置cur默认类型为数组,并且初始值为空的数组
752
             }, []) // 设置cur默认类型为数组,并且初始值为空的数组
743
-
753
+         
754
+            //这个地方
744
             if (tempObjArr[i][key].length > arr.length) {    //比对原数组和去重后的原数组总数,不同的话则存在重复元素
755
             if (tempObjArr[i][key].length > arr.length) {    //比对原数组和去重后的原数组总数,不同的话则存在重复元素
745
               is_exist_repeat = true
756
               is_exist_repeat = true
757
+            
746
             }
758
             }
747
           }
759
           }
748
         }
760
         }
749
-
761
+       
762
+       
763
+     
750
         let isHeader = true
764
         let isHeader = true
751
 
765
 
752
         if(this.template_mode.mode == 1){
766
         if(this.template_mode.mode == 1){
803
                   this.template_mode = mode
817
                   this.template_mode = mode
804
                   this.origin_mode = mode.mode
818
                   this.origin_mode = mode.mode
805
                   this.device_numbers = device_numbers
819
                   this.device_numbers = device_numbers
806
-                  console.log(this.device_numbers)
820
+             
807
                   this.patients = patients
821
                   this.patients = patients
808
 
822
 
809
                   this.first_template = templates[0]
823
                   this.first_template = templates[0]
838
         }
852
         }
839
 
853
 
840
       }, getTemplateByWeek(key) {
854
       }, getTemplateByWeek(key) {
841
-        console.log(key)
855
+      
842
         switch (key) {
856
         switch (key) {
843
           case '周一' : //本周一
857
           case '周一' : //本周一
844
 
858
 
1641
 
1655
 
1642
       },
1656
       },
1643
       getDateByResultsStr(key) {
1657
       getDateByResultsStr(key) {
1644
-
1658
+     
1645
         switch (key) {
1659
         switch (key) {
1646
           case '周一' : //本周一
1660
           case '周一' : //本周一
1647
 
1661
 
2201
           }
2215
           }
2202
           this.origin_mode = mode
2216
           this.origin_mode = mode
2203
         }
2217
         }
2204
-      }, formatJson(filterVal, jsonData) {
2218
+      }, 
2219
+      formatJson(filterVal, jsonData) {
2205
         return jsonData.map(v =>
2220
         return jsonData.map(v =>
2206
           filterVal.map(j => {
2221
           filterVal.map(j => {
2207
             return v[j]
2222
             return v[j]
2208
 
2223
 
2209
           })
2224
           })
2210
         )
2225
         )
2211
-      }, import_file: function() {
2226
+      },
2227
+      import_file: function() {
2228
+    
2212
         this.downloadLoading = true
2229
         this.downloadLoading = true
2213
         import('@/vendor/Export2Excel').then(excel => {
2230
         import('@/vendor/Export2Excel').then(excel => {
2214
           const filterVal = [
2231
           const filterVal = [
2221
           const headerForModeOne = ['', '', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上']
2238
           const headerForModeOne = ['', '', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上']
2222
           const headerForModeTwo = ['', '', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上']
2239
           const headerForModeTwo = ['', '', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上']
2223
 
2240
 
2224
-          // const merges = ['A1:A2', 'B1:B2']
2225
           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']
2241
           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']
2226
 
2242
 
2227
           var list = []
2243
           var list = []
2244
+          
2228
           let i = 0
2245
           let i = 0
2229
           for (let key  in this.partitions) {
2246
           for (let key  in this.partitions) {
2230
             var tempValue
2247
             var tempValue
2243
               let obj = {}
2260
               let obj = {}
2244
               obj['区号'] = this.partitions[key].name
2261
               obj['区号'] = this.partitions[key].name
2245
               obj['机号'] = jihaos[b].number.toString()
2262
               obj['机号'] = jihaos[b].number.toString()
2263
+              obj['shangwu'] = ''
2264
+              obj['xiawu'] = ''
2265
+              obj['wanshang'] = ''
2266
+
2267
+              obj['shangwu1'] = ''
2268
+              obj['xiawu1'] = ''
2269
+              obj['wanshang1'] = ''
2270
+
2271
+              obj['shangwu2'] = ''
2272
+              obj['xiawu2'] = ''
2273
+              obj['wanshang2'] = ''
2274
+
2275
+              obj['shangwu3'] = ''
2276
+              obj['xiawu3'] = ''
2277
+              obj['wanshang3'] = ''
2278
+
2279
+              obj['shangwu4'] = ''
2280
+              obj['xiawu4'] = ''
2281
+              obj['wanshang4'] = ''
2282
+
2283
+
2284
+              obj['shangwu5'] = ''
2285
+              obj['xiawu5'] = ''
2286
+              obj['wanshang5'] = ''
2287
+
2288
+              obj['shangwu6'] = ''
2289
+              obj['xiawu6'] = ''
2290
+              obj['wanshang6'] = ''
2291
+
2292
+              obj['shangwu7'] = ''
2293
+              obj['xiawu7'] = ''
2294
+              obj['wanshang7'] = ''
2295
+
2296
+              obj['shangwu8'] = ''
2297
+              obj['xiawu8'] = ''
2298
+              obj['wanshang8'] = ''
2299
+
2300
+              obj['shangwu9'] = ''
2301
+              obj['xiawu9'] = ''
2302
+              obj['wanshang9'] = ''
2303
+
2304
+              obj['shangwu10'] = ''
2305
+              obj['xiawu10'] = ''
2306
+              obj['wanshang10'] = ''
2307
+
2308
+              obj['shangwu11'] = ''
2309
+              obj['xiawu11'] = ''
2310
+              obj['wanshang11'] = ''
2311
+
2312
+
2313
+              obj['shangwu12'] = ''
2314
+              obj['xiawu12'] = ''
2315
+              obj['wanshang12'] = ''
2316
+
2317
+              obj['shangwu13'] = ''
2318
+              obj['xiawu13'] = ''
2319
+              obj['wanshang13'] = ''
2320
+
2246
               list.push(obj)
2321
               list.push(obj)
2247
             }
2322
             }
2248
-
2249
             i++
2323
             i++
2250
           }
2324
           }
2251
-          const data = this.formatJson(filterVal, list)
2252
-          const filename = "排班模版"
2325
+       
2326
+          for(let i=0;i<this.firstWeekData.length;i++){
2327
+              this.firstWeekData[i].name = ""
2328
+              this.firstWeekData[i].number_name = ""
2329
+          }
2330
+          for(let i=0;i<this.secondWeekData.length;i++){
2331
+              this.secondWeekData[i].name = ""
2332
+              this.secondWeekData[i].number_name = ""
2333
+          }
2334
+          
2335
+         for(let i=0;i<this.firstWeekData.length;i++){
2336
+            for(let j=0;j<this.device_numbers.length;j++){
2337
+                if(this.firstWeekData[i].device_number_id == this.device_numbers[j].id){
2338
+                    this.firstWeekData[i].number_name = this.device_numbers[j].number
2339
+                }
2340
+            }
2341
+         }
2253
 
2342
 
2254
-          // excel.export_json_to_excel({
2255
-          //   multiHeaderForModeOne,
2256
-          //   headerForModeOne,
2257
-          //   merges,
2258
-          //   data
2259
-          // })
2343
+         for(let i=0;i<this.secondWeekData.length;i++){
2344
+            for(let j=0;j<this.device_numbers.length;j++){
2345
+               if(this.secondWeekData[i].device_number_id == this.device_numbers[j].id){
2346
+                   this.secondWeekData[i].number_name = this.device_numbers[j].number
2347
+               }
2348
+            } 
2349
+         }
2260
 
2350
 
2261
-          if (this.template_mode.mode == 1) {
2262
-            let multiHeader = multiHeaderForModeOne
2263
-            let header = headerForModeOne
2264
 
2351
 
2265
-            excel.export_json_to_excel({
2266
-              multiHeader,
2267
-              header,
2268
-              merges,
2269
-              data,
2270
-              filename
2271
-            })
2352
+          for(let i=0;i<this.firstWeekData.length;i++){
2353
+             for(let j=0;j<this.patients.length;j++){
2354
+                if(this.firstWeekData[i].patient_id == this.patients[j].id){
2355
+                    this.firstWeekData[i].name = this.patients[j].name
2356
+                }
2357
+             }
2358
+          }
2359
+         
2360
+          for(let i=0;i<this.secondWeekData.length;i++){
2361
+            for(let j=0;j<this.patients.length;j++){
2362
+               if(this.secondWeekData[i].patient_id == this.patients[j].id){
2363
+                   this.secondWeekData[i].name = this.patients[j].name
2364
+               }  
2365
+            }
2366
+          }
2367
+          
2368
+          for(let i=0;i<this.firstWeekData.length;i++){
2369
+            for(let j=0;j<list.length;j++){
2370
+               if(this.firstWeekData[i].number_name == list[j].机号){
2371
+                  //第一周周一上午
2372
+                  if(this.firstWeekData[i].weekday ==1 && this.firstWeekData[i].time_type == 1){
2373
+                        list[j].shangwu = this.firstWeekData[i].name
2374
+                  }
2375
+                  //第一周周一下午
2376
+                  if(this.firstWeekData[i].weekday== 1 && this.firstWeekData[i].time_type == 2){
2377
+                      list[j].xiawu = this.firstWeekData[i].name
2378
+                  }
2379
+                  //第一周晚上
2380
+                  if(this.firstWeekData[i].weekday == 1 && this.firstWeekData[i].time_type == 3){
2381
+                      list[j].wanshang = this.firstWeekData[i].name
2382
+                  }
2383
+
2384
+
2385
+                  //第一周周二上午
2386
+                  if(this.firstWeekData[i].weekday ==2 && this.firstWeekData[i].time_type == 1){
2387
+                        list[j].shangwu1 = this.firstWeekData[i].name
2388
+                  }
2389
+                  //第一周周二下午
2390
+                  if(this.firstWeekData[i].weekday== 2 && this.firstWeekData[i].time_type == 2){
2391
+                      list[j].xiawu1 = this.firstWeekData[i].name
2392
+                  }
2393
+                  //第一周周二晚上
2394
+                  if(this.firstWeekData[i].weekday == 2 && this.firstWeekData[i].time_type == 3){
2395
+                      list[j].wanshang1 = this.firstWeekData[i].name
2396
+                  }
2272
 
2397
 
2273
-          } else if (this.template_mode.mode == 2) {
2274
-            let multiHeader = multiHeaderForModeTwo
2275
-            let header = headerForModeTwo
2398
+
2399
+                  //第一周周三上午
2400
+                  if(this.firstWeekData[i].weekday ==3 && this.firstWeekData[i].time_type == 1){
2401
+                        list[j].shangwu2 = this.firstWeekData[i].name
2402
+                  }
2403
+                  //第一周周三下午
2404
+                  if(this.firstWeekData[i].weekday== 3&& this.firstWeekData[i].time_type == 2){
2405
+                      list[j].xiawu2 = this.firstWeekData[i].name
2406
+                  }
2407
+                  //第一周周三晚上
2408
+                  if(this.firstWeekData[i].weekday == 3 && this.firstWeekData[i].time_type == 3){
2409
+                      list[j].wanshang2 = this.firstWeekData[i].name
2410
+                  }
2411
+
2412
+
2413
+                  //第一周周四上午
2414
+                  if(this.firstWeekData[i].weekday ==4 && this.firstWeekData[i].time_type == 1){
2415
+                        list[j].shangwu3 = this.firstWeekData[i].name
2416
+                  }
2417
+                  //第一周周四下午
2418
+                  if(this.firstWeekData[i].weekday== 4&& this.firstWeekData[i].time_type == 2){
2419
+                      list[j].xiawu3 = this.firstWeekData[i].name
2420
+                  }
2421
+                  //第一周周四晚上
2422
+                  if(this.firstWeekData[i].weekday == 4 && this.firstWeekData[i].time_type == 3){
2423
+                      list[j].wanshang3 = this.firstWeekData[i].name
2424
+                  }
2425
+
2426
+
2427
+                  //第一周周五上午
2428
+                  if(this.firstWeekData[i].weekday ==5 && this.firstWeekData[i].time_type == 1){
2429
+                        list[j].shangwu4 = this.firstWeekData[i].name
2430
+                  }
2431
+                  //第一周周五下午
2432
+                  if(this.firstWeekData[i].weekday== 5&& this.firstWeekData[i].time_type == 2){
2433
+                      list[j].xiawu4 = this.firstWeekData[i].name
2434
+                  }
2435
+                  //第一周周五晚上
2436
+                  if(this.firstWeekData[i].weekday == 5 && this.firstWeekData[i].time_type == 3){
2437
+                      list[j].wanshang4 = this.firstWeekData[i].name
2438
+                  }
2439
+
2440
+
2441
+                  //第一周周六上午
2442
+                  if(this.firstWeekData[i].weekday ==6 && this.firstWeekData[i].time_type == 1){
2443
+                        list[j].shangwu5 = this.firstWeekData[i].name
2444
+                  }
2445
+                  //第一周周六下午
2446
+                  if(this.firstWeekData[i].weekday== 6&& this.firstWeekData[i].time_type == 2){
2447
+                      list[j].xiawu5 = this.firstWeekData[i].name
2448
+                  }
2449
+                  //第一周周六晚上
2450
+                  if(this.firstWeekData[i].weekday == 6 && this.firstWeekData[i].time_type == 3){
2451
+                      list[j].wanshang5 = this.firstWeekData[i].name
2452
+                  }
2453
+
2454
+
2455
+                  //第一周周日上午
2456
+                  if(this.firstWeekData[i].weekday ==7 && this.firstWeekData[i].time_type == 1){
2457
+                        list[j].shangwu6 = this.firstWeekData[i].name
2458
+                  }
2459
+                  //第一周周日下午
2460
+                  if(this.firstWeekData[i].weekday== 7&& this.firstWeekData[i].time_type == 2){
2461
+                      list[j].xiawu6 = this.firstWeekData[i].name
2462
+                  }
2463
+                  //第一周周日晚上
2464
+                  if(this.firstWeekData[i].weekday == 7 && this.firstWeekData[i].time_type == 3){
2465
+                      list[j].wanshang6 = this.firstWeekData[i].name
2466
+                  }
2467
+               }
2468
+            }
2469
+          }
2470
+      
2471
+          for(let i=0;i<this.secondWeekData.length;i++){
2472
+            for(let j=0;j<list.length;j++){
2473
+               if(list[j].机号 == this.secondWeekData[i].number_name){
2474
+                  //第二周周一上午
2475
+                  if(this.secondWeekData[i].weekday == 1 && this.secondWeekData[i].time_type == 1){
2476
+                      list[j].shangwu7 =  this.secondWeekData[i].name
2477
+                  }
2478
+                  //第二周周一下午
2479
+                  if(this.secondWeekData[i].weekday == 1 && this.secondWeekData[i].time_type == 2){
2480
+                      list[j].xiawu7 =  this.secondWeekData[i].name
2481
+                  }
2482
+                  //第二周周一晚上
2483
+                  if(this.secondWeekData[i].weekday == 1 && this.secondWeekData[i].time_type == 3){
2484
+                      list[j].wanshang7 =  this.secondWeekData[i].name
2485
+                  }
2486
+
2487
+
2488
+                  //第二周周二上午
2489
+                  if(this.secondWeekData[i].weekday == 2 && this.secondWeekData[i].time_type == 1){
2490
+                      list[j].shangwu8 =  this.secondWeekData[i].name
2491
+                  }
2492
+                  //第二周周二下午
2493
+                  if(this.secondWeekData[i].weekday == 2 && this.secondWeekData[i].time_type == 2){
2494
+                      list[j].xiawu8 =  this.secondWeekData[i].name
2495
+                  }
2496
+                  //第二周周二晚上
2497
+                  if(this.secondWeekData[i].weekday == 2 && this.secondWeekData[i].time_type == 3){
2498
+                      list[j].wanshang8 =  this.secondWeekData[i].name
2499
+                  }
2500
+
2501
+
2502
+
2503
+                  //第二周周三上午
2504
+                  if(this.secondWeekData[i].weekday == 3 && this.secondWeekData[i].time_type == 1){
2505
+                      list[j].shangwu9 =  this.secondWeekData[i].name
2506
+                  }
2507
+                  //第二周周三下午
2508
+                  if(this.secondWeekData[i].weekday == 3 && this.secondWeekData[i].time_type == 2){
2509
+                      list[j].xiawu9 =  this.secondWeekData[i].name
2510
+                  }
2511
+                  //第二周周三晚上
2512
+                  if(this.secondWeekData[i].weekday == 3 && this.secondWeekData[i].time_type == 3){
2513
+                      list[j].wanshang9 =  this.secondWeekData[i].name
2514
+                  }
2515
+
2516
+
2517
+                  //第二周周四上午
2518
+                  if(this.secondWeekData[i].weekday == 4 && this.secondWeekData[i].time_type == 1){
2519
+                      list[j].shangwu10 =  this.secondWeekData[i].name
2520
+                  }
2521
+                  //第二周周四下午
2522
+                  if(this.secondWeekData[i].weekday == 4 && this.secondWeekData[i].time_type == 2){
2523
+                      list[j].xiawu10 =  this.secondWeekData[i].name
2524
+                  }
2525
+                  //第二周周四晚上
2526
+                  if(this.secondWeekData[i].weekday == 4 && this.secondWeekData[i].time_type == 3){
2527
+                      list[j].wanshang10 =  this.secondWeekData[i].name
2528
+                  }
2529
+
2530
+
2531
+                    //第二周周五上午
2532
+                  if(this.secondWeekData[i].weekday == 5 && this.secondWeekData[i].time_type == 1){
2533
+                      list[j].shangwu11 =  this.secondWeekData[i].name
2534
+                  }
2535
+                  //第二周周五下午
2536
+                  if(this.secondWeekData[i].weekday == 5 && this.secondWeekData[i].time_type == 2){
2537
+                      list[j].xiawu11 =  this.secondWeekData[i].name
2538
+                  }
2539
+                  //第二周周五晚上
2540
+                  if(this.secondWeekData[i].weekday == 5 && this.secondWeekData[i].time_type == 3){
2541
+                      list[j].wanshang11 =  this.secondWeekData[i].name
2542
+                  }
2543
+
2544
+
2545
+                  //第二周周六上午
2546
+                  if(this.secondWeekData[i].weekday ==6 && this.secondWeekData[i].time_type == 1){
2547
+                      list[j].shangwu12 =  this.secondWeekData[i].name
2548
+                  }
2549
+                  //第二周周六下午
2550
+                  if(this.secondWeekData[i].weekday == 6 && this.secondWeekData[i].time_type == 2){
2551
+                      list[j].xiawu12 =  this.secondWeekData[i].name
2552
+                  }
2553
+                  //第二周周六晚上
2554
+                  if(this.secondWeekData[i].weekday == 6 && this.secondWeekData[i].time_type == 3){
2555
+                      list[j].wanshang12 =  this.secondWeekData[i].name
2556
+                  }
2557
+
2558
+
2559
+
2560
+                  //第二周周日上午
2561
+                  if(this.secondWeekData[i].weekday ==7  && this.secondWeekData[i].time_type == 1){
2562
+                      list[j].shangwu13 =  this.secondWeekData[i].name
2563
+                  }
2564
+                  //第二周周日下午
2565
+                  if(this.secondWeekData[i].weekday == 7 && this.secondWeekData[i].time_type == 2){
2566
+                      list[j].xiawu13 =  this.secondWeekData[i].name
2567
+                  }
2568
+                  //第二周周日晚上
2569
+                  if(this.secondWeekData[i].weekday == 7 && this.secondWeekData[i].time_type == 3){
2570
+                      list[j].wanshang13 =  this.secondWeekData[i].name
2571
+                  }
2572
+               }
2573
+               
2574
+            }
2575
+          }
2576
+          this.tableList = list 
2577
+        
2578
+          const filename = "排班模版"
2579
+          var data = []
2580
+          this.tableList.map(item=>{
2581
+             data.push(Object.values(item))
2582
+  
2583
+          })
2584
+        
2585
+      
2586
+           let multiHeader = multiHeaderForModeTwo
2587
+           let header = headerForModeTwo
2276
 
2588
 
2277
             excel.export_json_to_excel({
2589
             excel.export_json_to_excel({
2278
               multiHeader,
2590
               multiHeader,
2283
 
2595
 
2284
             })
2596
             })
2285
 
2597
 
2286
-          }
2598
+          
2287
 
2599
 
2288
           this.downloadLoading = false
2600
           this.downloadLoading = false
2289
         })
2601
         })