|
@@ -190,7 +190,10 @@
|
190
|
190
|
this_week_schedules: {
|
191
|
191
|
id: 0,
|
192
|
192
|
items: []
|
193
|
|
- }
|
|
193
|
+ },
|
|
194
|
+ firstWeekData:[],
|
|
195
|
+ secondWeekData:[],
|
|
196
|
+ tableList:[]
|
194
|
197
|
}
|
195
|
198
|
},
|
196
|
199
|
created() {
|
|
@@ -203,15 +206,21 @@
|
203
|
206
|
var mode = resp.data.template_mode
|
204
|
207
|
var device_numbers = resp.data.device_numbers
|
205
|
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
|
215
|
var patients = resp.data.patients
|
207
|
216
|
var schedules = resp.data.schedules
|
208
|
|
-
|
|
217
|
+
|
209
|
218
|
this.template_mode = mode
|
210
|
219
|
this.origin_mode = mode.mode
|
211
|
220
|
this.device_numbers = device_numbers
|
212
|
|
- console.log(this.device_numbers)
|
|
221
|
+
|
213
|
222
|
this.patients = patients
|
214
|
|
-
|
|
223
|
+
|
215
|
224
|
this.first_template = templates[0]
|
216
|
225
|
this.second_template = templates[1]
|
217
|
226
|
|
|
@@ -253,7 +262,7 @@
|
253
|
262
|
this.template_mode = mode
|
254
|
263
|
this.origin_mode = mode.mode
|
255
|
264
|
this.device_numbers = device_numbers
|
256
|
|
- console.log(this.device_numbers)
|
|
265
|
+
|
257
|
266
|
this.patients = patients
|
258
|
267
|
|
259
|
268
|
this.first_template = templates[0]
|
|
@@ -448,12 +457,13 @@
|
448
|
457
|
}
|
449
|
458
|
|
450
|
459
|
}else if(this.template_mode.mode == 2){
|
|
460
|
+
|
451
|
461
|
if(results.length > 0) {
|
452
|
462
|
|
453
|
463
|
var isHas_1 = headers.includes('区号')
|
454
|
|
- console.log(isHas_1)
|
|
464
|
+ console.log("区号",isHas_1)
|
455
|
465
|
var isHas_2 = headers.includes('机号')
|
456
|
|
- console.log(isHas_2)
|
|
466
|
+ console.log("机号",isHas_2)
|
457
|
467
|
|
458
|
468
|
var isHas_3 = headers.includes('周一')
|
459
|
469
|
console.log(isHas_3)
|
|
@@ -517,7 +527,7 @@
|
517
|
527
|
|
518
|
528
|
var isHas_23 = headers.includes('_13')
|
519
|
529
|
console.log(isHas_1)
|
520
|
|
-
|
|
530
|
+
|
521
|
531
|
var isHas_24 = headers.includes('周一_1')
|
522
|
532
|
var isHas_25 = headers.includes('_14')
|
523
|
533
|
var isHas_26 = headers.includes('_15')
|
|
@@ -581,7 +591,7 @@
|
581
|
591
|
}
|
582
|
592
|
|
583
|
593
|
}
|
584
|
|
-
|
|
594
|
+
|
585
|
595
|
const obj = {}
|
586
|
596
|
zones = zones.reduce((cur, next) => {
|
587
|
597
|
obj[next] ? '' : obj[next] = true && cur.push(next)
|
|
@@ -593,9 +603,8 @@
|
593
|
603
|
obj2[next] ? '' : obj2[next] = true && cur.push(next)
|
594
|
604
|
return cur
|
595
|
605
|
}, []) // 设置cur默认类型为数组,并且初始值为空的数组
|
596
|
|
- console.log("1111111111")
|
597
|
|
- console.log(deviceNumber)
|
598
|
|
- console.log("1111111111")
|
|
606
|
+
|
|
607
|
+
|
599
|
608
|
|
600
|
609
|
var total_zones = []
|
601
|
610
|
var total_device_number = []
|
|
@@ -623,19 +632,20 @@
|
623
|
632
|
}
|
624
|
633
|
}
|
625
|
634
|
|
626
|
|
- //
|
|
635
|
+
|
627
|
636
|
|
628
|
637
|
let tempObj = null
|
629
|
638
|
if (results.length > 0) {
|
630
|
639
|
tempObj = results[0]
|
631
|
640
|
}
|
632
|
|
-
|
|
641
|
+
|
633
|
642
|
let datas = []
|
634
|
643
|
for (let i = 0; i < results.length; i++) {
|
635
|
644
|
for (let key in results[i + 1]) {
|
|
645
|
+
|
636
|
646
|
let tempObjTwo = { partition_name: '', device_number_name: '' }
|
637
|
|
-
|
638
|
|
- if (key != '区号' && key != '机号') {
|
|
647
|
+ //去除空的
|
|
648
|
+ if (key != '区号' && key != '机号' && results[i+1][key]!="") {
|
639
|
649
|
let obj = {}
|
640
|
650
|
obj['name'] = results[i + 1][key].replace(/\s/g,"")
|
641
|
651
|
if (tempObj[key] == '上午') {
|
|
@@ -657,7 +667,7 @@
|
657
|
667
|
|
658
|
668
|
tempObjTwo = obj
|
659
|
669
|
}
|
660
|
|
-
|
|
670
|
+
|
661
|
671
|
tempObjTwo['partition_name'] = results[i + 1]['区号']
|
662
|
672
|
tempObjTwo['device_number_name'] = results[i + 1]['机号']
|
663
|
673
|
tempObjTwo['index'] = i + 3
|
|
@@ -708,7 +718,7 @@
|
708
|
718
|
|
709
|
719
|
}
|
710
|
720
|
}
|
711
|
|
-
|
|
721
|
+
|
712
|
722
|
//校验文档中同一天同个人是否存在多个排班
|
713
|
723
|
let is_exist_repeat = false
|
714
|
724
|
const obj3 = {}
|
|
@@ -731,7 +741,7 @@
|
731
|
741
|
obj[key] = value
|
732
|
742
|
tempObjArr.push(obj)
|
733
|
743
|
}
|
734
|
|
-
|
|
744
|
+
|
735
|
745
|
for (let i = 0; i < tempObjArr.length; i++) {
|
736
|
746
|
for (let key in tempObjArr[i]) {
|
737
|
747
|
let arr = tempObjArr[i][key]
|
|
@@ -740,13 +750,17 @@
|
740
|
750
|
obj[next] ? '' : obj[next] = true && cur.push(next)
|
741
|
751
|
return cur
|
742
|
752
|
}, []) // 设置cur默认类型为数组,并且初始值为空的数组
|
743
|
|
-
|
|
753
|
+
|
|
754
|
+ //这个地方
|
744
|
755
|
if (tempObjArr[i][key].length > arr.length) { //比对原数组和去重后的原数组总数,不同的话则存在重复元素
|
745
|
756
|
is_exist_repeat = true
|
|
757
|
+
|
746
|
758
|
}
|
747
|
759
|
}
|
748
|
760
|
}
|
749
|
|
-
|
|
761
|
+
|
|
762
|
+
|
|
763
|
+
|
750
|
764
|
let isHeader = true
|
751
|
765
|
|
752
|
766
|
if(this.template_mode.mode == 1){
|
|
@@ -803,7 +817,7 @@
|
803
|
817
|
this.template_mode = mode
|
804
|
818
|
this.origin_mode = mode.mode
|
805
|
819
|
this.device_numbers = device_numbers
|
806
|
|
- console.log(this.device_numbers)
|
|
820
|
+
|
807
|
821
|
this.patients = patients
|
808
|
822
|
|
809
|
823
|
this.first_template = templates[0]
|
|
@@ -838,7 +852,7 @@
|
838
|
852
|
}
|
839
|
853
|
|
840
|
854
|
}, getTemplateByWeek(key) {
|
841
|
|
- console.log(key)
|
|
855
|
+
|
842
|
856
|
switch (key) {
|
843
|
857
|
case '周一' : //本周一
|
844
|
858
|
|
|
@@ -1641,7 +1655,7 @@
|
1641
|
1655
|
|
1642
|
1656
|
},
|
1643
|
1657
|
getDateByResultsStr(key) {
|
1644
|
|
-
|
|
1658
|
+
|
1645
|
1659
|
switch (key) {
|
1646
|
1660
|
case '周一' : //本周一
|
1647
|
1661
|
|
|
@@ -2201,14 +2215,17 @@
|
2201
|
2215
|
}
|
2202
|
2216
|
this.origin_mode = mode
|
2203
|
2217
|
}
|
2204
|
|
- }, formatJson(filterVal, jsonData) {
|
|
2218
|
+ },
|
|
2219
|
+ formatJson(filterVal, jsonData) {
|
2205
|
2220
|
return jsonData.map(v =>
|
2206
|
2221
|
filterVal.map(j => {
|
2207
|
2222
|
return v[j]
|
2208
|
2223
|
|
2209
|
2224
|
})
|
2210
|
2225
|
)
|
2211
|
|
- }, import_file: function() {
|
|
2226
|
+ },
|
|
2227
|
+ import_file: function() {
|
|
2228
|
+
|
2212
|
2229
|
this.downloadLoading = true
|
2213
|
2230
|
import('@/vendor/Export2Excel').then(excel => {
|
2214
|
2231
|
const filterVal = [
|
|
@@ -2221,10 +2238,10 @@
|
2221
|
2238
|
const headerForModeOne = ['', '', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上']
|
2222
|
2239
|
const headerForModeTwo = ['', '', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上']
|
2223
|
2240
|
|
2224
|
|
- // const merges = ['A1:A2', 'B1:B2']
|
2225
|
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
|
2243
|
var list = []
|
|
2244
|
+
|
2228
|
2245
|
let i = 0
|
2229
|
2246
|
for (let key in this.partitions) {
|
2230
|
2247
|
var tempValue
|
|
@@ -2243,36 +2260,331 @@
|
2243
|
2260
|
let obj = {}
|
2244
|
2261
|
obj['区号'] = this.partitions[key].name
|
2245
|
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
|
2321
|
list.push(obj)
|
2247
|
2322
|
}
|
2248
|
|
-
|
2249
|
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
|
2589
|
excel.export_json_to_excel({
|
2278
|
2590
|
multiHeader,
|
|
@@ -2283,7 +2595,7 @@
|
2283
|
2595
|
|
2284
|
2596
|
})
|
2285
|
2597
|
|
2286
|
|
- }
|
|
2598
|
+
|
2287
|
2599
|
|
2288
|
2600
|
this.downloadLoading = false
|
2289
|
2601
|
})
|