From 50e95b985a72fcec4a93a2470e9efdfb2620148a Mon Sep 17 00:00:00 2001
From: zhou zhou <3272660260@qq.com>
Date: 星期四, 02 四月 2026 15:46:09 +0800
Subject: [PATCH] #i18n

---
 rsf-design/src/views/system/user-login/index.vue |   50 ++++++++++++++++++++++++++------------------------
 1 files changed, 26 insertions(+), 24 deletions(-)

diff --git a/rsf-design/src/views/system/user-login/index.vue b/rsf-design/src/views/system/user-login/index.vue
index 140143d..f571cd8 100644
--- a/rsf-design/src/views/system/user-login/index.vue
+++ b/rsf-design/src/views/system/user-login/index.vue
@@ -27,15 +27,17 @@
   import { fetchGetUserLoginList } from '@/api/system-manage'
   import { useTable } from '@/hooks/core/useTable'
   import { ElTag } from 'element-plus'
+  import { useI18n } from 'vue-i18n'
   import { createUserLoginApiParams, userLoginPaginationKey } from './userLoginTable.config'
 
   defineOptions({ name: 'UserLogin' })
+  const { t } = useI18n()
 
   const LOGIN_TYPE_MAP = {
-    0: { label: '鐧诲綍鎴愬姛', type: 'success' },
-    1: { label: '鐧诲綍澶辫触', type: 'danger' },
-    2: { label: '閫�鍑虹櫥褰�', type: 'info' },
-    3: { label: 'token 缁', type: 'warning' }
+    0: { labelKey: 'pages.system.userLogin.types.loginSuccess', type: 'success' },
+    1: { labelKey: 'pages.system.userLogin.types.loginFailed', type: 'danger' },
+    2: { labelKey: 'pages.system.userLogin.types.logout', type: 'info' },
+    3: { labelKey: 'pages.system.userLogin.types.tokenRenew', type: 'warning' }
   }
 
   const initialSearchForm = {
@@ -49,41 +51,41 @@
 
   const searchItems = computed(() => [
     {
-      label: 'Token',
+      label: t('pages.system.userLogin.search.token'),
       key: 'token',
       type: 'input',
       props: {
-        placeholder: '璇疯緭鍏� token',
+        placeholder: t('pages.system.userLogin.search.tokenPlaceholder'),
         clearable: true
       }
     },
     {
-      label: 'IP',
+      label: t('pages.system.userLogin.search.ip'),
       key: 'ip',
       type: 'input',
       props: {
-        placeholder: '璇疯緭鍏� IP',
+        placeholder: t('pages.system.userLogin.search.ipPlaceholder'),
         clearable: true
       }
     },
     {
-      label: '绯荤粺',
+      label: t('pages.system.userLogin.search.system'),
       key: 'system',
       type: 'input',
       props: {
-        placeholder: '璇疯緭鍏ョ郴缁熸爣璇�',
+        placeholder: t('pages.system.userLogin.search.systemPlaceholder'),
         clearable: true
       }
     },
     {
-      label: '绫诲瀷',
+      label: t('pages.system.userLogin.search.type'),
       key: 'type',
       type: 'select',
       props: {
-        placeholder: '璇烽�夋嫨绫诲瀷',
+        placeholder: t('pages.system.userLogin.search.typePlaceholder'),
         clearable: true,
         options: Object.entries(LOGIN_TYPE_MAP).map(([value, item]) => ({
-          label: item.label,
+          label: t(item.labelKey),
           value: Number(value)
         }))
       }
@@ -93,7 +95,7 @@
   const getLoginTypeConfig = (type) => {
     return (
       LOGIN_TYPE_MAP[type] || {
-        label: type ?? '-',
+        label: type ?? t('common.placeholder.empty'),
         type: 'info'
       }
     )
@@ -121,32 +123,32 @@
       apiParams: createUserLoginApiParams(searchForm.value),
       paginationKey: userLoginPaginationKey,
       columnsFactory: () => [
-        { type: 'index', width: 60, label: '搴忓彿' },
-        { prop: 'id', label: 'ID', minWidth: 90 },
+        { type: 'index', width: 60, label: t('table.index') },
+        { prop: 'id', label: t('table.id'), minWidth: 90 },
         {
           prop: 'userDisplayName',
-          label: '鐢ㄦ埛',
+          label: t('pages.system.userLogin.table.user'),
           minWidth: 140,
           formatter: (row) => getUserDisplayName(row)
         },
-        { prop: 'token', label: 'Token', minWidth: 260, showOverflowTooltip: true },
-        { prop: 'ip', label: 'IP', minWidth: 140 },
+        { prop: 'token', label: t('pages.system.userLogin.table.token'), minWidth: 260, showOverflowTooltip: true },
+        { prop: 'ip', label: t('pages.system.userLogin.table.ip'), minWidth: 140 },
         {
           prop: 'type',
-          label: '绫诲瀷',
+          label: t('pages.system.userLogin.search.type'),
           width: 120,
           formatter: (row) => {
             const config = getLoginTypeConfig(row.type)
-            return h(ElTag, { type: config.type }, () => config.label)
+            return h(ElTag, { type: config.type }, () => config.labelKey ? t(config.labelKey) : config.label)
           }
         },
-        { prop: 'system', label: '绯荤粺', minWidth: 140 },
+        { prop: 'system', label: t('pages.system.userLogin.table.system'), minWidth: 140 },
         {
           prop: 'createTime',
-          label: '鍒涘缓鏃堕棿',
+          label: t('table.createTime'),
           minWidth: 180,
           sortable: true,
-          formatter: (row) => row.createTime$ || row.createTime || '-'
+          formatter: (row) => row.createTime$ || row.createTime || t('common.placeholder.empty')
         }
       ]
     }

--
Gitblit v1.9.1