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