From 3a06224f5d059b6d08d9d7dcfdbdcdd0a886f03a Mon Sep 17 00:00:00 2001 From: stefanfeng Date: Tue, 31 Mar 2026 13:02:49 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E4=B8=80=E9=94=AE?= =?UTF-8?q?=E7=99=BB=E5=87=BA=E5=85=A8=E9=83=A8=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/Users.vue | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/Users.vue b/frontend/src/views/Users.vue index 2d07710..da08de5 100644 --- a/frontend/src/views/Users.vue +++ b/frontend/src/views/Users.vue @@ -34,6 +34,13 @@ + + + 同步用户信息 @@ -495,6 +502,7 @@ async function handleExport() { } const loginAllLoading = ref(false) +const logoutAllLoading = ref(false) const syncLoading = ref(false) const avatarUploading = ref(false) @@ -521,6 +529,19 @@ async function handleAvatarUpload(file) { return false // 阻止 el-upload 默认上传 } +async function handleLogoutAll() { + logoutAllLoading.value = true + try { + const res = await request.post('/users/logout-all') + ElMessage.success(res.message || '已登出所有用户') + loadUsers() + } catch(e) { + ElMessage.error('登出失败:' + (e.message || '未知错误')) + } finally { + logoutAllLoading.value = false + } +} + async function handleSyncAll() { syncLoading.value = true try { @@ -590,4 +611,4 @@ onUnmounted(() => window.removeEventListener('page-refresh', loadUsers)) } :deep(.el-table__body-wrapper) { background: transparent !important; } :deep(.el-table) { background: transparent !important; } - \ No newline at end of file +