|
|
@@ -64,8 +64,9 @@
|
|
64
|
64
|
<!-- 成员卡片 -->
|
|
65
|
65
|
<div
|
|
66
|
66
|
v-for="member in memberList" :key="member.personName"
|
|
67
|
|
- class="member-card"
|
|
68
|
|
- :class="getMemberBorderClass(member.totalScore)">
|
|
|
67
|
+ class="member-card clickable-card"
|
|
|
68
|
+ :class="getMemberBorderClass(member.totalScore)"
|
|
|
69
|
+ @click="goToPortrait(member.personName)">
|
|
69
|
70
|
<div class="card-name" :class="getNameClass(member.totalScore)">
|
|
70
|
71
|
{{ member.personName }}({{ member.totalScore }}分)
|
|
71
|
72
|
</div>
|
|
|
@@ -81,10 +82,22 @@
|
|
81
|
82
|
import { ref, reactive, onMounted, onBeforeUnmount, nextTick, computed, watch } from 'vue'
|
|
82
|
83
|
import { ElMessage } from 'element-plus'
|
|
83
|
84
|
import * as echarts from 'echarts'
|
|
|
85
|
+import { useRouter } from 'vue-router'
|
|
84
|
86
|
import { radarTeamList, radarMemberScores, syncLedgerAll } from '@/api/score/index'
|
|
85
|
87
|
|
|
86
|
88
|
defineOptions({ name: 'ScoreRadar' })
|
|
87
|
89
|
|
|
|
90
|
+const router = useRouter()
|
|
|
91
|
+
|
|
|
92
|
+function goToPortrait(personName) {
|
|
|
93
|
+ const target = router.getRoutes().find(r => /[/]employeeProfile$/.test(r.path))
|
|
|
94
|
+ if (target) {
|
|
|
95
|
+ router.push({ path: target.path, query: { personName } })
|
|
|
96
|
+ } else {
|
|
|
97
|
+ ElMessage.warning('未找到员工画像页面,请确认菜单中已配置该页面')
|
|
|
98
|
+ }
|
|
|
99
|
+}
|
|
|
100
|
+
|
|
88
|
101
|
// ── 状态 ──────────────────────────────────────────────
|
|
89
|
102
|
const loading = ref(false)
|
|
90
|
103
|
const syncing = ref(false)
|
|
|
@@ -430,4 +443,13 @@ watch(compareNames, () => nextTick(renderCompareChart), { deep: true })
|
|
430
|
443
|
.compare-table .col-person { min-width: 48px; }
|
|
431
|
444
|
.score-green { color: #67C23A; font-weight: bold; }
|
|
432
|
445
|
.score-red { color: #F56C6C; font-weight: bold; }
|
|
|
446
|
+
|
|
|
447
|
+.clickable-card {
|
|
|
448
|
+ cursor: pointer;
|
|
|
449
|
+ transition: box-shadow 0.2s, transform 0.2s;
|
|
|
450
|
+}
|
|
|
451
|
+.clickable-card:hover {
|
|
|
452
|
+ box-shadow: 0 0 12px rgba(26, 106, 255, 0.6);
|
|
|
453
|
+ transform: translateY(-2px);
|
|
|
454
|
+}
|
|
433
|
455
|
</style>
|