|
|
@@ -33,11 +33,13 @@
|
|
33
|
33
|
</view>
|
|
34
|
34
|
|
|
35
|
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
|
38
|
@click="!isSecurityCheck && !routeUserId && (showEmployeePicker = true)">
|
|
38
|
39
|
<u-icon name="list" color="#A78BFA" size="16"></u-icon>
|
|
39
|
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
|
43
|
</view>
|
|
42
|
44
|
</view>
|
|
43
|
45
|
|
|
|
@@ -99,7 +101,7 @@
|
|
99
|
101
|
<view class="info-label">标签:</view>
|
|
100
|
102
|
<view class="info-value" v-if="portrait.userTags">
|
|
101
|
103
|
<text class="tag" v-for="tag in portrait.userTags.split(',')" :key="tag">{{ tag
|
|
102
|
|
- }}</text>
|
|
|
104
|
+ }}</text>
|
|
103
|
105
|
</view>
|
|
104
|
106
|
</view>
|
|
105
|
107
|
</view>
|
|
|
@@ -146,6 +148,15 @@
|
|
146
|
148
|
</view>
|
|
147
|
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
|
160
|
<SectionTitle v-if="activeTab === 'profile'" title="个人能力">
|
|
150
|
161
|
<div class="chart-legend">
|
|
151
|
162
|
<div class="legend-item legend-warning"><span></span>预警线(低于75分)</div>
|
|
|
@@ -153,7 +164,7 @@
|
|
153
|
164
|
<div class="legend-item legend-excellent"><span></span>优秀线(高于90分)</div>
|
|
154
|
165
|
<div class="legend-item legend-current"><span></span>当前分值</div>
|
|
155
|
166
|
</div>
|
|
156
|
|
- <div class="chart-container" ref="radarChart" ></div>
|
|
|
167
|
+ <div class="chart-container" ref="radarChart"></div>
|
|
157
|
168
|
</SectionTitle>
|
|
158
|
169
|
|
|
159
|
170
|
<SectionTitle v-if="activeTab === 'profile'" title="补充信息">
|
|
|
@@ -218,7 +229,7 @@
|
|
218
|
229
|
<view class="warning-score-item">
|
|
219
|
230
|
<text class="warning-score-label">综合得分</text>
|
|
220
|
231
|
<text class="warning-score-value" :class="scoreLevelClass">{{ portrait.totalScore || 0
|
|
221
|
|
- }}</text>
|
|
|
232
|
+ }}</text>
|
|
222
|
233
|
</view>
|
|
223
|
234
|
</view>
|
|
224
|
235
|
<view class="warning-detail" v-if="scoreDetails.length">
|
|
|
@@ -272,8 +283,8 @@
|
|
272
|
283
|
</u-popup>
|
|
273
|
284
|
|
|
274
|
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
|
289
|
<div class="radar-tooltip-popup">
|
|
279
|
290
|
<div class="tooltip-card">
|
|
|
@@ -323,7 +334,7 @@
|
|
323
|
334
|
|
|
324
|
335
|
<script>
|
|
325
|
336
|
import * as echarts from 'echarts'
|
|
326
|
|
-import { getEmployeePortrait, countTagScore } from '@/api/portraitManagement/portraitManagement'
|
|
|
337
|
+import { getEmployeePortrait, countTagScore, getQualificationLevelTime } from '@/api/portraitManagement/portraitManagement'
|
|
327
|
338
|
import { listAllUser, getDeptUserTree } from '@/api/system/user'
|
|
328
|
339
|
import SectionTitle from '@/components/SectionTitle.vue'
|
|
329
|
340
|
import EmployeeTreeNode from '@/pages/components/EmployeeTreeNode.vue'
|
|
|
@@ -367,6 +378,7 @@ export default {
|
|
367
|
378
|
showWarning: false,
|
|
368
|
379
|
radarChartInstance: null,
|
|
369
|
380
|
scoreChartInstance: null,
|
|
|
381
|
+ qualificationData: null,
|
|
370
|
382
|
// 员工选择相关
|
|
371
|
383
|
showEmployeePicker: false,
|
|
372
|
384
|
selectedEmployeeId: null,
|
|
|
@@ -388,7 +400,14 @@ export default {
|
|
388
|
400
|
// 控制雷达图 tooltip popup 显示
|
|
389
|
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
|
413
|
computed: {
|
|
|
@@ -464,6 +483,13 @@ export default {
|
|
464
|
483
|
deductTotal() {
|
|
465
|
484
|
const s = this.deductList.reduce((acc, d) => acc + Number(d.totalScore), 0)
|
|
466
|
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
|
495
|
// uni-app 页面生命周期:接收路由参数
|
|
|
@@ -769,7 +795,13 @@ export default {
|
|
769
|
795
|
}
|
|
770
|
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
|
805
|
this.$nextTick(() => {
|
|
774
|
806
|
|
|
775
|
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
|
1413
|
.chart-container {
|
|
1359
|
1414
|
width: 100%;
|
|
1360
|
1415
|
height: 500rpx;
|