Browse Source

Merge branch 'fixbug-20260626' into dev

huoyi 1 month ago
parent
commit
c3dc9c8b63
1 changed files with 8 additions and 7 deletions
  1. 8 7
      src/views/portraitManagement/employeeProfile/index.vue

+ 8 - 7
src/views/portraitManagement/employeeProfile/index.vue

@@ -135,9 +135,10 @@
135
           </Card>
135
           </Card>
136
           <Card title="职业资格证书获取时间">
136
           <Card title="职业资格证书获取时间">
137
             <div class="cert-info">
137
             <div class="cert-info">
138
-              <div class="cert-item" v-for="level in displayQualificationLevels" :key="level.field">
139
-                <span class="cert-name">{{ level.label }}:{{ qualificationData?.[level.field] || '-' }}</span>
138
+              <div class="cert-item" v-for="level in displayQualificationLevels" :key="level.label">
139
+                <span class="cert-name">{{ level.label }}:{{ level.time }}</span>
140
               </div>
140
               </div>
141
+              <span v-if="displayQualificationLevels.length === 0" class="no-data">暂无证书数据</span>
141
             </div>
142
             </div>
142
           </Card>
143
           </Card>
143
         </div>
144
         </div>
@@ -312,11 +313,11 @@ const qualificationLevelMap = [
312
 ]
313
 ]
313
 
314
 
314
 const displayQualificationLevels = computed(() => {
315
 const displayQualificationLevels = computed(() => {
315
-  const currentLevel = portrait.value?.qualificationLevelText
316
-  if (!currentLevel) return []
317
-  const currentIndex = qualificationLevelMap.findIndex(l => l.label === currentLevel)
318
-  if (currentIndex === -1) return []
319
-  return qualificationLevelMap.slice(currentIndex)
316
+  if (!qualificationData.value) return []
317
+  return qualificationLevelMap.map(item => ({
318
+    label: item.label,
319
+    time: qualificationData.value[item.field]
320
+  })).filter(item => item.time)
320
 })
321
 })
321
 
322
 
322
 
323