|
|
@@ -118,9 +118,9 @@ export default {
|
|
118
|
118
|
],
|
|
119
|
119
|
// 排序状态管理
|
|
120
|
120
|
sortStates: {
|
|
121
|
|
- '查获上报': { teamSortType: 'asc', deptSortType: 'asc' },
|
|
122
|
|
- '抽问抽答': { teamSortType: 'asc', deptSortType: 'asc' },
|
|
123
|
|
- '巡检': { teamSortType: 'asc', deptSortType: 'asc' }
|
|
|
121
|
+ '查获上报': { teamSortType: 'asc', deptSortType: 'asc', brigadeSortType: 'asc' },
|
|
|
122
|
+ '抽问抽答': { teamSortType: 'asc', deptSortType: 'asc', brigadeSortType: 'asc' },
|
|
|
123
|
+ '巡检': { teamSortType: 'asc', deptSortType: 'asc', brigadeSortType: 'asc' }
|
|
124
|
124
|
},
|
|
125
|
125
|
// 排名数据
|
|
126
|
126
|
rankData: {
|
|
|
@@ -211,13 +211,16 @@ export default {
|
|
211
|
211
|
statTitle: '查获数量',
|
|
212
|
212
|
teamSortType: this.sortStates['查获上报'].teamSortType,
|
|
213
|
213
|
deptSortType: this.sortStates['查获上报'].deptSortType,
|
|
|
214
|
+ brigadeSortType: this.sortStates['查获上报'].brigadeSortType,
|
|
214
|
215
|
dividerIndex: this.isBrigade ? 1 : 0,
|
|
215
|
216
|
dataItems: this.getSeizeDataItems(),
|
|
216
|
217
|
rankList: this.getSeizeRankList(),
|
|
217
|
218
|
departmentRank: this.seizeData.stationMasterData && this.seizeData.stationMasterData.topThreeDepartmentRankings ? this.seizeData.stationMasterData.topThreeDepartmentRankings.map(item => ({ ...item, passRate: item.seizureCount.toFixed(2), name: item.departmentName })) : [],
|
|
218
|
|
- bottomDepartmentRank: this.seizeData.stationMasterData && this.seizeData.stationMasterData.botomThreeDepartmentRankings && this.seizeData.stationMasterData.departmentRankings ? [...this.seizeData.stationMasterData.departmentRankings].sort((a, b) => (a.seizureCount || 0) - (b.seizureCount || 0)).slice(0, 3).map(item => ({ ...item, passRate: item.seizureCount.toFixed(2), name: item.departmentName })) : [],
|
|
|
219
|
+ bottomDepartmentRank: this.seizeData.stationMasterData && this.seizeData.stationMasterData.botomThreeDepartmentRankings ? [...this.seizeData.stationMasterData.botomThreeDepartmentRankings].sort((a, b) => (a.seizureCount || 0) - (b.seizureCount || 0)).slice(0, 3).map(item => ({ ...item, passRate: item.seizureCount.toFixed(2), name: item.departmentName })) : [],
|
|
219
|
220
|
teamRank: this.seizeData.stationMasterData && this.seizeData.stationMasterData.topThreeTeamRankings ? this.seizeData.stationMasterData.topThreeTeamRankings.map(item => ({ ...item, passRate: item.seizureCount.toFixed(2), name: item.teamName })) : [],
|
|
220
|
221
|
bottomTeamRank: this.seizeData.stationMasterData && this.seizeData.stationMasterData.botomThreeTeamRankings ? this.seizeData.stationMasterData.botomThreeTeamRankings.map(item => ({ ...item, passRate: item.seizureCount.toFixed(2), name: item.teamName })) : [],
|
|
|
222
|
+ brigadeRank: this.seizeData.stationMasterData && this.seizeData.stationMasterData.brigadeRankings ? [...this.seizeData.stationMasterData.brigadeRankings].sort((a, b) => (b.seizureCount || 0) - (a.seizureCount || 0)).slice(0, 5).map(item => ({ ...item, passRate: item.seizureCount.toFixed(2), name: item.brigadeName })) : [],
|
|
|
223
|
+ bottomBrigadeRank: this.seizeData.stationMasterData && this.seizeData.stationMasterData.brigadeRankings ? [...this.seizeData.stationMasterData.brigadeRankings].sort((a, b) => (a.seizureCount || 0) - (b.seizureCount || 0)).slice(0, 5).map(item => ({ ...item, passRate: item.seizureCount.toFixed(2), name: item.brigadeName })) : [],
|
|
221
|
224
|
},
|
|
222
|
225
|
{
|
|
223
|
226
|
title: '抽问抽答',
|
|
|
@@ -226,6 +229,7 @@ export default {
|
|
226
|
229
|
statTitle: '正确率(%)',
|
|
227
|
230
|
teamSortType: this.sortStates['抽问抽答'].teamSortType,
|
|
228
|
231
|
deptSortType: this.sortStates['抽问抽答'].deptSortType,
|
|
|
232
|
+ brigadeSortType: this.sortStates['抽问抽答'].brigadeSortType,
|
|
229
|
233
|
dividerIndex: this.isBrigade ? 1 : 0,
|
|
230
|
234
|
dataItems: this.getQuestionDataItems(),
|
|
231
|
235
|
rankList: this.getQuestionRankList(),
|
|
|
@@ -233,6 +237,8 @@ export default {
|
|
233
|
237
|
bottomDepartmentRank: this.accuracyStatistics.bottomDepts && [...this.accuracyStatistics.topDepts].sort((a, b) => (a.accuracy || 0) - (b.accuracy || 0)).map(item => ({ ...item, passRate: item.accuracy.toFixed(2), name: item.name })),
|
|
234
|
238
|
teamRank: this.accuracyStatistics.topTeamsInSite && this.accuracyStatistics.topTeamsInSite.map(item => ({ ...item, passRate: item.accuracy.toFixed(2), name: item.name })),
|
|
235
|
239
|
bottomTeamRank: this.accuracyStatistics.bottomTeamsInSite && this.accuracyStatistics.bottomTeamsInSite.map(item => ({ ...item, passRate: item.accuracy.toFixed(2), name: item.name })),
|
|
|
240
|
+ brigadeRank: this.accuracyStatistics.brigadeRankingList && [...this.accuracyStatistics.brigadeRankingList].sort((a, b) => (b.accuracy || 0) - (a.accuracy || 0)).slice(0, 5).map(item => ({ ...item, passRate: item.accuracy.toFixed(2), name: item.name })),
|
|
|
241
|
+ bottomBrigadeRank: this.accuracyStatistics.brigadeRankingList && [...this.accuracyStatistics.brigadeRankingList].sort((a, b) => (a.accuracy || 0) - (b.accuracy || 0)).slice(0, 5).map(item => ({ ...item, passRate: item.accuracy.toFixed(2), name: item.name })),
|
|
236
|
242
|
},
|
|
237
|
243
|
{
|
|
238
|
244
|
title: '巡检',
|
|
|
@@ -241,6 +247,7 @@ export default {
|
|
241
|
247
|
statTitle: '合格率(%)',
|
|
242
|
248
|
teamSortType: this.sortStates['巡检'].teamSortType,
|
|
243
|
249
|
deptSortType: this.sortStates['巡检'].deptSortType,
|
|
|
250
|
+ brigadeSortType: this.sortStates['巡检'].brigadeSortType,
|
|
244
|
251
|
dividerIndex: this.isBrigade ? 1 : 0,
|
|
245
|
252
|
dataItems: this.getInspectionDataItems(),
|
|
246
|
253
|
completed: this.inspectionData.doneNumber,
|
|
|
@@ -250,6 +257,8 @@ export default {
|
|
250
|
257
|
bottomDepartmentRank: this.inspectionData.reverseDepartmentRankingList && [...this.inspectionData.reverseDepartmentRankingList].sort((a, b) => (a.passRate || 0) - (b.passRate || 0)).slice(0, 5).map(item => ({ ...item, passRate: (item.passRate * 100).toFixed(2) })),
|
|
251
|
258
|
teamRank: this.inspectionData.teamRankingList && this.inspectionData.teamRankingList.map(item => ({ ...item, passRate: (item.passRate * 100).toFixed(2) })),
|
|
252
|
259
|
bottomTeamRank: this.inspectionData.reverseTeamRankingList && this.inspectionData.reverseTeamRankingList.map(item => ({ ...item, passRate: (item.passRate * 100).toFixed(2) })),
|
|
|
260
|
+ brigadeRank: this.inspectionData.brigadeRankingList && [...this.inspectionData.brigadeRankingList].sort((a, b) => (a.rank || 0) - (b.rank || 0)).slice(0, 5).map(item => ({ ...item, passRate: (item.passRate * 100).toFixed(2), name: item.name })),
|
|
|
261
|
+ bottomBrigadeRank: this.inspectionData.brigadeRankingList && [...this.inspectionData.brigadeRankingList].sort((a, b) => (b.rank || 0) - (a.rank || 0)).slice(0, 5).map(item => ({ ...item, passRate: (item.passRate * 100).toFixed(2), name: item.name })),
|
|
253
|
262
|
}
|
|
254
|
263
|
]
|
|
255
|
264
|
},
|
|
|
@@ -523,13 +532,14 @@ export default {
|
|
523
|
532
|
startTime: startDate,
|
|
524
|
533
|
endTime: endDate,
|
|
525
|
534
|
sortField: 'totalScore',
|
|
526
|
|
- dimension: '3'
|
|
|
535
|
+ dimension: '4'
|
|
527
|
536
|
};
|
|
528
|
537
|
|
|
529
|
538
|
getMetrics(params).then(res => {
|
|
530
|
539
|
|
|
531
|
540
|
if (res && res.data) {
|
|
532
|
541
|
this.performanceData = res.data;
|
|
|
542
|
+
|
|
533
|
543
|
resolve(res.data);
|
|
534
|
544
|
} else {
|
|
535
|
545
|
resolve([]);
|
|
|
@@ -900,6 +910,8 @@ export default {
|
|
900
|
910
|
this.sortStates[title].teamSortType = sortType;
|
|
901
|
911
|
} else if (type === 'dept') {
|
|
902
|
912
|
this.sortStates[title].deptSortType = sortType;
|
|
|
913
|
+ } else if (type === 'brigade') {
|
|
|
914
|
+ this.sortStates[title].brigadeSortType = sortType;
|
|
903
|
915
|
}
|
|
904
|
916
|
}
|
|
905
|
917
|
},
|