Browse Source

Merge branch 'employeeScreen'

huoyi@samsundot.com 6 days ago
parent
commit
5632649189
1 changed files with 9 additions and 10 deletions
  1. 9 10
      src/views/portraitManagement/employeeProfile/index.vue

+ 9 - 10
src/views/portraitManagement/employeeProfile/index.vue

@@ -132,8 +132,9 @@
132
             </Card>
132
             </Card>
133
             <Card title="职业资格证书情况">
133
             <Card title="职业资格证书情况">
134
               <div class="cert-info">
134
               <div class="cert-info">
135
-                <span class="cert-name">证书名称:{{ portrait?.qualificationLevelText || '-' }} 时间:{{ getQualificationTime|| '-' }}</span>
136
-              
135
+                <div class="cert-item" v-for="level in displayQualificationLevels" :key="level.field">
136
+                  <span class="cert-name">{{ level.label }}:{{ qualificationData?.[level.field] || '-' }}</span>
137
+                </div>
137
               </div>
138
               </div>
138
             </Card>
139
             </Card>
139
           </div>
140
           </div>
@@ -306,14 +307,12 @@ const qualificationLevelMap = [
306
   { label: '五级', field: 'levelFiveTime' }
307
   { label: '五级', field: 'levelFiveTime' }
307
 ]
308
 ]
308
 
309
 
309
-const getQualificationTime = computed(() => {
310
-  const certName = portrait.value?.qualificationLevelText || '-';
311
-  
312
-  const item = qualificationLevelMap.find(l => l.label === certName)
313
-  if (item) {
314
-    return qualificationData.value?.[item.field] || '-'
315
-  }
316
-  return '-'
310
+const displayQualificationLevels = computed(() => {
311
+  const currentLevel = portrait.value?.qualificationLevelText
312
+  if (!currentLevel) return []
313
+  const currentIndex = qualificationLevelMap.findIndex(l => l.label === currentLevel)
314
+  if (currentIndex === -1) return []
315
+  return qualificationLevelMap.slice(0, currentIndex + 1)
317
 })
316
 })
318
 
317
 
319
 
318