|
|
@@ -214,7 +214,7 @@ const qualificationPieDescriptionPart1 = computed(() => {
|
|
214
|
214
|
// 1. 找出占比最高的等级
|
|
215
|
215
|
const highestLevel = pieData.reduce((max, item) => {
|
|
216
|
216
|
return (item.count || 0) > (max.count || 0) ? item : max
|
|
217
|
|
- }, { levelName: '一级', count: 0 })
|
|
|
217
|
+ }, { levelName: '高级', count: 0 })
|
|
218
|
218
|
|
|
219
|
219
|
// 2. 计算总人数
|
|
220
|
220
|
const totalCount = pieData.reduce((sum, item) => sum + (item.count || 0), 0)
|
|
|
@@ -224,7 +224,7 @@ const qualificationPieDescriptionPart1 = computed(() => {
|
|
224
|
224
|
let deptName = attendanceData.value && attendanceData.value.length > 0 ? attendanceData.value[attendanceData.value.length -
|
|
225
|
225
|
1]?.deptName : ''
|
|
226
|
226
|
// 4. 生成第一部分描述文字
|
|
227
|
|
- return `${deptName}资质等级以"${highestLevel.levelName || '一级'}"为主(占比为${highestPercentage}%)`
|
|
|
227
|
+ return `${deptName}资质等级以"${highestLevel.levelName || '高级'}"为主(占比为${highestPercentage}%)`
|
|
228
|
228
|
})
|
|
229
|
229
|
|
|
230
|
230
|
// 计算属性:动态生成资质等级分布描述第二部分(句号后)
|
|
|
@@ -268,7 +268,7 @@ const qualificationPieDescriptionPart2 = computed(() => {
|
|
268
|
268
|
}
|
|
269
|
269
|
|
|
270
|
270
|
// 生成第二部分描述文字
|
|
271
|
|
- return `全站资质等级为"一级"的人员集中在${topDeptForLevel1}(${level1Count}人)${topDeptForLevel1}的人员规模(共${totalDeptCount}人)高于${allDeptNames.filter(name => name !== topDeptForLevel1).join(', ')}`
|
|
|
271
|
+ return `全站资质等级为"高级"的人员集中在${topDeptForLevel1}(${level1Count}人)${topDeptForLevel1}的人员规模(共${totalDeptCount}人)高于${allDeptNames.filter(name => name !== topDeptForLevel1).join(', ')}`
|
|
272
|
272
|
})
|
|
273
|
273
|
|
|
274
|
274
|
|
|
|
@@ -336,7 +336,7 @@ const fetchDutyOrganizationData = async (queryParams) => {
|
|
336
|
336
|
// 获取资质等级分布饼图数据(如果部门类型不是STATION)
|
|
337
|
337
|
if (isNotUserType.value) {
|
|
338
|
338
|
const pieResponse = await getQualificationPieChart({ ...processedParams, ...calculateParams })
|
|
339
|
|
- console.log('资质等级分布饼图数据:', pieResponse)
|
|
|
339
|
+
|
|
340
|
340
|
qualificationPieData.value = pieResponse.data || []
|
|
341
|
341
|
} else {
|
|
342
|
342
|
qualificationPieData.value = []
|