feat(admin): 用户列表新增最后登录时间列

- 注册列后新增「最后登录」列,未登录显示「未登录」
- 数据来自 /admin/overview 的 last_login 字段
- 空态 colspan 9→10
This commit is contained in:
3970260761 committed 2026-11-13 00:15:26 +08:00
1 parent 7d28d31c75
commit 88a6823963
1 file changed
+3 -2
+3 -2
View File
@@ -563,7 +563,7 @@ function switchTab(id: 'overview' | 'files' | 'usage' | 'mcp' | 'storage' | 'rec
<table class="adm-table">
<thead>
<tr><th>用户名</th><th>角色</th><th>状态</th><th>文件数</th><th>文件占用</th><th>设备</th><th>授权</th><th>注册</th><th>操作</th></tr>
<tr><th>用户名</th><th>角色</th><th>状态</th><th>文件数</th><th>文件占用</th><th>设备</th><th>授权</th><th>注册</th><th>最后登录</th><th>操作</th></tr>
</thead>
<tbody>
<tr v-for="u in users" :key="u.username">
@@ -575,6 +575,7 @@ function switchTab(id: 'overview' | 'files' | 'usage' | 'mcp' | 'storage' | 'rec
<td>{{ u.devices }}</td>
<td><span class="adm-badge" :class="u.licensed ? 'ok' : ''">{{ u.licensed ? '已授权' : '-' }}</span></td>
<td>{{ fmtDate(u.created) }}</td>
<td>{{ u.last_login ? fmtDate(u.last_login) : '未登录' }}</td>
<td class="adm-ops">
<a href="javascript:;" class="adm-link" @click="pickUser(u.username)">文件</a>
<a href="javascript:;" class="adm-link" @click="resetPassword(u)">改密</a>
@@ -583,7 +584,7 @@ function switchTab(id: 'overview' | 'files' | 'usage' | 'mcp' | 'storage' | 'rec
<a v-if="u.username !== 'jinghui'" href="javascript:;" class="adm-del" @click="deleteUser(u)">删除</a>
</td>
</tr>
<tr v-if="!users.length"><td colspan="9" class="adm-none">暂无注册用户</td></tr>
<tr v-if="!users.length"><td colspan="10" class="adm-none">暂无注册用户</td></tr>
</tbody>
</table>
</template>