huoyi пре 13 часа
родитељ
комит
7aba0a020d
2 измењених фајлова са 69 додато и 10 уклоњено
  1. 4 0
      src/api/portraitManagement/portraitManagement.js
  2. 65 10
      src/pages/employeeProfile/index.vue

+ 4 - 0
src/api/portraitManagement/portraitManagement.js

@@ -105,4 +105,8 @@ export function getEmployeePortrait(params) {
105
 }
105
 }
106
 export function searchPortraitUsers(keyword) {
106
 export function searchPortraitUsers(keyword) {
107
     return request({ url: '/score/portrait/searchUsers', method: 'get', params: { keyword } })
107
     return request({ url: '/score/portrait/searchUsers', method: 'get', params: { keyword } })
108
+}
109
+// 获取职业资格等级获取时间
110
+export function getQualificationLevelTime(params) {
111
+    return request({ url: '/ledger/qualificationLevel/user', method: 'get', params })
108
 }
112
 }

+ 65 - 10
src/pages/employeeProfile/index.vue

@@ -33,11 +33,13 @@
33
             </view>
33
             </view>
34
 
34
 
35
             <view class="search-selector">
35
             <view class="search-selector">
36
-                <view class="search-select-trigger" :class="{ 'search-select-trigger-disabled': isSecurityCheck || routeUserId }"
36
+                <view class="search-select-trigger"
37
+                    :class="{ 'search-select-trigger-disabled': isSecurityCheck || routeUserId }"
37
                     @click="!isSecurityCheck && !routeUserId && (showEmployeePicker = true)">
38
                     @click="!isSecurityCheck && !routeUserId && (showEmployeePicker = true)">
38
                     <u-icon name="list" color="#A78BFA" size="16"></u-icon>
39
                     <u-icon name="list" color="#A78BFA" size="16"></u-icon>
39
                     <text class="search-name-text">{{ selectedEmployeeName || '请选择员工' }}</text>
40
                     <text class="search-name-text">{{ selectedEmployeeName || '请选择员工' }}</text>
40
-                    <u-icon v-if="!isSecurityCheck && !routeUserId" name="arrow-down" color="#A78BFA" size="14"></u-icon>
41
+                    <u-icon v-if="!isSecurityCheck && !routeUserId" name="arrow-down" color="#A78BFA"
42
+                        size="14"></u-icon>
41
                 </view>
43
                 </view>
42
             </view>
44
             </view>
43
 
45
 
@@ -99,7 +101,7 @@
99
                                 <view class="info-label">标签:</view>
101
                                 <view class="info-label">标签:</view>
100
                                 <view class="info-value" v-if="portrait.userTags">
102
                                 <view class="info-value" v-if="portrait.userTags">
101
                                     <text class="tag" v-for="tag in portrait.userTags.split(',')" :key="tag">{{ tag
103
                                     <text class="tag" v-for="tag in portrait.userTags.split(',')" :key="tag">{{ tag
102
-                                        }}</text>
104
+                                    }}</text>
103
                                 </view>
105
                                 </view>
104
                             </view>
106
                             </view>
105
                         </view>
107
                         </view>
@@ -146,6 +148,15 @@
146
                     </view>
148
                     </view>
147
                 </SectionTitle>
149
                 </SectionTitle>
148
 
150
 
151
+                <SectionTitle v-if="activeTab === 'profile'" title="职业资格证书获取时间">
152
+                    <view class="cert-info">
153
+                        <view class="cert-item" v-for="level in displayQualificationLevels" :key="level.field">
154
+                            <text class="cert-name">{{ level.label }}:{{ (qualificationData && qualificationData[level.field]) || '-' }}</text>
155
+                        </view>
156
+                        <view v-if="!displayQualificationLevels.length" class="no-data">暂无数据</view>
157
+                    </view>
158
+                </SectionTitle>
159
+
149
                 <SectionTitle v-if="activeTab === 'profile'" title="个人能力">
160
                 <SectionTitle v-if="activeTab === 'profile'" title="个人能力">
150
                     <div class="chart-legend">
161
                     <div class="chart-legend">
151
                         <div class="legend-item legend-warning"><span></span>预警线(低于75分)</div>
162
                         <div class="legend-item legend-warning"><span></span>预警线(低于75分)</div>
@@ -153,7 +164,7 @@
153
                         <div class="legend-item legend-excellent"><span></span>优秀线(高于90分)</div>
164
                         <div class="legend-item legend-excellent"><span></span>优秀线(高于90分)</div>
154
                         <div class="legend-item legend-current"><span></span>当前分值</div>
165
                         <div class="legend-item legend-current"><span></span>当前分值</div>
155
                     </div>
166
                     </div>
156
-                    <div class="chart-container" ref="radarChart" ></div>
167
+                    <div class="chart-container" ref="radarChart"></div>
157
                 </SectionTitle>
168
                 </SectionTitle>
158
 
169
 
159
                 <SectionTitle v-if="activeTab === 'profile'" title="补充信息">
170
                 <SectionTitle v-if="activeTab === 'profile'" title="补充信息">
@@ -218,7 +229,7 @@
218
                         <view class="warning-score-item">
229
                         <view class="warning-score-item">
219
                             <text class="warning-score-label">综合得分</text>
230
                             <text class="warning-score-label">综合得分</text>
220
                             <text class="warning-score-value" :class="scoreLevelClass">{{ portrait.totalScore || 0
231
                             <text class="warning-score-value" :class="scoreLevelClass">{{ portrait.totalScore || 0
221
-                            }}</text>
232
+                                }}</text>
222
                         </view>
233
                         </view>
223
                     </view>
234
                     </view>
224
                     <view class="warning-detail" v-if="scoreDetails.length">
