From 7c2bffa1a495cc4a3a263f654c08c231009c5c4e Mon Sep 17 00:00:00 2001
From: zhou zhou <3272660260@qq.com>
Date: 星期四, 02 四月 2026 10:59:45 +0800
Subject: [PATCH] #i18n

---
 rsf-design/src/views/system/role/rolePage.helpers.js |   55 ++++++++++++++++++++++++++++++-------------------------
 1 files changed, 30 insertions(+), 25 deletions(-)

diff --git a/rsf-design/src/views/system/role/rolePage.helpers.js b/rsf-design/src/views/system/role/rolePage.helpers.js
index aa4c451..791f914 100644
--- a/rsf-design/src/views/system/role/rolePage.helpers.js
+++ b/rsf-design/src/views/system/role/rolePage.helpers.js
@@ -1,12 +1,9 @@
-const ROLE_STATUS_META = {
-  1: { type: 'success', text: '姝e父', bool: true },
-  0: { type: 'danger', text: '绂佺敤', bool: false }
-}
+import { $t } from '@/locales'
 
-const ROLE_STATUS_OPTIONS = [
-  { label: '姝e父', value: 1 },
-  { label: '绂佺敤', value: 0 }
-]
+const ROLE_STATUS_META = {
+  1: { type: 'success', key: 'common.status.normal', bool: true },
+  0: { type: 'danger', key: 'common.status.disabled', bool: false }
+}
 
 export function createRoleSearchState() {
   return {
@@ -37,7 +34,10 @@
 }
 
 export function getRoleStatusOptions() {
-  return ROLE_STATUS_OPTIONS.map((option) => ({ ...option }))
+  return [
+    { label: $t('common.status.normal'), value: 1 },
+    { label: $t('common.status.disabled'), value: 0 }
+  ]
 }
 
 export function buildRoleSearchParams(params = {}) {
@@ -69,19 +69,21 @@
 }
 
 const ROLE_REPORT_COLUMNS = [
-  { source: 'name', label: '瑙掕壊鍚嶇О' },
-  { source: 'code', label: '瑙掕壊缂栫爜' },
-  { source: 'statusText', label: '鐘舵��' },
-  { source: 'memo', label: '澶囨敞' },
-  { source: 'createTimeText', label: '鍒涘缓鏃堕棿' },
-  { source: 'updateTimeText', label: '鏇存柊鏃堕棿' }
+  { source: 'name', labelKey: 'pages.system.role.table.name' },
+  { source: 'code', labelKey: 'pages.system.role.table.code' },
+  { source: 'statusText', labelKey: 'pages.system.role.table.status' },
+  { source: 'memo', labelKey: 'pages.system.role.table.memo' },
+  { source: 'createTimeText', labelKey: 'pages.system.role.table.createTime' },
+  { source: 'updateTimeText', labelKey: 'pages.system.role.table.updateTime' }
 ]
 
 const ROLE_REPORT_SOURCE_ALIAS = {
   status: 'statusText'
 }
 
-export const ROLE_REPORT_TITLE = '瑙掕壊绠$悊鎶ヨ〃'
+export function getRoleReportTitle() {
+  return $t('pages.system.role.reportTitle')
+}
 
 export const ROLE_REPORT_STYLE = {
   titleAlign: 'center',
@@ -89,7 +91,10 @@
 }
 
 export function getRoleReportColumns() {
-  return ROLE_REPORT_COLUMNS.map((column) => ({ ...column }))
+  return ROLE_REPORT_COLUMNS.map((column) => ({
+    source: column.source,
+    label: $t(column.labelKey)
+  }))
 }
 
 export function resolveRoleReportColumns(columns = []) {
@@ -116,7 +121,7 @@
       const allowedColumn = allowedColumns.get(source)
       return {
         source,
-        label: column.label || allowedColumn.label
+        label: column.label || $t(allowedColumn.labelKey)
       }
     })
     .filter(Boolean)
@@ -137,7 +142,7 @@
   titleLevel = ROLE_REPORT_STYLE.titleLevel
 } = {}) {
   return {
-    reportTitle: ROLE_REPORT_TITLE,
+    reportTitle: getRoleReportTitle(),
     reportDate: previewMeta.reportDate,
     printedAt: previewMeta.printedAt,
     operator: previewMeta.operator,
@@ -168,7 +173,7 @@
   return {
     ...record,
     statusBool: record.statusBool !== void 0 ? Boolean(record.statusBool) : statusMeta.bool,
-    statusText: statusMeta.text,
+    statusText: $t(statusMeta.key),
     statusType: statusMeta.type,
     createTimeText: normalizeText(record.createTime$ || record.createTime),
     updateTimeText: normalizeText(record.updateTime$ || record.updateTime)
@@ -182,32 +187,32 @@
   if (status === false || status === 0 || status === '0') {
     return ROLE_STATUS_META[0]
   }
-  return { type: 'info', text: '鏈煡', bool: false }
+  return { type: 'info', key: 'common.status.unknown', bool: false }
 }
 
 export function getRoleScopeConfig(scopeType) {
   const configMap = {
     menu: {
       scopeType: 'menu',
-      title: '缃戦〉鏉冮檺',
+      title: $t('pages.system.role.scopes.menu'),
       listUrl: '/role/scope/list',
       treeUrl: '/menu/tree'
     },
     pda: {
       scopeType: 'pda',
-      title: 'PDA鏉冮檺',
+      title: $t('pages.system.role.scopes.pda'),
       listUrl: '/rolePda/scope/list',
       treeUrl: '/menuPda/tree'
     },
     matnr: {
       scopeType: 'matnr',
-      title: '鐗╂枡鏉冮檺',
+      title: $t('pages.system.role.scopes.matnr'),
       listUrl: '/roleMatnr/scope/list',
       treeUrl: '/menuMatnrGroup/tree'
     },
     warehouse: {
       scopeType: 'warehouse',
-      title: '浠撳簱鏉冮檺',
+      title: $t('pages.system.role.scopes.warehouse'),
       listUrl: '/roleWarehouse/scope/list',
       treeUrl: '/menuWarehouse/tree'
     }

--
Gitblit v1.9.1