|
|
@@ -26,7 +26,7 @@
|
|
26
|
26
|
</div>
|
|
27
|
27
|
|
|
28
|
28
|
<!-- 角色切换组件(班组长显示) -->
|
|
29
|
|
- <SelectTag v-if="role.includes('banzuzhang')" :tags="roleTags" :selected-value="selectedRole"
|
|
|
29
|
+ <SelectTag v-if="role.includes('xiaozuzhang')" :tags="roleTags" :selected-value="selectedRole"
|
|
30
|
30
|
@change="handleRoleChange" class="role-selector" />
|
|
31
|
31
|
</div>
|
|
32
|
32
|
|
|
|
@@ -193,14 +193,14 @@ export default {
|
|
193
|
193
|
},
|
|
194
|
194
|
// 是否为班组视图:角色是班组长或者selectedRole为team
|
|
195
|
195
|
isTeamView() {
|
|
196
|
|
- return this.role.includes('banzuzhang') ? this.selectedRole === 'team' : this.role.includes('banzuzhang')
|
|
|
196
|
+ return this.role.includes('xiaozuzhang') ? this.selectedRole === 'team' : this.role.includes('xiaozuzhang')
|
|
197
|
197
|
},
|
|
198
|
198
|
// 是否为个人视图:selectedRole为individual或者角色是SecurityCheck
|
|
199
|
199
|
isIndividualView() {
|
|
200
|
|
- return this.role.includes('banzuzhang') ? this.selectedRole === 'individual' : this.role.includes('SecurityCheck')
|
|
|
200
|
+ return this.role.includes('xiaozuzhang') ? this.selectedRole === 'individual' : this.role.includes('SecurityCheck')
|
|
201
|
201
|
},
|
|
202
|
202
|
isBrigade() {
|
|
203
|
|
- return this.role.includes('jingli') || this.role.includes('xingzheng')
|
|
|
203
|
+ return this.role.includes('bumenjingli') || this.role.includes('xingzheng')
|
|
204
|
204
|
},
|
|
205
|
205
|
// 是否为站长或质检科角色
|
|
206
|
206
|
isZhanZhang() {
|
|
|
@@ -294,12 +294,12 @@ export default {
|
|
294
|
294
|
attendanceItems() {
|
|
295
|
295
|
let res = {};
|
|
296
|
296
|
|
|
297
|
|
- if (this.role.includes('kezhang') || this.isZhanZhang || this.isBrigade) {
|
|
|
297
|
+ if (this.role.includes('banzuzhang') || this.isZhanZhang || this.isBrigade) {
|
|
298
|
298
|
// 班组长选择班组视图
|
|
299
|
299
|
if (this.isZhanZhang) {
|
|
300
|
300
|
res = this.attendanceStats.stationLeaderStats
|
|
301
|
301
|
}
|
|
302
|
|
- if (this.role.includes('kezhang')) {
|
|
|
302
|
+ if (this.role.includes('banzuzhang')) {
|
|
303
|
303
|
res = this.attendanceStats.sectionLeaderStats
|
|
304
|
304
|
}
|
|
305
|
305
|
if (this.isBrigade) {
|
|
|
@@ -343,7 +343,7 @@ export default {
|
|
343
|
343
|
const { securityCheckerData } = this.seizeData;
|
|
344
|
344
|
const { pendingCount } = securityCheckerData || {};
|
|
345
|
345
|
return pendingCount;
|
|
346
|
|
- } else if (this.role.includes('kezhang')) {
|
|
|
346
|
+ } else if (this.role.includes('banzuzhang')) {
|
|
347
|
347
|
const { sectionMasterData } = this.seizeData;
|
|
348
|
348
|
const { pendingCount } = sectionMasterData || {};
|
|
349
|
349
|
// 科长、SecurityCheck角色:显示班组、科级和站级排名
|
|
|
@@ -732,7 +732,7 @@ export default {
|
|
732
|
732
|
const { startDate, endDate } = this.calculateDateRange(this.selectedTimeRange);
|
|
733
|
733
|
params.startDate = startDate;
|
|
734
|
734
|
params.endDate = endDate;
|
|
735
|
|
- if (!this.isZhanZhang && !this.role.includes('kezhang')) {
|
|
|
735
|
+ if (!this.isZhanZhang && !this.role.includes('banzuzhang')) {
|
|
736
|
736
|
params.dataSource = this.selectedRole;
|
|
737
|
737
|
}
|
|
738
|
738
|
|
|
|
@@ -1006,7 +1006,7 @@ export default {
|
|
1006
|
1006
|
return '本人';
|
|
1007
|
1007
|
} else if (this.isTeamView) {
|
|
1008
|
1008
|
return '班组';
|
|
1009
|
|
- } else if (this.role.includes('kezhang')) {
|
|
|
1009
|
+ } else if (this.role.includes('banzuzhang')) {
|
|
1010
|
1010
|
return '主管';
|
|
1011
|
1011
|
} else if (this.isZhanZhang) {
|
|
1012
|
1012
|
return '全站';
|
|
|
@@ -1035,7 +1035,7 @@ export default {
|
|
1035
|
1035
|
{ label: '大队平均', value: ((brigadePassRate || 0) * 100).toFixed(2), isImage: false, color: brigadePassRate < personalPassRate ? '#00AE41' : '#F96060' },
|
|
1036
|
1036
|
{ label: '站平均', value: ((stationPassRate || 0) * 100).toFixed(2), isImage: false, color: stationPassRate < teamPassRate ? '#00AE41' : '#F96060' }
|
|
1037
|
1037
|
];
|
|
1038
|
|
- } else if (this.role.includes('kezhang')) {
|
|
|
1038
|
+ } else if (this.role.includes('banzuzhang')) {
|
|
1039
|
1039
|
// kezhang角色:主管、站平均、前三名班组(isImage: true)
|
|
1040
|
1040
|
return [
|
|
1041
|
1041
|
{ label: '主管', value: ((departmentPassRate || 0) * 100).toFixed(2), isImage: false },
|
|
|
@@ -1088,7 +1088,7 @@ export default {
|
|
1088
|
1088
|
{ label: '大队平均', value: (brigadeAvgAccuracy || 0), isImage: false, color: brigadeAvgAccuracy < teamAvgAccuracy ? '#00AE41' : '#F96060' },
|
|
1089
|
1089
|
{ label: '站平均', value: (siteAvgAccuracy || 0), isImage: false, color: siteAvgAccuracy < teamAvgAccuracy ? '#00AE41' : '#F96060' }
|
|
1090
|
1090
|
];
|
|
1091
|
|
- } else if (this.role.includes('kezhang')) {
|
|
|
1091
|
+ } else if (this.role.includes('banzuzhang')) {
|
|
1092
|
1092
|
// kezhang角色:主管、站平均、前三名班组(isImage: true)
|
|
1093
|
1093
|
return [
|
|
1094
|
1094
|
{ label: '主管', value: (deptAvgAccuracy || 0), isImage: false, },
|
|
|
@@ -1148,7 +1148,7 @@ export default {
|
|
1148
|
1148
|
{ label: '大队平均', value: brigadeAverage || 0, isImage: false, color: brigadeAverage < teamAverage ? '#00AE41' : '#F96060' },
|
|
1149
|
1149
|
{ label: '站平均', value: (stationAverage && stationAverage.toFixed(2)) || 0, isImage: false, color: stationAverage < teamAverage ? '#00AE41' : '#F96060' }
|
|
1150
|
1150
|
];
|
|
1151
|
|
- } else if (this.role.includes('kezhang')) {
|
|
|
1151
|
+ } else if (this.role.includes('banzuzhang')) {
|
|
1152
|
1152
|
// kezhang角色:从securityCheckerData解构
|
|
1153
|
1153
|
const { sectionMasterData } = this.seizeData;
|
|
1154
|
1154
|
const { brigadeAverage, departmentAverage, stationAverage } = sectionMasterData || {}
|
|
|
@@ -1221,7 +1221,7 @@ export default {
|
|
1221
|
1221
|
{ label: '大队排名', current: brigadeRanking || 0, total: brigadeTotal || 0, percentage: brigadeTotal ? ((brigadeRanking || 0) / brigadeTotal) * 100 : 0 },
|
|
1222
|
1222
|
{ label: '站级排名', current: stationRanking || 0, total: stationTotal || 0, percentage: stationTotal ? ((stationRanking || 0) / stationTotal) * 100 : 0, type: 'station' }
|
|
1223
|
1223
|
];
|
|
1224
|
|
- } else if (this.role.includes('kezhang')) {
|
|
|
1224
|
+ } else if (this.role.includes('banzuzhang')) {
|
|
1225
|
1225
|
return [
|
|
1226
|
1226
|
{ label: '大队排名', current: brigadeRanking || 0, total: brigadeTotal || 0, percentage: brigadeTotal ? ((brigadeRanking || 0) / brigadeTotal) * 100 : 0 },
|
|
1227
|
1227
|
{ label: '站级排名', current: stationRanking || 0, total: stationTotal || 0, percentage: stationTotal ? ((stationRanking || 0) / stationTotal) * 100 : 0, type: 'station' }
|
|
|
@@ -1255,7 +1255,7 @@ export default {
|
|
1255
|
1255
|
{ label: '大队排名', current: deptRanking?.rank || 0, total: deptRanking?.total || 0, percentage: deptRanking?.total ? ((deptRanking.rank || 0) / deptRanking.total) * 100 : 0 },
|
|
1256
|
1256
|
{ label: '站级排名', current: siteRanking?.rank || 0, total: siteRanking?.total || 0, percentage: siteRanking?.total ? ((siteRanking.rank || 0) / siteRanking.total) * 100 : 0, type: 'station' }
|
|
1257
|
1257
|
];
|
|
1258
|
|
- } else if (this.role.includes('kezhang')) {
|
|
|
1258
|
+ } else if (this.role.includes('banzuzhang')) {
|
|
1259
|
1259
|
const { deptInSiteRanking, deptInBrigadeRanking } = this.accuracyStatistics;
|
|
1260
|
1260
|
return [
|
|
1261
|
1261
|
{ label: '大队排名', current: deptInBrigadeRanking?.rank || 0, total: deptInBrigadeRanking?.total || 0, percentage: deptInBrigadeRanking?.total ? ((deptInBrigadeRanking.rank || 0) / deptInBrigadeRanking.total) * 100 : 0 },
|
|
|
@@ -1292,7 +1292,7 @@ export default {
|
|
1292
|
1292
|
{ label: '大队排名', current: brigadeRanking?.currentRank || 0, total: brigadeRanking?.totalItems || 0, percentage: brigadeRanking?.totalItems ? ((brigadeRanking.currentRank || 0) / brigadeRanking.totalItems) * 100 : 0 },
|
|
1293
|
1293
|
{ label: '站级排名', current: stationRanking?.currentRank || 0, total: stationRanking?.totalItems || 0, percentage: stationRanking?.totalItems ? ((stationRanking.currentRank || 0) / stationRanking.totalItems) * 100 : 0, type: 'station' }
|
|
1294
|
1294
|
];
|
|
1295
|
|
- } else if (this.role.includes('kezhang')) {
|
|
|
1295
|
+ } else if (this.role.includes('banzuzhang')) {
|
|
1296
|
1296
|
const { sectionMasterData } = this.seizeData;
|
|
1297
|
1297
|
const { stationRanking, departmentRanking, brigadeRanking } = sectionMasterData || {};
|
|
1298
|
1298
|
// 科长、SecurityCheck角色:显示班组、科级和站级排名
|
|
|
@@ -1439,7 +1439,7 @@ export default {
|
|
1439
|
1439
|
}
|
|
1440
|
1440
|
|
|
1441
|
1441
|
// 调用接口获取今日上岗科长列表
|
|
1442
|
|
- selectUserListByRoleKey(["kezhang"]).then(res => {
|
|
|
1442
|
+ selectUserListByRoleKey(["banzuzhang"]).then(res => {
|
|
1443
|
1443
|
if (res.code === 200 && res.data && res.data.length > 0) {
|
|
1444
|
1444
|
this.subTitleText = res.data && res.data.map(user => user.nickName).join('、');
|
|
1445
|
1445
|
resolve(res.data);
|