ソースを参照

fix: 修正资质等级显示为高级并优化资质等级统计逻辑

- 将多处"一级资质等级"改为"高级资质等级"
- 重构资质等级统计显示逻辑,直接拼接等级名称和人数
- 移除未使用的CSS变量定义
- 调整排名数据显示字段从deptName/teamName到name
huoyi 1 ヶ月 前
コミット
82f5f9cd0f

+ 1 - 1
src/views/dataBigScreen/dashboard/components/pageItems/DepartmentInfo.vue

@@ -10,7 +10,7 @@
10 10
             {{ getLabel(scope.row.qualificationLevel) }}
11 11
           </template>
12 12
         </el-table-column>
13
-        <el-table-column prop="qualificationLevel" label="资质等级级" v-else />
13
+        <el-table-column prop="qualificationLevel" label="资质等级级" v-else />
14 14
         <el-table-column prop="avgWorkingDays" label="人均出勤天数" min-width="120"/>
15 15
         <el-table-column prop="avgWorkingHours" label="人均上岗时长" min-width="120" />
16 16
         <el-table-column prop="avgSeizureCount" label="人均查获数量" min-width="120" />

+ 11 - 7
src/views/dataBigScreen/dashboard/components/pageItems/QualificationCapability.vue

@@ -99,14 +99,18 @@ const handleDeptData = async (newVal) => {
99 99
 
100 100
   // 使用useDict获取资质等级字典
101 101
   const qualificationDict = sys_user_qualification_level.value || []
102
-
102
+  let strArr = [];
103
+  qualificationLevelStats.map(item => {
104
+    strArr.push(`${item?.levelName} ${item.count}人`)
105
+  })
106
+  res.qualificationLevelSum = strArr.join('、')
103 107
   // 按照字典顺序遍历,确保从一级开始显示
104
-  for (const dictItem of qualificationDict) {
105
-    const statItem = qualificationLevelStats.find(item => item.levelName === dictItem.value)
106
-    if (statItem) {
107
-      res.qualificationLevelSum = `${res.qualificationLevelSum ? res.qualificationLevelSum + '、' : ''}${dictItem.label} ${statItem.count}人`
108
-    }
109
-  }
108
+  // for (const dictItem of qualificationDict) {
109
+  //   const statItem = qualificationLevelStats.find(item => item.levelName === dictItem.value)
110
+  //   if (statItem) {
111
+  //     res.qualificationLevelSum = `${res.qualificationLevelSum ? res.qualificationLevelSum + '、' : ''}${dictItem.label} ${statItem.count}人`
112
+  //   }
113
+  // }
110 114
 
111 115
   let availablePositionsSum = []
112 116
   for (const item of positionCompetencyStats) {

+ 6 - 6
src/views/dataBigScreen/dashboard/components/pageView/HomePage.vue

@@ -122,9 +122,9 @@ const typeDetailData = computed(() => {
122 122
       dividerIndex: 0,
123 123
       dataItems: getQuestionDataItems(),
124 124
       // rankList: getQuestionRankList(),
125
-      departmentRank: accuracyStatistics.value.topDepts && accuracyStatistics.value.topDepts?.map(item => ({ ...item, passRate: item.accuracy?.toFixed(2), name: item.deptName })) || [],
126
-      teamRank: accuracyStatistics.value.topTeamsInSite && accuracyStatistics.value.topTeamsInSite?.map(item => ({ ...item, passRate: item.accuracy?.toFixed(2), name: item.teamName })) || [],
127
-      bottomTeamRank: accuracyStatistics.value.bottomTeamsInSite && accuracyStatistics.value.bottomTeamsInSite?.map(item => ({ ...item, passRate: item.accuracy?.toFixed(2), name: item.teamName })) || [],
125
+      departmentRank: accuracyStatistics.value.topDepts && accuracyStatistics.value.topDepts?.map(item => ({ ...item, passRate: item.accuracy?.toFixed(2) })) || [],
126
+      teamRank: accuracyStatistics.value.topTeamsInSite && accuracyStatistics.value.topTeamsInSite?.map(item => ({ ...item, passRate: item.accuracy?.toFixed(2) })) || [],
127
+      bottomTeamRank: accuracyStatistics.value.bottomTeamsInSite && accuracyStatistics.value.bottomTeamsInSite?.map(item => ({ ...item, passRate: item.accuracy?.toFixed(2)})) || [],
128 128
       teamSortType: sortStates.value['抽问抽答'].teamSortType,
129 129
       deptSortType: sortStates.value['抽问抽答'].deptSortType
130 130
     },
@@ -439,9 +439,9 @@ const getQuestionDataItems = () => {
439 439
       // test/zhijianke角色:全站、前三名的大队(isImage: true)
440 440
       return [
441 441
         { label: '全站', value: (siteAvgAccuracy || 0) + '%', isImage: false },
442
-        { label: getObjByRank(topDepts, 1).deptName, value: oneIcon, isImage: true },
443
-        { label: getObjByRank(topDepts, 2).deptName, value: twoIcon, isImage: true },
444
-        { label: getObjByRank(topDepts, 3).deptName, value: threeIcon, isImage: true }
442
+        { label: getObjByRank(topDepts, 1).name, value: oneIcon, isImage: true },
443
+        { label: getObjByRank(topDepts, 2).name, value: twoIcon, isImage: true },
444
+        { label: getObjByRank(topDepts, 3).name, value: threeIcon, isImage: true }
445 445
       ];
446 446
     } else {
447 447
       // 默认角色:检查项、完成率

+ 1 - 1
src/views/dataBigScreen/dashboard/components/pageView/OrganizationalPortrait.vue

@@ -88,7 +88,7 @@ const pageInfo = computed(() => {
88 88
   return [
89 89
     {
90 90
       label: '资质能力',
91
-      desc: '级资质等级人数',
91
+      desc: '级资质等级人数',
92 92
       value: infoNumber.value.qualificationLevel
93 93
     },
94 94
     {

+ 1 - 1
src/views/dataBigScreen/dashboard/components/pageView/OrganizationalPortraitSectionLevel.vue

@@ -193,7 +193,7 @@ const pageInfo = computed(() => {
193 193
   ] : [
194 194
     {
195 195
       label: '资质能力',
196
-      desc: '级资质等级人数',
196
+      desc: '级资质等级人数',
197 197
       value: infoNumber.value.qualificationLevel
198 198
     },
199 199
     {

+ 1 - 1
src/views/dataBigScreen/dashboard/index.vue

@@ -232,7 +232,7 @@ onUnmounted(() => {
232 232
 
233 233
 .el-popper {
234 234
   --el-border-color-extra-light: #70CFE7;
235
-  --el-fill-color-blank: #0D507A;
235
+  //--el-fill-color-blank: #0D507A;
236 236
   --el-border-color: #0D507A;
237 237
 }
238 238