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
+