|
|
@@ -112,8 +112,8 @@ export default {
|
|
112
|
112
|
rankCount: 0
|
|
113
|
113
|
},
|
|
114
|
114
|
// switch-tab配置
|
|
115
|
|
- inspectionSwitchValue: 0,
|
|
116
|
|
- testSwitchValue: 0,
|
|
|
115
|
+ inspectionSwitchValue: 'station',
|
|
|
116
|
+ testSwitchValue: 'station',
|
|
117
|
117
|
|
|
118
|
118
|
// 测试排名数据
|
|
119
|
119
|
testRanking: {
|
|
|
@@ -136,22 +136,29 @@ export default {
|
|
136
|
136
|
isZhanZhang: state => state.eikonLevel.isZhanZhang,
|
|
137
|
137
|
currentLevel: state => state.eikonLevel.currentLevel,
|
|
138
|
138
|
}),
|
|
139
|
|
- ...mapGetters('eikonLevel', ['isZhanZhang', 'isPersonal']),
|
|
|
139
|
+ ...mapGetters('eikonLevel', ['isZhanZhang', 'isPersonal', 'isJingLi', 'isKeZhang', 'isBanZuZhang']),
|
|
140
|
140
|
switchOptions() {
|
|
141
|
|
- if (this.isPersonal) {
|
|
|
141
|
+ if (this.isKeZhang) {
|
|
142
|
142
|
return [
|
|
143
|
|
- { value: 0, label: '全站' },
|
|
144
|
|
- { value: 1, label: '本科' },
|
|
145
|
|
- { value: 2, label: '本班' }
|
|
|
143
|
+ { value: 'station', label: '全站' },
|
|
|
144
|
+ { value: 'brigade', label: '本大队' },
|
|
146
|
145
|
]
|
|
147
|
146
|
}
|
|
148
|
147
|
if (this.isBanZuZhang) {
|
|
149
|
148
|
return [
|
|
150
|
|
- { value: 0, label: '全站' },
|
|
151
|
|
- { value: 1, label: '本科' },
|
|
152
|
|
-
|
|
|
149
|
+ { value: 'station', label: '全站' },
|
|
|
150
|
+ { value: 'brigade', label: '本大队' },
|
|
|
151
|
+ ]
|
|
|
152
|
+ }
|
|
|
153
|
+ if (this.isPersonal) {
|
|
|
154
|
+ return [
|
|
|
155
|
+ { value: 'station', label: '全站' },
|
|
|
156
|
+ { value: 'brigade', label: '本大队' },
|
|
|
157
|
+ { value: 'department', label: '本主管' },
|
|
|
158
|
+ { value: 'team', label: '本班' }
|
|
153
|
159
|
]
|
|
154
|
160
|
}
|
|
|
161
|
+
|
|
155
|
162
|
return []
|
|
156
|
163
|
},
|
|
157
|
164
|
percentage() {
|
|
|
@@ -224,9 +231,9 @@ export default {
|
|
224
|
231
|
]
|
|
225
|
232
|
this.rectificationTotal = onTimeCompletedCount + overTimeCompletedCount
|
|
226
|
233
|
},
|
|
227
|
|
-
|
|
228
|
234
|
|
|
229
|
|
-
|
|
|
235
|
+
|
|
|
236
|
+
|
|
230
|
237
|
|
|
231
|
238
|
// 初始化问题分布雷达图
|
|
232
|
239
|
initIssueRadarChart() {
|
|
|
@@ -449,10 +456,10 @@ export default {
|
|
449
|
456
|
return {
|
|
450
|
457
|
value: values,
|
|
451
|
458
|
name: dept.deptName,
|
|
452
|
|
-
|
|
|
459
|
+
|
|
453
|
460
|
// lineStyle: {
|
|
454
|
461
|
// color: color.line,
|
|
455
|
|
-
|
|
|
462
|
+
|
|
456
|
463
|
// },
|
|
457
|
464
|
// itemStyle: {
|
|
458
|
465
|
// color: color.line
|
|
|
@@ -598,25 +605,30 @@ export default {
|
|
598
|
605
|
const departmentTotal = portraitData.departmentTotal || 0;
|
|
599
|
606
|
const teamRanking = portraitData.teamRanking || 0;
|
|
600
|
607
|
const teamTotal = portraitData.teamTotal || 0;
|
|
601
|
|
-
|
|
602
|
|
- if (this.inspectionSwitchValue == 0) {
|
|
|
608
|
+ const brigadeTotal = portraitData.brigadeTotal || 0;
|
|
|
609
|
+ const brigadeRanking = portraitData.brigadeRanking || 0;
|
|
|
610
|
+ console.log('portraitData:', this.portraitData);
|
|
|
611
|
+ if (this.inspectionSwitchValue == 'station') {
|
|
603
|
612
|
this.rankData = {
|
|
604
|
613
|
rank: stationRanking,
|
|
605
|
614
|
rankCount: stationTotal
|
|
606
|
615
|
}
|
|
607
|
|
- } else if (this.inspectionSwitchValue == 1) {
|
|
|
616
|
+ } else if (this.inspectionSwitchValue == 'brigade') {
|
|
|
617
|
+ this.rankData = {
|
|
|
618
|
+ rank: brigadeRanking,
|
|
|
619
|
+ rankCount: brigadeTotal
|
|
|
620
|
+ }
|
|
|
621
|
+ } else if (this.inspectionSwitchValue == 'department') {
|
|
608
|
622
|
this.rankData = {
|
|
609
|
623
|
rank: departmentRanking,
|
|
610
|
624
|
rankCount: departmentTotal
|
|
611
|
625
|
}
|
|
612
|
|
- } else if (this.inspectionSwitchValue == 2) {
|
|
|
626
|
+ } else if (this.inspectionSwitchValue == 'team') {
|
|
613
|
627
|
this.rankData = {
|
|
614
|
628
|
rank: teamRanking,
|
|
615
|
629
|
rankCount: teamTotal
|
|
616
|
630
|
}
|
|
617
|
631
|
}
|
|
618
|
|
-
|
|
619
|
|
-
|
|
620
|
632
|
},
|
|
621
|
633
|
|
|
622
|
634
|
// 测试排名切换处理
|
|
|
@@ -626,27 +638,28 @@ export default {
|
|
626
|
638
|
const { rankingStats } = this.profileData || {};
|
|
627
|
639
|
|
|
628
|
640
|
|
|
629
|
|
- if (this.testSwitchValue == 0) {
|
|
|
641
|
+ if (this.testSwitchValue == 'station') {
|
|
630
|
642
|
this.testRankData = {
|
|
631
|
643
|
rank: rankingStats?.siteRanking || 0,
|
|
632
|
644
|
rankCount: this.isKeZhang ? rankingStats?.siteTotalDepts || 0 : rankingStats?.siteTotalUsers || 0
|
|
633
|
645
|
}
|
|
634
|
|
- } else if (this.testSwitchValue == 1) {
|
|
|
646
|
+ } else if (this.testSwitchValue == 'brigade') {
|
|
|
647
|
+ this.testRankData = {
|
|
|
648
|
+ rank: rankingStats?.deptRanking || 0,
|
|
|
649
|
+ rankCount: rankingStats?.deptTotalTeams || 0
|
|
|
650
|
+ }
|
|
|
651
|
+ } else if (this.testSwitchValue == 'department') {
|
|
635
|
652
|
this.testRankData = {
|
|
636
|
653
|
rank: rankingStats?.deptRanking || 0,
|
|
637
|
654
|
rankCount: rankingStats?.deptTotalUsers || 0
|
|
638
|
655
|
}
|
|
639
|
|
- } else if (this.testSwitchValue == 2) {
|
|
|
656
|
+ } else if (this.testSwitchValue == 'team') {
|
|
640
|
657
|
this.testRankData = {
|
|
641
|
658
|
rank: rankingStats?.teamRanking || 0,
|
|
642
|
659
|
rankCount: rankingStats?.teamTotalUsers || 0
|
|
643
|
660
|
}
|
|
644
|
661
|
}
|
|
645
|
662
|
},
|
|
646
|
|
-
|
|
647
|
|
-
|
|
648
|
|
-
|
|
649
|
|
-
|
|
650
|
663
|
}
|
|
651
|
664
|
}
|
|
652
|
665
|
</script>
|