|
@@ -94,7 +94,7 @@
|
94
|
94
|
<el-table-column align="center" prop="address" label="总工时/小时">
|
95
|
95
|
<template slot-scope="scope">
|
96
|
96
|
<span v-if="scope.row.totalminute">{{ scope.row.totalminute / 60 }}</span>
|
97
|
|
- </template>
|
|
97
|
+ </template>
|
98
|
98
|
</el-table-column>
|
99
|
99
|
<el-table-column align="center" prop="attendance" label="出勤/天">
|
100
|
100
|
<!-- <span v-if='scope.row.attendance'>{{ scope.row.attendance ? scope.row.attendance : '' }}</span> -->
|
|
@@ -178,21 +178,10 @@ export default {
|
178
|
178
|
data: [],
|
179
|
179
|
barWidth: 30,
|
180
|
180
|
label: {
|
181
|
|
- normal: {
|
182
|
|
- show: true,
|
183
|
|
- position: "top",
|
184
|
|
- formatter: (params) => {
|
185
|
|
- if(this.percent.length > 0){
|
186
|
|
- let str = ''
|
187
|
|
- str = params.data + '('+ this.percent[params.dataIndex] +'%)'
|
188
|
|
- return str
|
189
|
|
- }else{
|
190
|
|
- let str = ''
|
191
|
|
- str = params.data
|
192
|
|
- return str
|
|
181
|
+ normal: {
|
|
182
|
+ show: true,
|
|
183
|
+ position: "top",
|
193
|
184
|
}
|
194
|
|
- }
|
195
|
|
- }
|
196
|
185
|
},
|
197
|
186
|
//配置样式
|
198
|
187
|
itemStyle: {
|
|
@@ -275,13 +264,12 @@ export default {
|
275
|
264
|
|
276
|
265
|
//获取所有排班种
|
277
|
266
|
this.getScheduleList()
|
278
|
|
-
|
|
267
|
+
|
279
|
268
|
// 获取统计表的数据
|
280
|
269
|
this.getlist()
|
281
|
|
-
|
282
|
|
- //获取统计图数据
|
283
|
|
- this.getchartlist()
|
284
|
|
-
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
|
285
|
273
|
},
|
286
|
274
|
methods:{
|
287
|
275
|
getDoctorList(){
|
|
@@ -295,10 +283,12 @@ export default {
|
295
|
283
|
|
296
|
284
|
this.doctorlist.push(...nurselist)
|
297
|
285
|
this.doctorlist.push(...doctorlist)
|
298
|
|
-
|
|
286
|
+
|
299
|
287
|
console.log("医护列表",this.doctorlist)
|
|
288
|
+ //获取统计图数据
|
|
289
|
+ this.getchartlist()
|
300
|
290
|
}
|
301
|
|
-
|
|
291
|
+
|
302
|
292
|
})
|
303
|
293
|
},
|
304
|
294
|
//搜索
|
|
@@ -308,15 +298,13 @@ export default {
|
308
|
298
|
this.end_time = this.getTimestamp(this.weekDayArr[6])
|
309
|
299
|
}
|
310
|
300
|
const params = {
|
311
|
|
- keyword:this.keywords,
|
312
|
|
- start_time:this.start_time,
|
313
|
|
- end_time:this.end_time,
|
|
301
|
+ keyword:this.keywords,
|
314
|
302
|
}
|
315
|
303
|
console.log("params",params)
|
316
|
304
|
toSearchTotal(params).then(response=>{
|
317
|
305
|
if(response.data.state == 1){
|
318
|
|
- var scheudleTotal = response.data.data.scheduletotal
|
319
|
|
- console.log("scheduletotal",scheudleTotal)
|
|
306
|
+ var scheudleTotal = response.data.data.scheduletotal
|
|
307
|
+ console.log("scheduletotal",scheudleTotal)
|
320
|
308
|
var list = response.data.data.list
|
321
|
309
|
console.log("list",list)
|
322
|
310
|
var workday = response.data.data.workDay
|
|
@@ -364,9 +352,9 @@ export default {
|
364
|
352
|
}
|
365
|
353
|
})
|
366
|
354
|
})
|
367
|
|
-
|
|
355
|
+
|
368
|
356
|
let arr = [...newArr]
|
369
|
|
-
|
|
357
|
+
|
370
|
358
|
if(this.keywords != ''){
|
371
|
359
|
this.tableData = arr
|
372
|
360
|
}else {
|
|
@@ -374,7 +362,7 @@ export default {
|
374
|
362
|
this.doctorlist.sort(this.compare('admin_user_id'))
|
375
|
363
|
this.doctorlist.forEach((item, index) => {
|
376
|
364
|
if (arr[index] && item.admin_user_id == arr[index].doctor_id) {
|
377
|
|
-
|
|
365
|
+
|
378
|
366
|
}else{
|
379
|
367
|
arr.splice(index, 0, {user_name: item.user_name, doctor_id: item.admin_user_id, list: []})
|
380
|
368
|
}
|
|
@@ -383,7 +371,7 @@ export default {
|
383
|
371
|
this.tableData = arr
|
384
|
372
|
}
|
385
|
373
|
}
|
386
|
|
- })
|
|
374
|
+ })
|
387
|
375
|
},
|
388
|
376
|
formatDate(date){
|
389
|
377
|
var year = date.getFullYear()+'.'
|
|
@@ -416,7 +404,6 @@ export default {
|
416
|
404
|
this.nowYear = this.nowYear - 1
|
417
|
405
|
}
|
418
|
406
|
this.weekNum = this.weekNum - 1
|
419
|
|
- this.getlist()
|
420
|
407
|
},
|
421
|
408
|
//下一周
|
422
|
409
|
nextclick(){
|
|
@@ -430,7 +417,6 @@ export default {
|
430
|
417
|
this.weekNum = this.getYearWeek(year, month, date)
|
431
|
418
|
this.nowYear = this.nowYear + 1
|
432
|
419
|
}
|
433
|
|
- this.getlist()
|
434
|
420
|
},
|
435
|
421
|
getYearWeek(year,month,date){
|
436
|
422
|
/*
|
|
@@ -557,19 +543,19 @@ export default {
|
557
|
543
|
}
|
558
|
544
|
})
|
559
|
545
|
})
|
560
|
|
-
|
|
546
|
+
|
561
|
547
|
let arr = [...newArr]
|
562
|
548
|
|
563
|
549
|
arr.sort(this.compare('doctor_id'))
|
564
|
550
|
this.doctorlist.sort(this.compare('admin_user_id'))
|
565
|
551
|
this.doctorlist.forEach((item, index) => {
|
566
|
552
|
if (arr[index] && item.admin_user_id == arr[index].doctor_id) {
|
567
|
|
-
|
|
553
|
+
|
568
|
554
|
}else{
|
569
|
555
|
arr.splice(index, 0, {user_name: item.user_name, doctor_id: item.admin_user_id, list: []})
|
570
|
556
|
}
|
571
|
557
|
})
|
572
|
|
-
|
|
558
|
+
|
573
|
559
|
|
574
|
560
|
console.log('newArr',arr)
|
575
|
561
|
this.tableData = arr
|
|
@@ -583,10 +569,8 @@ export default {
|
583
|
569
|
}
|
584
|
570
|
const params = {
|
585
|
571
|
doctor_type: parseInt(val),
|
586
|
|
- start_time:this.start_time,
|
587
|
|
- end_time:this.end_time
|
588
|
572
|
}
|
589
|
|
- // console.log("params",params)
|
|
573
|
+ console.log("params",params)
|
590
|
574
|
changeOption(params).then(response=>{
|
591
|
575
|
if(response.data.state == 1){
|
592
|
576
|
var scheudleTotal = response.data.data.scheduletotal
|
|
@@ -638,19 +622,19 @@ export default {
|
638
|
622
|
}
|
639
|
623
|
})
|
640
|
624
|
})
|
641
|
|
-
|
|
625
|
+
|
642
|
626
|
let arr = [...newArr]
|
643
|
627
|
if(val == 0){
|
644
|
628
|
arr.sort(this.compare('doctor_id'))
|
645
|
629
|
this.doctorlist.sort(this.compare('admin_user_id'))
|
646
|
630
|
this.doctorlist.forEach((item, index) => {
|
647
|
631
|
if (arr[index] && item.admin_user_id == arr[index].doctor_id) {
|
648
|
|
-
|
|
632
|
+
|
649
|
633
|
}else{
|
650
|
634
|
arr.splice(index, 0, {user_name: item.user_name, doctor_id: item.admin_user_id, list: []})
|
651
|
635
|
}
|
652
|
636
|
})
|
653
|
|
-
|
|
637
|
+
|
654
|
638
|
|
655
|
639
|
console.log('newArr',arr)
|
656
|
640
|
this.tableData = arr
|
|
@@ -659,12 +643,12 @@ export default {
|
659
|
643
|
this.doctorArr.sort(this.compare('admin_user_id'))
|
660
|
644
|
this.doctorArr.forEach((item, index) => {
|
661
|
645
|
if (arr[index] && item.admin_user_id == arr[index].doctor_id) {
|
662
|
|
-
|
|
646
|
+
|
663
|
647
|
}else{
|
664
|
648
|
arr.splice(index, 0, {user_name: item.user_name, doctor_id: item.admin_user_id, list: []})
|
665
|
649
|
}
|
666
|
650
|
})
|
667
|
|
-
|
|
651
|
+
|
668
|
652
|
|
669
|
653
|
console.log('newArr',arr)
|
670
|
654
|
this.tableData = arr
|
|
@@ -673,17 +657,17 @@ export default {
|
673
|
657
|
this.nurseArr.sort(this.compare('admin_user_id'))
|
674
|
658
|
this.nurseArr.forEach((item, index) => {
|
675
|
659
|
if (arr[index] && item.admin_user_id == arr[index].doctor_id) {
|
676
|
|
-
|
|
660
|
+
|
677
|
661
|
}else{
|
678
|
662
|
arr.splice(index, 0, {user_name: item.user_name, doctor_id: item.admin_user_id, list: []})
|
679
|
663
|
}
|
680
|
664
|
})
|
681
|
|
-
|
|
665
|
+
|
682
|
666
|
|
683
|
667
|
console.log('newArr',arr)
|
684
|
668
|
this.tableData = arr
|
685
|
669
|
}
|
686
|
|
-
|
|
670
|
+
|
687
|
671
|
}
|
688
|
672
|
})
|
689
|
673
|
},
|
|
@@ -714,26 +698,60 @@ export default {
|
714
|
698
|
}
|
715
|
699
|
})
|
716
|
700
|
}
|
717
|
|
-
|
|
701
|
+
|
718
|
702
|
}
|
719
|
703
|
})
|
720
|
704
|
return Count
|
721
|
|
- }
|
|
705
|
+ }
|
722
|
706
|
},
|
723
|
707
|
toPrint(){
|
724
|
708
|
this.$router.push({
|
725
|
709
|
path: '/medicalScheduling/statistics/print',
|
726
|
710
|
// query: { date: date }
|
727
|
|
- })
|
|
711
|
+ })
|
728
|
712
|
},
|
729
|
713
|
//获取统计图数据
|
730
|
714
|
getchartlist(){
|
731
|
715
|
getchartlist().then(response=>{
|
732
|
|
- if(response.data.state == 1){
|
733
|
|
- var workdaylist = response.data.data.workDaylist
|
734
|
|
- console.log("早年公共",workdaylist)
|
735
|
|
- }
|
|
716
|
+ if(response.data.state == 1){
|
|
717
|
+ var workdaylist = response.data.data.workDaylist
|
|
718
|
+ console.log("早年公共",workdaylist)
|
|
719
|
+
|
|
720
|
+
|
|
721
|
+ let arr = [...workdaylist]
|
|
722
|
+
|
|
723
|
+ arr.sort(this.compare('doctor_id'))
|
|
724
|
+ this.doctorlist.sort(this.compare('admin_user_id'))
|
|
725
|
+ this.doctorlist.forEach((item, index) => {
|
|
726
|
+ if (arr[index] && item.admin_user_id == arr[index].doctor_id) {
|
|
727
|
+
|
|
728
|
+ }else{
|
|
729
|
+ arr.splice(index, 0, {user_name: item.user_name, doctor_id: item.admin_user_id,workminute: 0})
|
|
730
|
+ }
|
|
731
|
+ })
|
|
732
|
+ console.log('arrrrrrrrrrrrrrr',arr)
|
|
733
|
+
|
|
734
|
+ let chartX = []
|
|
735
|
+ let chartY = []
|
|
736
|
+ arr.map(item => {
|
|
737
|
+ chartX.push(item.user_name)
|
|
738
|
+ chartY.push(item.workminute / 60)
|
|
739
|
+ })
|
|
740
|
+ this.chart.xAxis.data = chartX
|
|
741
|
+ this.chart.series[0].data = chartY
|
|
742
|
+
|
|
743
|
+ this.getArrLength(this.chart.xAxis.data)
|
|
744
|
+ }
|
736
|
745
|
})
|
|
746
|
+ },
|
|
747
|
+ getArrLength(result){
|
|
748
|
+ if(result.length > 10){
|
|
749
|
+ var dataZoom_end = (10/result.length)*100;
|
|
750
|
+ this.chart.dataZoom[0].end = dataZoom_end
|
|
751
|
+ }else{
|
|
752
|
+ var dataZoom_end = 100;
|
|
753
|
+ this.chart.dataZoom[0].end = dataZoom_end
|
|
754
|
+ }
|
737
|
755
|
}
|
738
|
756
|
}
|
739
|
757
|
}
|
|
@@ -769,4 +787,10 @@ export default {
|
769
|
787
|
.pointTitle {
|
770
|
788
|
font-size: 13px;
|
771
|
789
|
}
|
|
790
|
+.statisticsTable{
|
|
791
|
+ ::-webkit-scrollbar{
|
|
792
|
+ height:15px !important;
|
|
793
|
+ }
|
|
794
|
+}
|
|
795
|
+
|
772
|
796
|
</style>
|