refactor(user): 优化用户列表展示和排序功能

- 表格大小设置为 small,提升视觉紧凑度
- 用户名称显示优先 realName,其次 nickname,缺失时显示 "-"
- 邮箱列添加排序功能,支持用户交互排序
- 移除创建时间列的文字省略,完整显示时间信息
This commit is contained in:
2026-07-29 00:52:48 +08:00
parent e87e60fd6a
commit eb26594f41

View File

@@ -54,6 +54,7 @@
:datasource="datasource" :datasource="datasource"
v-model:selection="selection" v-model:selection="selection"
:scroll="{ x: 1800 }" :scroll="{ x: 1800 }"
size="small"
:where="defaultWhere" :where="defaultWhere"
:customRow="customRow" :customRow="customRow"
cache-key="proSystemUserTable" cache-key="proSystemUserTable"
@@ -125,7 +126,7 @@
</template> </template>
</a-avatar> </a-avatar>
<div class="user-info"> <div class="user-info">
<span class="user-name">{{ record.realName || '-' }}</span> <span class="user-name">{{ record.realName || record.nickname || '-' }}</span>
<span class="user-mobile">{{ hasRole('superAdmin') ? record.phone : record.mobile }}</span> <span class="user-mobile">{{ hasRole('superAdmin') ? record.phone : record.mobile }}</span>
</div> </div>
</div> </div>
@@ -415,6 +416,7 @@
{ {
title: '邮箱', title: '邮箱',
dataIndex: 'email', dataIndex: 'email',
sorter: true,
showSorterTooltip: false showSorterTooltip: false
}, },
{ {
@@ -510,7 +512,6 @@
dataIndex: 'createTime', dataIndex: 'createTime',
sorter: true, sorter: true,
showSorterTooltip: false, showSorterTooltip: false,
ellipsis: true,
customRender: ({ text }) => toDateString(text, 'yyyy-MM-dd HH:mm:ss') customRender: ({ text }) => toDateString(text, 'yyyy-MM-dd HH:mm:ss')
}, },
{ {