|
@@ -60,6 +60,7 @@
|
60
|
60
|
format="yyyy-MM-dd"
|
61
|
61
|
value-format="yyyy-MM-dd"
|
62
|
62
|
></el-date-picker>
|
|
63
|
+ <el-button type="primary" @click="export_file()" :loading="downloadLoading">导出</el-button>
|
63
|
64
|
</div>
|
64
|
65
|
<div class="tableTitle">统计图</div>
|
65
|
66
|
<div>
|
|
@@ -178,7 +179,12 @@
|
178
|
179
|
start_nurse_count:total_start_nurse, -->
|
179
|
180
|
<el-table-column label="合计" align="center">
|
180
|
181
|
<template slot-scope="scope">
|
181
|
|
- {{scope.row.finish_nuser_count + scope.row.washpipe_nuser_count + scope.row.puncture_count + scope.row.cure_count + scope.row.mission_count + scope.row.change_nuser_count+scope.row.difficult_nuser_count+scope.row.new_nuser_count +scope.row.start_nuser_count ?scope.row.puncture_count + scope.row.cure_count + scope.row.mission_count+scope.row.change_nuser_count+scope.row.difficult_nuser_count+scope.row.new_nuser_count+scope.row.start_nuser_count:''}}
|
|
182
|
+ {{scope.row.finish_nuser_count + scope.row.washpipe_nuser_count + scope.row.puncture_count +
|
|
183
|
+ scope.row.cure_count + scope.row.mission_count + scope.row.change_nuser_count+
|
|
184
|
+ scope.row.difficult_nuser_count+scope.row.new_nuser_count +scope.row.start_nuser_count ?
|
|
185
|
+ scope.row.puncture_count + scope.row.cure_count + scope.row.change_nuser_count+scope.row.difficult_nuser_count+
|
|
186
|
+ scope.row.difficult_nuser_count+scope.row.finish_nuser_count+scope.row.start_nuser_count +
|
|
187
|
+ scope.row.washpipe_nuser_count+scope.row.mission_count:''}}
|
182
|
188
|
</template>
|
183
|
189
|
</el-table-column>
|
184
|
190
|
</el-table>
|
|
@@ -348,6 +354,8 @@
|
348
|
354
|
]
|
349
|
355
|
},
|
350
|
356
|
modeList:[],
|
|
357
|
+ downloadLoading: false,
|
|
358
|
+ list:[]
|
351
|
359
|
};
|
352
|
360
|
},
|
353
|
361
|
methods: {
|
|
@@ -400,7 +408,6 @@
|
400
|
408
|
var resp = rs.data
|
401
|
409
|
console.log("列表2323323232323233232332323223233223233223",resp)
|
402
|
410
|
if (resp.state == 1) {
|
403
|
|
-
|
404
|
411
|
let total_cure = 0
|
405
|
412
|
let total_puncture = 0
|
406
|
413
|
let total_mission = 0
|
|
@@ -411,7 +418,7 @@
|
411
|
418
|
let total_finish_nurse = 0
|
412
|
419
|
let total_washpipe_nurse = 0
|
413
|
420
|
this.loading = false
|
414
|
|
-
|
|
421
|
+ var list=[]
|
415
|
422
|
for (let i = 0; i < resp.data.data.length; i++) {
|
416
|
423
|
total_cure = total_cure + resp.data.data[i].cure_count
|
417
|
424
|
total_puncture = total_puncture + resp.data.data[i].puncture_count
|
|
@@ -421,15 +428,15 @@
|
421
|
428
|
total_diffcult_nurse = total_diffcult_nurse + resp.data.data[i].difficult_nuser_count
|
422
|
429
|
total_new_fistula_nurse = total_new_fistula_nurse + resp.data.data[i].new_nuser_count
|
423
|
430
|
total_start_nurse = total_start_nurse + resp.data.data[i].start_nuser_count
|
424
|
|
- console.log( resp.data.data[i].start_nuser_count)
|
|
431
|
+ // console.log( resp.data.data[i].start_nuser_count)
|
425
|
432
|
|
426
|
|
- console.log(total_start_nurse)
|
|
433
|
+ // console.log(total_start_nurse)
|
427
|
434
|
total_finish_nurse = total_finish_nurse + resp.data.data[i].finish_nuser_count
|
428
|
435
|
total_washpipe_nurse = total_washpipe_nurse + resp.data.data[i].washpipe_nuser_count
|
429
|
436
|
this.tableData.push(resp.data.data[i])
|
430
|
|
- }
|
431
|
|
- console.log(total_start_nurse)
|
432
|
|
-
|
|
437
|
+
|
|
438
|
+ }
|
|
439
|
+ // this.list.push(obj)
|
433
|
440
|
this.tableData.push( {
|
434
|
441
|
user_name:"合计",
|
435
|
442
|
cure_count:total_cure,
|
|
@@ -442,10 +449,13 @@
|
442
|
449
|
finish_nuser_count:total_finish_nurse,
|
443
|
450
|
washpipe_nuser_count:total_washpipe_nurse,
|
444
|
451
|
})
|
445
|
|
- console.log("hhhhhhh23232233223",this.tableData)
|
|
452
|
+ console.log('33333',this.tableData)
|
|
453
|
+
|
446
|
454
|
var dialysisCount = resp.data.dialysisCount
|
447
|
455
|
console.log("dialysisCount",dialysisCount)
|
448
|
456
|
for(let i=0;i<dialysisCount.length;i++){
|
|
457
|
+ // for()
|
|
458
|
+ // var obj={}
|
449
|
459
|
if(dialysisCount[i].mode_id == 1){
|
450
|
460
|
dialysisCount[i].mode_id = "HD"
|
451
|
461
|
}
|
|
@@ -510,6 +520,28 @@
|
510
|
520
|
})
|
511
|
521
|
console.log("listq23333",list)
|
512
|
522
|
this.modeList.push(...list)
|
|
523
|
+
|
|
524
|
+ for(let i=0;i<this.tableData.length;i++){
|
|
525
|
+
|
|
526
|
+ var obj={}
|
|
527
|
+ obj['name'] = this.tableData[i].user_name
|
|
528
|
+ obj['chuanci'] = this.tableData[i].puncture_count
|
|
529
|
+ obj['zhiliao'] = this.tableData[i].cure_count
|
|
530
|
+ obj['huanyao'] = this.tableData[i].change_nuser_count
|
|
531
|
+ obj['yncc'] = this.tableData[i].difficult_nuser_count
|
|
532
|
+ obj['shangji'] = this.tableData[i].start_nuser_count+'('+this.getTotalCount(this.tableData[i].admin_user_id)+')'
|
|
533
|
+ obj['xiaji'] = this.tableData[i].finish_nuser_count
|
|
534
|
+ obj['chongguan'] = this.tableData[i].washpipe_nuser_count
|
|
535
|
+ obj['xuanjiao'] = this.tableData[i].mission_count
|
|
536
|
+ obj['heji'] = this.tableData[i].puncture_count*1 +this.tableData[i].cure_count*1 +this.tableData[i].change_nuser_count*1+
|
|
537
|
+ this.tableData[i].difficult_nuser_count*1 +this.tableData[i].finish_nuser_count*1+
|
|
538
|
+ this.tableData[i].washpipe_nuser_count*1 +this.tableData[i].mission_count*1+
|
|
539
|
+ this.tableData[i].start_nuser_count*1
|
|
540
|
+ this.list.push(obj)
|
|
541
|
+ }
|
|
542
|
+
|
|
543
|
+ console.log("hhhhhhh23232233223",this.list)
|
|
544
|
+
|
513
|
545
|
} else {
|
514
|
546
|
this.loading = false
|
515
|
547
|
}
|
|
@@ -663,19 +695,88 @@
|
663
|
695
|
return y + '-' + m + '-' + d;
|
664
|
696
|
},
|
665
|
697
|
getTotalCount(adminuserid){
|
666
|
|
- console.log("adminuserid",adminuserid)
|
667
|
|
- console.log("333333",this.modeList)
|
|
698
|
+ // console.log("adminuserid",adminuserid)
|
|
699
|
+ // console.log("333333",this.modeList)
|
668
|
700
|
var name = ""
|
669
|
701
|
for(let i=0;i<this.modeList.length;i++){
|
670
|
702
|
for(let j=0;j<this.modeList[i].child.length;j++){
|
671
|
703
|
if(adminuserid == this.modeList[i].child[j].start_nurse){
|
672
|
704
|
name += (this.modeList[i].child[j].mode_id+"-"+this.modeList[i].child[j].Count) + "次"+"、"
|
|
705
|
+ // this.list[]
|
673
|
706
|
}
|
674
|
707
|
}
|
675
|
708
|
}
|
676
|
|
- console.log("name22222",name)
|
|
709
|
+ // console.log("name22222",name)
|
677
|
710
|
return name.substr(0,name.length-1)
|
678
|
|
- }
|
|
711
|
+ },
|
|
712
|
+ export_file:function(){
|
|
713
|
+ this.export_file_step_two()
|
|
714
|
+ },
|
|
715
|
+ export_file_step_two: function(){
|
|
716
|
+ this.downloadLoading = true
|
|
717
|
+ import('@/vendor/Export2Excel').then(excel => {
|
|
718
|
+ // const filterVal = [
|
|
719
|
+ // '区号',
|
|
720
|
+ // '机号'
|
|
721
|
+ // ]
|
|
722
|
+ // if (this.export_type == 0) {
|
|
723
|
+ const multiHeader = [['姓名', '穿刺', '治疗', '换药', '疑难穿刺', '上机', '下机', '冲管', '宣教小结', '合计']]
|
|
724
|
+ // const header=['姓名', '穿刺', '治疗', '换药', '疑难穿刺', '上机', '下机', '冲管', '宣教小结', '合计']
|
|
725
|
+ // const header = ['', '', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上']
|
|
726
|
+ const merges = ['A1', 'B1', 'C1', 'D1', 'E1', 'F1', 'G1', 'H1', 'I1', 'J1']
|
|
727
|
+ // var list = []
|
|
728
|
+ // let i = 0
|
|
729
|
+ // var jihaos=[]
|
|
730
|
+ // for (let key in this.tableData) {
|
|
731
|
+ // var tempValue
|
|
732
|
+ // if(this.tableData[key].admin_user_id !=''){
|
|
733
|
+ // jihaos.push(this.tableData[key].admin_user_id)
|
|
734
|
+ // // console.log('2222222',jihaos);
|
|
735
|
+ // }
|
|
736
|
+
|
|
737
|
+ // if (i == 0) {
|
|
738
|
+ // let m = 'A2' + ':' + 'A' + (1 + jihaos.length)
|
|
739
|
+ // tempValue = (2 + jihaos.length)
|
|
740
|
+ // merges.push(m)
|
|
741
|
+ // }
|
|
742
|
+ // else {
|
|
743
|
+ // let m = 'A' + (tempValue + 1) + ':' + 'A' + ((tempValue + 1) + jihaos.length - 1)
|
|
744
|
+ // tempValue = ((tempValue + 1) + jihaos.length - 1)
|
|
745
|
+ // merges.push(m)
|
|
746
|
+ // }
|
|
747
|
+ // // for (let b = 0; b < jihaos.length; b++) {
|
|
748
|
+ // let obj = {}
|
|
749
|
+ // obj['name'] = this.tableData[key].user_name
|
|
750
|
+ // // obj['区号'] = this.partitions[key].name
|
|
751
|
+ // // obj['机号'] = jihaos[b].number.toString()
|
|
752
|
+ // list.push(obj)
|
|
753
|
+ // // }
|
|
754
|
+ // // i++
|
|
755
|
+ // }
|
|
756
|
+ var data = []
|
|
757
|
+
|
|
758
|
+ this.list.map(item => {
|
|
759
|
+ // console.log('111111',item);
|
|
760
|
+ data.push(Object.values(item))
|
|
761
|
+ })
|
|
762
|
+
|
|
763
|
+ const filename = '护士工作量'
|
|
764
|
+
|
|
765
|
+ console.log('333333333',data),
|
|
766
|
+ excel.export_json_to_excel2({
|
|
767
|
+
|
|
768
|
+ multiHeader,
|
|
769
|
+ // header,
|
|
770
|
+ merges,
|
|
771
|
+ data,
|
|
772
|
+ filename
|
|
773
|
+ })
|
|
774
|
+ this.downloadLoading = false
|
|
775
|
+ // }
|
|
776
|
+
|
|
777
|
+ })
|
|
778
|
+ },
|
|
779
|
+
|
679
|
780
|
},
|
680
|
781
|
created(){
|
681
|
782
|
var date = new Date()
|