修复用户需求排行榜用户名显示和进度条文字颜色

This commit is contained in:
Your Name 2026-01-13 14:16:48 +08:00
parent e9945779a4
commit 3d4d18abf8

View File

@ -157,8 +157,17 @@
<template v-if="column.key === 'rank'">
<span class="rank-badge" :class="getRankClass(index + 1)">{{ index + 1 }}</span>
</template>
<template v-else-if="column.key === 'realName'">
<span>{{ record.realName || record.userName }}</span>
</template>
<template v-else-if="column.key === 'completionRate'">
<a-progress :percent="Math.round(record.completionRate)" size="small" :stroke-color="getProgressColor(record.completionRate)" />
<a-progress
:percent="Math.round(record.completionRate)"
size="small"
:stroke-color="getProgressColor(record.completionRate)"
:format="(percent) => `${percent}%`"
class="completion-rate-progress"
/>
</template>
</template>
</a-table>
@ -603,7 +612,7 @@ const efficiencyTableData = computed(() => [
// 表格列定义
const userColumns = [
{ title: '排名', key: 'rank', width: 80, align: 'center' },
{ title: '用户名', dataIndex: 'realName', key: 'realName', customRender: ({ record }: any) => record.realName || record.userName },
{ title: '用户名', key: 'realName', width: 120 },
{ title: '部门', dataIndex: 'deptName', key: 'deptName' },
{ title: '发起数', dataIndex: 'totalDemands', key: 'totalDemands', sorter: (a: any, b: any) => a.totalDemands - b.totalDemands, align: 'center' },
{ title: '完成数', dataIndex: 'completedDemands', key: 'completedDemands', align: 'center' },