235
                     <view class="warning-detail" v-if="scoreDetails.length">
@@ -272,8 +283,8 @@
272
         </u-popup>
283
         </u-popup>
273
 
284
 
274
         <!-- 雷达图tooltip -->
285
         <!-- 雷达图tooltip -->
275
-        <u-popup :show="showRadarTooltipPopup" mode="center" :round="12"
276
-            :mask-close-able="true" @close="closeRadarPopup"> 
286
+        <u-popup :show="showRadarTooltipPopup" mode="center" :round="12" :mask-close-able="true"
287
+            @close="closeRadarPopup">
277
 
288
 
278
             <div class="radar-tooltip-popup">
289
             <div class="radar-tooltip-popup">
279
                 <div class="tooltip-card">
290
                 <div class="tooltip-card">
@@ -323,7 +334,7 @@
323
 
334
 
324
 <script>
335
 <script>
325
 import * as echarts from 'echarts'
336
 import * as echarts from 'echarts'
326
-import { getEmployeePortrait, countTagScore } from '@/api/portraitManagement/portraitManagement'
337
+import { getEmployeePortrait, countTagScore, getQualificationLevelTime } from '@/api/portraitManagement/portraitManagement'
327
 import { listAllUser, getDeptUserTree } from '@/api/system/user'
338
 import { listAllUser, getDeptUserTree } from '@/api/system/user'
328
 import SectionTitle from '@/components/SectionTitle.vue'
339
 import SectionTitle from '@/components/SectionTitle.vue'
329
 import EmployeeTreeNode from '@/pages/components/EmployeeTreeNode.vue'
340
 import EmployeeTreeNode from '@/pages/components/EmployeeTreeNode.vue'
@@ -367,6 +378,7 @@ export default {
367
             showWarning: false,
378
             showWarning: false,
368
             radarChartInstance: null,
379
             radarChartInstance: null,
369
             scoreChartInstance: null,
380
             scoreChartInstance: null,
381
+            qualificationData: null,
370
             // 员工选择相关
382
             // 员工选择相关
371
             showEmployeePicker: false,
383
             showEmployeePicker: false,
372
             selectedEmployeeId: null,
384
             selectedEmployeeId: null,
@@ -388,7 +400,14 @@ export default {
388
             // 控制雷达图 tooltip popup 显示
400
             // 控制雷达图 tooltip popup 显示
389
             showRadarTooltipPopup: false,
401
             showRadarTooltipPopup: false,
390
             // 评分明细数据
402
             // 评分明细数据
391
-            allScoreDetails: []
403
+            allScoreDetails: [],
404
+            qualificationLevelMap: [
405
+                { label: '五级', field: 'levelFiveTime' },
406
+                { label: '四级', field: 'levelFourTime' },
407
+                { label: '三级', field: 'levelThreeTime' },
408
+                { label: '二级', field: 'levelTwoTime' },
409
+                { label: '一级', field: 'levelOneTime' },
410
+            ]
392
         }
411
         }
393
     },
412
     },
394
     computed: {
413
     computed: {
@@ -464,6 +483,13 @@ export default {
464
         deductTotal() {
483
         deductTotal() {
465
             const s = this.deductList.reduce((acc, d) => acc + Number(d.totalScore), 0)
484
             const s = this.deductList.reduce((acc, d) => acc + Number(d.totalScore), 0)
466
             return s.toFixed(2)
485
             return s.toFixed(2)
486
+        },
487
+        displayQualificationLevels() {
488
+            const currentLevel = this.portrait && this.portrait.qualificationLevelText
489
+            if (!currentLevel) return []
490
+            const currentIndex = this.qualificationLevelMap.findIndex(l => l.label === currentLevel)
491
+            if (currentIndex === -1) return []
492
+            return this.qualificationLevelMap.slice(currentIndex)
467
         }
493
         }
468
     },
494
     },
469
     // uni-app 页面生命周期:接收路由参数
495
     // uni-app 页面生命周期:接收路由参数
@@ -769,7 +795,13 @@ export default {
769
                 }
795
                 }
770
             }).catch(() => { })
796
             }).catch(() => { })
771
 
797
 
772
-            Promise.all([portraitPromise, tagPromise]).finally(() => {
798
+            const qualificationPromise = getQualificationLevelTime({ userId: this.selectedEmployeeId }).then(res => {
799
+                this.qualificationData = res.data || null
800
+            }).catch(() => {
801
+                this.qualificationData = null
802
+            })
803
+
804
+            Promise.all([portraitPromise, tagPromise, qualificationPromise]).finally(() => {
773
                 this.$nextTick(() => {
805
                 this.$nextTick(() => {
774
 
806
 
775
                     this.initRadarChart()
807
                     this.initRadarChart()
@@ -1355,6 +1387,29 @@ export default {
1355
     }
1387
     }
1356
 }
1388
 }
1357
 
1389
 
1390
+.cert-info {
1391
+    .cert-item {
1392
+        padding: 16rpx 0;
1393
+        border-bottom: 1rpx solid #f0f0f0;
1394
+
1395
+        &:last-child {
1396
+            border-bottom: none;
1397
+        }
1398
+
1399
+        .cert-name {
1400
+            font-size: 26rpx;
1401
+            color: #333;
1402
+        }
1403
+    }
1404
+
1405
+    .no-data {
1406
+        font-size: 26rpx;
1407
+        color: #999;
1408
+        text-align: center;
1409
+        padding: 24rpx 0;
1410
+    }
1411
+}
1412
+
1358
 .chart-container {
1413
 .chart-container {
1359
     width: 100%;
1414
     width: 100%;
1360
     height: 500rpx;
1415
     height: 500rpx;