初始化

This commit is contained in:
2026-03-26 20:18:20 +08:00
commit 120a5b4dfd
368 changed files with 35926 additions and 0 deletions

20
src/locales/dayjs.ts Normal file
View File

@@ -0,0 +1,20 @@
import { locale } from 'dayjs';
import 'dayjs/locale/zh-cn';
import 'dayjs/locale/en';
import { localStg } from '@/utils/storage';
/**
* Set dayjs locale
*
* @param lang
*/
export function setDayjsLocale(lang: App.I18n.LangType = 'zh-CN') {
const localMap = {
'zh-CN': 'zh-cn',
'en-US': 'en'
} satisfies Record<App.I18n.LangType, string>;
const l = lang || localStg.get('lang') || 'zh-CN';
locale(localMap[l]);
}

26
src/locales/index.ts Normal file
View File

@@ -0,0 +1,26 @@
import type { App } from 'vue';
import { createI18n } from 'vue-i18n';
import { localStg } from '@/utils/storage';
import messages from './locale';
const i18n = createI18n({
locale: localStg.get('lang') || 'zh-CN',
fallbackLocale: 'en',
messages,
legacy: false
});
/**
* Setup plugin i18n
*
* @param app
*/
export function setupI18n(app: App) {
app.use(i18n);
}
export const $t = i18n.global.t as App.I18n.$T;
export function setLocale(locale: App.I18n.LangType) {
i18n.global.locale.value = locale;
}

692
src/locales/langs/en-us.ts Normal file
View File

@@ -0,0 +1,692 @@
const local: App.I18n.Schema = {
system: {
title: 'cn-rdms'
},
common: {
action: 'Action',
add: 'Add',
addSuccess: 'Add Success',
backToHome: 'Back to home',
batchDelete: 'Batch Delete',
cancel: 'Cancel',
close: 'Close',
check: 'Check',
expandColumn: 'Expand Column',
columnSetting: 'Column Setting',
config: 'Config',
confirm: 'Confirm',
delete: 'Delete',
deleteSuccess: 'Delete Success',
confirmDelete: 'Are you sure you want to delete?',
edit: 'Edit',
warning: 'Warning',
error: 'Error',
index: 'Index',
keywordSearch: 'Please enter keyword',
logout: 'Logout',
logoutConfirm: 'Are you sure you want to log out?',
lookForward: 'Coming soon',
modify: 'Modify',
modifySuccess: 'Modify Success',
more: 'More',
noData: 'No Data',
operate: 'Operate',
pleaseCheckValue: 'Please check whether the value is valid',
refresh: 'Refresh',
reset: 'Reset',
search: 'Search',
switch: 'Switch',
tip: 'Tip',
trigger: 'Trigger',
update: 'Update',
updateSuccess: 'Update Success',
userCenter: 'User Center',
yesOrNo: {
yes: 'Yes',
no: 'No'
}
},
request: {
logout: 'Logout user after request failed',
logoutMsg: 'User status is invalid, please log in again',
logoutWithModal: 'Pop up modal after request failed and then log out user',
logoutWithModalMsg: 'User status is invalid, please log in again',
refreshToken: 'The requested token has expired, refresh the token',
tokenExpired: 'The requested token has expired'
},
theme: {
themeSchema: {
title: 'Theme Schema',
light: 'Light',
dark: 'Dark',
auto: 'Follow System'
},
grayscale: 'Grayscale',
colourWeakness: 'Colour Weakness',
layoutMode: {
title: 'Layout Mode',
vertical: 'Vertical Menu Mode',
horizontal: 'Horizontal Menu Mode',
'vertical-mix': 'Vertical Mix Menu Mode',
'horizontal-mix': 'Horizontal Mix menu Mode',
reverseHorizontalMix: 'Reverse first level menus and child level menus position'
},
recommendColor: 'Apply Recommended Color Algorithm',
recommendColorDesc: 'The recommended color algorithm refers to',
themeColor: {
title: 'Theme Color',
primary: 'Primary',
info: 'Info',
success: 'Success',
warning: 'Warning',
error: 'Error',
followPrimary: 'Follow Primary'
},
scrollMode: {
title: 'Scroll Mode',
wrapper: 'Wrapper',
content: 'Content'
},
page: {
animate: 'Page Animate',
mode: {
title: 'Page Animate Mode',
fade: 'Fade',
'fade-slide': 'Slide',
'fade-bottom': 'Fade Zoom',
'fade-scale': 'Fade Scale',
'zoom-fade': 'Zoom Fade',
'zoom-out': 'Zoom Out',
none: 'None'
}
},
fixedHeaderAndTab: 'Fixed Header And Tab',
header: {
height: 'Header Height',
breadcrumb: {
visible: 'Breadcrumb Visible',
showIcon: 'Breadcrumb Icon Visible'
},
multilingual: {
visible: 'Display multilingual button'
},
globalSearch: {
visible: 'Display global search button'
}
},
tab: {
visible: 'Tab Visible',
cache: 'Tag Bar Info Cache',
height: 'Tab Height',
mode: {
title: 'Tab Mode',
chrome: 'Chrome',
button: 'Button'
}
},
sider: {
inverted: 'Dark Sider',
width: 'Sider Width',
collapsedWidth: 'Sider Collapsed Width',
mixWidth: 'Mix Sider Width',
mixCollapsedWidth: 'Mix Sider Collapse Width',
mixChildMenuWidth: 'Mix Child Menu Width'
},
footer: {
visible: 'Footer Visible',
fixed: 'Fixed Footer',
height: 'Footer Height',
right: 'Right Footer'
},
watermark: {
visible: 'Watermark Full Screen Visible',
text: 'Watermark Text',
enableUserName: 'Enable User Name Watermark'
},
themeDrawerTitle: 'Theme Configuration',
pageFunTitle: 'Page Function',
configOperation: {
copyConfig: 'Copy Config',
copySuccessMsg: 'Copy Success, Please replace the variable "themeSettings" in "src/theme/settings.ts"',
resetConfig: 'Reset Config',
resetSuccessMsg: 'Reset Success'
}
},
route: {
login: 'Login',
403: 'No Permission',
404: 'Page Not Found',
500: 'Server Error',
'iframe-page': 'Iframe',
'user-center': 'User Center',
function: 'System Function',
function_tab: 'Tab',
'function_multi-tab': 'Multi Tab',
'function_hide-child': 'Hide Child',
'function_hide-child_one': 'Hide Child',
'function_hide-child_two': 'Two',
'function_hide-child_three': 'Three',
function_request: 'Request',
'function_toggle-auth': 'Toggle Auth',
'function_super-page': 'Super Admin Visible',
system: 'System Management',
system_user: 'User Management',
'system_user-detail': 'User Detail',
system_role: 'Role Management',
system_menu: 'Menu Management',
system_post: 'Post Management',
system_dict: 'Dictionary Management',
exception: 'Exception',
exception_403: '403',
exception_404: '404',
exception_500: '500',
plugin: 'Plugin',
plugin_copy: 'Copy',
plugin_charts: 'Charts',
plugin_charts_echarts: 'ECharts',
plugin_charts_antv: 'AntV',
plugin_charts_vchart: 'VChart',
plugin_editor: 'Editor',
plugin_editor_quill: 'Quill',
plugin_editor_markdown: 'Markdown',
plugin_icon: 'Icon',
plugin_map: 'Map',
plugin_print: 'Print',
plugin_swiper: 'Swiper',
plugin_video: 'Video',
plugin_barcode: 'Barcode',
plugin_pinyin: 'pinyin',
plugin_excel: 'Excel',
plugin_pdf: 'PDF preview',
plugin_gantt: 'Gantt Chart',
plugin_gantt_dhtmlx: 'dhtmlxGantt',
plugin_gantt_vtable: 'VTableGantt',
plugin_typeit: 'Typeit',
plugin_tables: 'Tables',
plugin_tables_vtable: 'VTable'
},
page: {
login: {
common: {
loginOrRegister: 'Login / Register',
userNamePlaceholder: 'Please enter user name',
phonePlaceholder: 'Please enter phone number',
codePlaceholder: 'Please enter verification code',
passwordPlaceholder: 'Please enter password',
confirmPasswordPlaceholder: 'Please enter password again',
codeLogin: 'Verification code login',
confirm: 'Confirm',
back: 'Back',
validateSuccess: 'Verification passed',
loginSuccess: 'Login successfully',
welcomeBack: 'Welcome back, {userName} !'
},
pwdLogin: {
title: 'Password Login',
rememberMe: 'Remember me',
forgetPassword: 'Forget password?',
register: 'Register',
otherAccountLogin: 'Other Account Login',
otherLoginMode: 'Other Login Mode',
superAdmin: 'Super Admin',
admin: 'Admin',
user: 'User'
},
codeLogin: {
title: 'Verification Code Login',
getCode: 'Get verification code',
reGetCode: 'Reacquire after {time}s',
sendCodeSuccess: 'Verification code sent successfully',
imageCodePlaceholder: 'Please enter image verification code'
},
register: {
title: 'Register',
agreement: 'I have read and agree to',
protocol: '《User Agreement》',
policy: '《Privacy Policy》'
},
resetPwd: {
title: 'Reset Password'
},
bindWeChat: {
title: 'Bind WeChat'
}
},
about: {
title: 'About',
introduction:
'CN-RDMS is the frontend application of the internal R&D management platform of 灿能电力. It is used to carry internal business modules, engineering collaboration and management capabilities.',
projectInfo: {
title: 'Project Info',
version: 'Version',
latestBuildTime: 'Latest Build Time',
githubLink: 'Github Link',
previewLink: 'Preview Link'
},
prdDep: 'Production Dependency',
devDep: 'Development Dependency'
},
home: {
branchDesc:
'This page is reserved for the internal dashboard overview of CN-RDMS and can be adjusted according to actual business needs.',
greetingLateNight: 'It is late, {userName}. Take some rest.',
greetingMorning: 'Good morning, {userName}. Another productive day begins.',
greetingNoon: 'Good noon, {userName}. Remember to take a break.',
greetingAfternoon: 'Good afternoon, {userName}. Keep up the momentum.',
greetingEvening: 'Good evening, {userName}. Thanks for your hard work.',
weatherDesc: 'Today is cloudy to clear, 20℃ - 25℃!',
projectCount: 'Project Count',
todo: 'Todo',
message: 'Message',
downloadCount: 'Download Count',
registerCount: 'Register Count',
schedule: 'Work and rest Schedule',
study: 'Study',
work: 'Work',
rest: 'Rest',
entertainment: 'Entertainment',
visitCount: 'Visit Count',
turnover: 'Turnover',
dealCount: 'Deal Count',
projectNews: {
title: 'Project News',
moreNews: 'More News',
desc1: 'CN-RDMS project initialization is complete and the internal management frontend baseline is ready.',
desc2: 'The development environment, routing structure and permission skeleton have been verified.',
desc3: 'Core pages will continue to be replaced with actual internal business modules.',
desc4: 'Project documentation and environment conventions are being refined step by step.',
desc5: 'The current dashboard content is still placeholder data and can be replaced as needed.'
},
creativity: 'Creativity'
},
function: {
tab: {
tabOperate: {
title: 'Tab Operation',
addTab: 'Add Tab',
addTabDesc: 'To user management page',
closeTab: 'Close Tab',
closeCurrentTab: 'Close Current Tab',
closeAboutTab: 'Close "User Management" Tab',
addMultiTab: 'Add Multi Tab',
addMultiTabDesc1: 'To MultiTab page',
addMultiTabDesc2: 'To MultiTab page(with query params)'
},
tabTitle: {
title: 'Tab Title',
changeTitle: 'Change Title',
change: 'Change',
resetTitle: 'Reset Title',
reset: 'Reset'
}
},
multiTab: {
routeParam: 'Route Param',
backTab: 'Back function_tab'
},
toggleAuth: {
toggleAccount: 'Toggle Account',
authHook: 'Auth Hook Function `hasAuth`',
superAdminVisible: 'Super Admin Visible',
adminVisible: 'Admin Visible',
adminOrUserVisible: 'Admin and User Visible'
},
request: {
repeatedErrorOccurOnce: 'Repeated Request Error Occurs Once',
repeatedError: 'Repeated Request Error',
repeatedErrorMsg1: 'Custom Request Error 1',
repeatedErrorMsg2: 'Custom Request Error 2'
}
},
system: {
common: {
status: {
enable: 'Enable',
disable: 'Disable'
}
},
role: {
title: 'Role List',
currentRole: 'Current Role',
resourceAuth: 'Resource Auth',
searchKeyword: 'Keyword',
searchPlaceholder: 'Role name / role key',
searchMode: 'Search Field',
all: 'All',
roleName: 'Role Name',
roleCode: 'Role Key',
roleStatus: 'Role Status',
roleDesc: 'Role Description',
remark: 'Remark',
sort: 'Sort',
createTime: 'Create Time',
menuAuth: 'Menu Auth',
buttonAuth: 'Button Auth',
saveAuth: 'Save Auth',
selectedCount: 'Selected Resources',
disabledTip: 'Disabled roles cannot be assigned menu permissions',
emptyRole: 'Select a role first',
lastAuthSave: 'Last auth save',
unsavedTip: 'Remember to save after changing permissions',
form: {
roleName: 'Please enter role name',
roleCode: 'Please enter role code',
roleStatus: 'Please select role status',
roleDesc: 'Please enter role description',
remark: 'Please enter remark',
sort: 'Please enter sort order',
resourceKeyword: 'Filter the permission tree by resource name',
startTime: 'Start time',
endTime: 'End time'
},
addRole: 'Add Role',
editRole: 'Edit Role',
type: {
system: 'System Built-in',
custom: 'Custom'
}
},
user: {
title: 'User List',
orgTitle: 'Organization',
orgFilterPlaceholder: 'Filter organization',
emptyOrg: 'No organization available',
orgName: 'Organization Name',
orgCode: 'Organization Code',
orgTypeLabel: 'Organization Type',
orgSort: 'Sort',
orgLeader: 'Leader',
orgLeaderTitle: 'Leader Management',
candidateUser: 'Candidate User',
effectiveFrom: 'Effective From',
effectiveUntil: 'Effective Until',
relationRemark: 'Leader Remark',
emptyLeader: 'No leader',
userName: 'User Name',
userGender: 'Gender',
nickName: 'Nick Name',
deptName: 'Organization',
positionName: 'Post',
userPhone: 'Phone Number',
userEmail: 'Email',
userStatus: 'User Status',
userRole: 'User Role',
password: 'Password',
newPassword: 'New Password',
confirmPassword: 'Confirm Password',
remark: 'Remark',
resignedAt: 'Resigned At',
resignedState: 'Resigned Status',
loginDate: 'Last Login',
createTime: 'Created Time',
form: {
userName: 'Please enter user name',
userGender: 'Please select gender',
nickName: 'Please enter nick name',
orgName: 'Please enter organization name',
orgCode: 'Please enter organization code',
orgTypeLabel: 'Please select organization type',
orgSort: 'Please enter sort',
parentOrg: 'Please select parent organization',
candidateUser: 'Please select leader',
effectiveFrom: 'Please select effective start time',
effectiveUntil: 'Please select effective end time',
relationRemark: 'Please enter leader remark',
deptName: 'Please select organization',
positionName: 'Please select post',
userPhone: 'Please enter phone number',
userEmail: 'Please enter email',
userStatus: 'Please select user status',
userRole: 'Please select user role',
password: 'Please enter password',
newPassword: 'Please enter new password',
confirmPassword: 'Please enter password again',
remark: 'Please enter remark',
resignedAt: 'Please select resigned time'
},
addUser: 'Add User',
editUser: 'Edit User',
addOrg: 'Add Organization',
addChildOrg: 'Add',
editOrg: 'Edit Organization',
addLeader: 'Add Leader',
editLeader: 'Edit Leader',
resetPassword: 'Reset Password',
resignUser: 'Resign User',
adjustResignUser: 'Adjust Resignation',
restoreUser: 'Restore User',
topLevelOrg: 'Top Level Organization',
sections: {
basicInfo: 'Basic Information',
organizationInfo: 'Organization And Roles',
contactInfo: 'Contact Information'
},
orgType: {
company: 'Company',
dept: 'Department',
direction: 'Direction',
team: 'Team'
},
gender: {
unknown: 'Unknown',
male: 'Male',
female: 'Female'
},
resignedStateEnum: {
active: 'Active',
pending: 'Pending Resignation',
resigned: 'Resigned'
}
},
menu: {
home: 'Home',
title: 'Menu List',
id: 'ID',
parentId: 'Parent ID',
menuType: 'Menu Type',
menuName: 'Menu Name',
permission: 'Permission',
routeName: 'Route Name',
routePath: 'Route Path',
routeKind: 'Route Kind',
routePropsJson: 'Route Props JSON',
pageResource: 'Page Resource',
component: 'Component Path',
componentName: 'Component Name',
iframeUrl: 'Iframe URL',
externalUrl: 'External URL',
redirectTarget: 'Redirect Target',
pathParam: 'Path Param',
layout: 'Layout Component',
page: 'Page Component',
i18nKey: 'I18n Key',
icon: 'Icon',
localIcon: 'Local Icon',
iconTypeTitle: 'Icon Type',
order: 'Order',
constant: 'Constant',
keepAlive: 'Keep Alive',
href: 'Href',
hideInMenu: 'Hide In Menu',
activeMenu: 'Active Menu',
multiTab: 'Multi Tab',
fixedIndexInTab: 'Fixed Index In Tab',
query: 'Query Params',
button: 'Button',
buttonCode: 'Button Code',
buttonDesc: 'Button Desc',
menuStatus: 'Menu Status',
visible: 'Visible',
alwaysShow: 'Always Show',
createTime: 'Create Time',
topLevel: 'Top Level Menu',
sections: {
basic: 'Basic Information',
route: 'Route Information',
display: 'Display Options'
},
form: {
home: 'Please select home',
menuType: 'Please select menu type',
parentId: 'Please select parent menu',
menuName: 'Please enter menu name',
permission: 'Please enter permission',
routeName: 'Please enter route name',
routePath: 'Please enter route path',
path: 'Please enter route path',
component: 'Please enter component path',
componentName: 'Please enter component name',
routeKind: 'Please select route kind',
pageResource: 'Please select page resource',
pageResourceParentMismatch: 'The selected page resource does not match the current parent menu path',
routePropsJson: 'Please enter a valid JSON string',
routePropsJsonHint: 'For example {"url":"https://example.com"}',
iframeUrl: 'Please enter iframe URL',
externalUrl: 'Please enter external URL',
redirectTarget: 'Please enter redirect target',
pathParam: 'Please enter path param',
page: 'Please select page component',
layout: 'Please select layout component',
i18nKey: 'Please enter i18n key',
icon: 'Please enter iconify name',
localIcon: 'Please enter local icon name',
order: 'Please enter order',
sort: 'Please enter sort order',
keepAlive: 'Please select whether to cache route',
href: 'Please enter href',
hideInMenu: 'Please select whether to hide menu',
activeMenu: 'Please select route name of the highlighted menu',
multiTab: 'Please select whether to support multiple tabs',
fixedInTab: 'Please select whether to fix in the tab',
fixedIndexInTab: 'Please enter the index fixed in the tab',
queryKey: 'Please enter route parameter Key',
queryValue: 'Please enter route parameter Value',
button: 'Please select whether it is a button',
buttonCode: 'Please enter button code',
buttonDesc: 'Please enter button description',
menuStatus: 'Please select menu status'
},
tips: {
routeKind: 'Choose the route kind that matches the current dropdown option',
routeKindSummary:
'Most backend business menus should use "Page Route". Only switch to another type when you are building a top-level single page, iframe page, external link, or redirect route.',
routeKindItems: {
directory:
'Used only for menu grouping and does not render a real page. Typical for a parent directory such as "System Management".',
view: 'Use this for normal business pages such as Role Management, Menu Management, and Dictionary Management.',
single:
'Used when the page should be displayed as a top-level single page instead of being shown inside a directory content area.',
iframe: 'Used when the page content is embedded by iframe. You need to provide url in Route Props JSON.',
external:
'Used when clicking the menu should open an external website instead of rendering a page in this system.',
redirect: 'Used only as a redirect route. Normal business menus usually should not choose this.'
},
routePath:
'Fill in the last segment of the access path. For Role Management, the full path is /system/role, so this field is usually role.',
pageResource:
'Page routes should select a page resource from the frontend whitelist. For example, Role Management maps to /system/role and view.system_role.',
component:
'The component field should use the frontend page-resource whitelist key, not a src file path. For Role Management, use or select view.system_role.'
},
addMenu: 'Add Menu',
editMenu: 'Edit Menu',
addChildMenu: 'Add Child Menu',
type: {
directory: 'Directory',
menu: 'Menu',
button: 'Button'
},
iconType: {
iconify: 'Iconify Icon',
local: 'Local Icon'
},
routeKindEnum: {
directory: 'Directory Route',
view: 'Page Route',
single: 'Top-level Single Page',
iframe: 'Iframe Page',
external: 'External Link',
redirect: 'Redirect Route'
}
},
dict: {
typeTitle: 'Dictionary Type',
dataTitle: 'Dictionary Data',
currentType: 'Current Type',
emptyType: 'Select a dictionary type first',
typeSearchPlaceholder: 'Dictionary Type / Type Code',
dictName: 'Dictionary Name',
dictCode: 'Dictionary Code',
dictStatus: 'Dictionary Status',
dictLabel: 'Dictionary Label',
dictValue: 'Dictionary Value',
sort: 'Sort',
remark: 'Remark',
form: {
dictName: 'Please enter dictionary name',
dictCode: 'Please enter dictionary code',
dictStatus: 'Please select dictionary status',
dictLabel: 'Please enter dictionary label',
dictValue: 'Please enter dictionary value',
sort: 'Please enter sort',
remark: 'Please enter remark'
},
addType: 'Add Dictionary Type',
editType: 'Edit Dictionary Type',
addData: 'Add Dictionary Data',
editData: 'Edit Dictionary Data'
}
}
},
form: {
required: 'Cannot be empty',
userName: {
required: 'Please enter user name',
invalid: 'User name format is incorrect'
},
phone: {
required: 'Please enter phone number',
invalid: 'Phone number format is incorrect'
},
pwd: {
required: 'Please enter password',
invalid: '6-18 characters, including letters, numbers, and underscores'
},
confirmPwd: {
required: 'Please enter password again',
invalid: 'The two passwords are inconsistent'
},
code: {
required: 'Please enter verification code',
invalid: 'Verification code format is incorrect'
},
email: {
required: 'Please enter email',
invalid: 'Email format is incorrect'
}
},
dropdown: {
closeCurrent: 'Close Current',
closeOther: 'Close Other',
closeLeft: 'Close Left',
closeRight: 'Close Right',
closeAll: 'Close All'
},
icon: {
themeConfig: 'Theme Configuration',
themeSchema: 'Theme Schema',
lang: 'Switch Language',
fullscreen: 'Fullscreen',
fullscreenExit: 'Exit Fullscreen',
reload: 'Reload Page',
collapse: 'Collapse Menu',
expand: 'Expand Menu',
pin: 'Pin',
unpin: 'Unpin'
},
datatable: {
itemCount: 'Total {total} items'
}
};
export default local;

687
src/locales/langs/zh-cn.ts Normal file
View File

@@ -0,0 +1,687 @@
const local: App.I18n.Schema = {
system: {
title: '研发内部管理系统'
},
common: {
action: '操作',
add: '新增',
addSuccess: '添加成功',
backToHome: '返回首页',
batchDelete: '批量删除',
cancel: '取消',
close: '关闭',
check: '勾选',
expandColumn: '展开列',
columnSetting: '列设置',
config: '配置',
confirm: '确认',
delete: '删除',
deleteSuccess: '删除成功',
confirmDelete: '确认删除吗?',
edit: '编辑',
warning: '警告',
error: '错误',
index: '序号',
keywordSearch: '请输入关键词搜索',
logout: '退出登录',
logoutConfirm: '确认退出登录吗?',
lookForward: '敬请期待',
modify: '修改',
modifySuccess: '修改成功',
more: '更多',
noData: '无数据',
operate: '操作',
pleaseCheckValue: '请检查输入的值是否合法',
refresh: '刷新',
reset: '重置',
search: '搜索',
switch: '切换',
tip: '提示',
trigger: '触发',
update: '更新',
updateSuccess: '更新成功',
userCenter: '个人中心',
yesOrNo: {
yes: '是',
no: '否'
}
},
request: {
logout: '请求失败后登出用户',
logoutMsg: '用户状态失效,请重新登录',
logoutWithModal: '请求失败后弹出模态框再登出用户',
logoutWithModalMsg: '用户状态失效,请重新登录',
refreshToken: '请求的token已过期刷新token',
tokenExpired: 'token已过期'
},
theme: {
themeSchema: {
title: '主题模式',
light: '亮色模式',
dark: '暗黑模式',
auto: '跟随系统'
},
grayscale: '灰色模式',
colourWeakness: '色弱模式',
layoutMode: {
title: '布局模式',
vertical: '左侧菜单模式',
'vertical-mix': '左侧菜单混合模式',
horizontal: '顶部菜单模式',
'horizontal-mix': '顶部菜单混合模式',
reverseHorizontalMix: '一级菜单与子级菜单位置反转'
},
recommendColor: '应用推荐算法的颜色',
recommendColorDesc: '推荐颜色的算法参照',
themeColor: {
title: '主题颜色',
primary: '主色',
info: '信息色',
success: '成功色',
warning: '警告色',
error: '错误色',
followPrimary: '跟随主色'
},
scrollMode: {
title: '滚动模式',
wrapper: '外层滚动',
content: '主体滚动'
},
page: {
animate: '页面切换动画',
mode: {
title: '页面切换动画类型',
'fade-slide': '滑动',
fade: '淡入淡出',
'fade-bottom': '底部消退',
'fade-scale': '缩放消退',
'zoom-fade': '渐变',
'zoom-out': '闪现',
none: '无'
}
},
fixedHeaderAndTab: '固定头部和标签栏',
header: {
height: '头部高度',
breadcrumb: {
visible: '显示面包屑',
showIcon: '显示面包屑图标'
},
multilingual: {
visible: '显示多语言按钮'
},
globalSearch: {
visible: '显示全局搜索按钮'
}
},
tab: {
visible: '显示标签栏',
cache: '标签栏信息缓存',
height: '标签栏高度',
mode: {
title: '标签栏风格',
chrome: '谷歌风格',
button: '按钮风格'
}
},
sider: {
inverted: '深色侧边栏',
width: '侧边栏宽度',
collapsedWidth: '侧边栏折叠宽度',
mixWidth: '混合布局侧边栏宽度',
mixCollapsedWidth: '混合布局侧边栏折叠宽度',
mixChildMenuWidth: '混合布局子菜单宽度'
},
footer: {
visible: '显示底部',
fixed: '固定底部',
height: '底部高度',
right: '底部局右'
},
watermark: {
visible: '显示全屏水印',
text: '水印文本',
enableUserName: '启用用户名水印'
},
themeDrawerTitle: '主题配置',
pageFunTitle: '页面功能',
configOperation: {
copyConfig: '复制配置',
copySuccessMsg: '复制成功,请替换 src/theme/settings.ts 中的变量 themeSettings',
resetConfig: '重置配置',
resetSuccessMsg: '重置成功'
}
},
route: {
login: '登录',
403: '无权限',
404: '页面不存在',
500: '服务器错误',
'iframe-page': '外链页面',
'user-center': '个人中心',
function: '系统功能',
function_tab: '标签页',
'function_multi-tab': '多标签页',
'function_hide-child': '隐藏子菜单',
'function_hide-child_one': '隐藏子菜单',
'function_hide-child_two': '菜单二',
'function_hide-child_three': '菜单三',
function_request: '请求',
'function_toggle-auth': '切换权限',
'function_super-page': '超级管理员可见',
system: '系统管理',
system_user: '用户管理',
'system_user-detail': '用户详情',
system_role: '角色管理',
system_menu: '菜单管理',
system_post: '岗位管理',
system_dict: '字典管理',
exception: '异常页',
exception_403: '403',
exception_404: '404',
exception_500: '500',
plugin: '插件示例',
plugin_copy: '剪贴板',
plugin_charts: '图表',
plugin_charts_echarts: 'ECharts',
plugin_charts_antv: 'AntV',
plugin_charts_vchart: 'VChart',
plugin_editor: '编辑器',
plugin_editor_quill: '富文本编辑器',
plugin_editor_markdown: 'MD 编辑器',
plugin_icon: '图标',
plugin_map: '地图',
plugin_print: '打印',
plugin_swiper: 'Swiper',
plugin_video: '视频',
plugin_barcode: '条形码',
plugin_pinyin: '拼音',
plugin_excel: 'Excel',
plugin_pdf: 'PDF 预览',
plugin_gantt: '甘特图',
plugin_gantt_dhtmlx: 'dhtmlxGantt',
plugin_gantt_vtable: 'VTableGantt',
plugin_typeit: '打字机',
plugin_tables: '表格',
plugin_tables_vtable: 'VTable'
},
page: {
login: {
common: {
loginOrRegister: '登录 / 注册',
userNamePlaceholder: '请输入用户名',
phonePlaceholder: '请输入手机号',
codePlaceholder: '请输入验证码',
passwordPlaceholder: '请输入密码',
confirmPasswordPlaceholder: '请再次输入密码',
codeLogin: '验证码登录',
confirm: '确定',
back: '返回',
validateSuccess: '验证成功',
loginSuccess: '登录成功',
welcomeBack: '欢迎回来,{userName} '
},
pwdLogin: {
title: '密码登录',
rememberMe: '记住我',
forgetPassword: '忘记密码?',
register: '注册账号',
otherAccountLogin: '其他账号登录',
otherLoginMode: '其他登录方式',
superAdmin: '超级管理员',
admin: '管理员',
user: '普通用户'
},
codeLogin: {
title: '验证码登录',
getCode: '获取验证码',
reGetCode: '{time}秒后重新获取',
sendCodeSuccess: '验证码发送成功',
imageCodePlaceholder: '请输入图片验证码'
},
register: {
title: '注册账号',
agreement: '我已经仔细阅读并接受',
protocol: '《用户协议》',
policy: '《隐私权政策》'
},
resetPwd: {
title: '重置密码'
},
bindWeChat: {
title: '绑定微信'
}
},
about: {
title: '关于',
introduction:
'灿能研发内部管理系统是灿能电力内部使用的研发管理前端系统,用于承载内部业务模块、工程协作流程和日常管理能力。',
projectInfo: {
title: '项目信息',
version: '版本',
latestBuildTime: '最新构建时间',
githubLink: 'Github 地址',
previewLink: '预览地址'
},
prdDep: '生产依赖',
devDep: '开发依赖'
},
home: {
branchDesc: '当前页面用于展示 CN-RDMS 的内部工作台概览,后续可根据真实业务需要继续调整。',
greetingLateNight: '夜深了,{userName},注意休息。',
greetingMorning: '早安,{userName},今天又是充满活力的一天!',
greetingNoon: '中午好,{userName},记得按时休息。',
greetingAfternoon: '下午好,{userName},继续保持状态。',
greetingEvening: '晚上好,{userName},辛苦了。',
weatherDesc: '今日多云转晴20℃ - 25℃!',
projectCount: '项目数',
todo: '待办',
message: '消息',
downloadCount: '下载量',
registerCount: '注册量',
schedule: '作息安排',
study: '学习',
work: '工作',
rest: '休息',
entertainment: '娱乐',
visitCount: '访问量',
turnover: '成交额',
dealCount: '成交量',
projectNews: {
title: '项目动态',
moreNews: '更多动态',
desc1: 'CN-RDMS 项目基础初始化已完成,内部管理前端骨架已经就位。',
desc2: '开发环境、路由结构和权限骨架已完成首轮验证。',
desc3: '后续将逐步把示例页面替换为真实内部业务模块。',
desc4: '项目文档、环境约定和协作规范正在持续整理中。',
desc5: '当前工作台中的统计数据仍为占位内容,可按实际业务继续替换。'
},
creativity: '创意'
},
function: {
tab: {
tabOperate: {
title: '标签页操作',
addTab: '添加标签页',
addTabDesc: '跳转到用户管理页面',
closeTab: '关闭标签页',
closeCurrentTab: '关闭当前标签页',
closeAboutTab: '关闭"用户管理"标签页',
addMultiTab: '添加多标签页',
addMultiTabDesc1: '跳转到多标签页页面',
addMultiTabDesc2: '跳转到多标签页页面(带有查询参数)'
},
tabTitle: {
title: '标签页标题',
changeTitle: '修改标题',
change: '修改',
resetTitle: '重置标题',
reset: '重置'
}
},
multiTab: {
routeParam: '路由参数',
backTab: '返回 function_tab'
},
toggleAuth: {
toggleAccount: '切换账号',
authHook: '权限钩子函数 `hasAuth`',
superAdminVisible: '超级管理员可见',
adminVisible: '管理员可见',
adminOrUserVisible: '管理员和用户可见'
},
request: {
repeatedErrorOccurOnce: '重复请求错误只出现一次',
repeatedError: '重复请求错误',
repeatedErrorMsg1: '自定义请求错误 1',
repeatedErrorMsg2: '自定义请求错误 2'
}
},
system: {
common: {
status: {
enable: '启用',
disable: '禁用'
}
},
role: {
title: '角色列表',
currentRole: '当前角色',
resourceAuth: '资源授权',
searchKeyword: '关键字',
searchPlaceholder: '角色名称 / 角色标识',
searchMode: '检索字段',
all: '全部',
roleName: '角色名称',
roleCode: '角色标识',
roleStatus: '角色状态',
roleDesc: '角色描述',
remark: '备注',
sort: '显示顺序',
createTime: '创建时间',
menuAuth: '菜单权限',
buttonAuth: '按钮权限',
saveAuth: '保存授权',
selectedCount: '已选资源',
disabledTip: '禁用角色不允许分配菜单权限',
emptyRole: '请先选择角色',
lastAuthSave: '最近一次授权保存',
unsavedTip: '授权变更后请记得保存',
form: {
roleName: '请输入角色名称',
roleCode: '请输入角色标识',
roleStatus: '请选择角色状态',
roleDesc: '请输入角色描述',
remark: '请输入备注',
sort: '请输入显示顺序',
resourceKeyword: '输入资源名称过滤权限树',
startTime: '开始时间',
endTime: '结束时间'
},
addRole: '新增角色',
editRole: '编辑角色',
type: {
system: '系统内置',
custom: '自定义'
}
},
user: {
title: '用户列表',
orgTitle: '组织架构',
orgFilterPlaceholder: '筛选组织名称',
emptyOrg: '暂无可用组织',
orgName: '组织名称',
orgCode: '组织编码',
orgTypeLabel: '组织类型',
orgSort: '排序',
orgLeader: '负责人',
orgLeaderTitle: '负责人管理',
candidateUser: '候选人员',
effectiveFrom: '生效开始',
effectiveUntil: '生效结束',
relationRemark: '负责人备注',
emptyLeader: '暂无负责人',
userName: '用户名',
userGender: '性别',
nickName: '昵称',
deptName: '所属组织',
positionName: '岗位',
userPhone: '手机号',
userEmail: '邮箱',
userStatus: '用户状态',
userRole: '用户角色',
password: '密码',
newPassword: '新密码',
confirmPassword: '确认密码',
remark: '备注',
resignedAt: '离职时间',
resignedState: '离职状态',
loginDate: '最后登录',
createTime: '创建时间',
form: {
userName: '请输入用户名',
userGender: '请选择性别',
nickName: '请输入昵称',
orgName: '请输入组织名称',
orgCode: '请输入组织编码',
orgTypeLabel: '请选择组织类型',
orgSort: '请输入排序',
parentOrg: '请选择上级组织',
candidateUser: '请选择负责人',
effectiveFrom: '请选择生效开始时间',
effectiveUntil: '请选择生效结束时间',
relationRemark: '请输入负责人备注',
deptName: '请选择所属组织',
positionName: '请选择岗位',
userPhone: '请输入手机号',
userEmail: '请输入邮箱',
userStatus: '请选择用户状态',
userRole: '请选择用户角色',
password: '请输入密码',
newPassword: '请输入新密码',
confirmPassword: '请再次输入密码',
remark: '请输入备注',
resignedAt: '请选择离职时间'
},
addUser: '新增用户',
editUser: '编辑用户',
addOrg: '新增组织',
addChildOrg: '新增',
editOrg: '编辑组织',
addLeader: '新增负责人',
editLeader: '编辑负责人',
resetPassword: '重置密码',
resignUser: '办理离职',
adjustResignUser: '调整离职',
restoreUser: '恢复在职',
topLevelOrg: '顶级组织',
sections: {
basicInfo: '基础信息',
organizationInfo: '组织与角色',
contactInfo: '联系方式'
},
orgType: {
company: '公司',
dept: '部门',
direction: '条线',
team: '团队'
},
gender: {
unknown: '未知',
male: '男',
female: '女'
},
resignedStateEnum: {
active: '在职',
pending: '待离职',
resigned: '已离职'
}
},
menu: {
home: '首页',
title: '菜单列表',
id: 'ID',
parentId: '父级菜单',
menuType: '菜单类型',
menuName: '菜单名称',
permission: '权限标识',
routeName: '路由名称',
routePath: '路由地址',
routeKind: '路由类型',
routePropsJson: '路由参数 JSON',
pageResource: '页面资源',
component: '组件路径',
componentName: '组件名称',
iframeUrl: 'iframe 地址',
externalUrl: '外链地址',
redirectTarget: '重定向目标',
pathParam: '路径参数',
layout: '布局',
page: '页面组件',
i18nKey: '国际化key',
icon: '图标',
localIcon: '本地图标',
iconTypeTitle: '图标类型',
order: '排序',
constant: '常量路由',
keepAlive: '缓存路由',
href: '外链',
hideInMenu: '隐藏菜单',
activeMenu: '高亮的菜单',
multiTab: '支持多页签',
fixedIndexInTab: '固定在页签中的序号',
query: '路由参数',
button: '按钮',
buttonCode: '按钮编码',
buttonDesc: '按钮描述',
menuStatus: '菜单状态',
visible: '显示菜单',
alwaysShow: '总是显示子菜单',
createTime: '创建时间',
topLevel: '顶级菜单',
sections: {
basic: '基础信息',
route: '路由信息',
display: '显示配置'
},
form: {
home: '请选择首页',
menuType: '请选择菜单类型',
parentId: '请选择父级菜单',
menuName: '请输入菜单名称',
permission: '请输入权限标识',
routeName: '请输入路由名称',
routePath: '请输入路由路径',
path: '请输入路由地址',
component: '请输入组件路径',
componentName: '请输入组件名称',
routeKind: '请选择路由类型',
pageResource: '请选择页面资源',
pageResourceParentMismatch: '所选页面资源与当前父级菜单层级不匹配',
routePropsJson: '请输入合法的 JSON 字符串',
routePropsJsonHint: '例如 {"url":"https://example.com"}',
iframeUrl: '请输入 iframe 地址',
externalUrl: '请输入外链地址',
redirectTarget: '请输入重定向目标',
pathParam: '请输入路径参数',
page: '请选择页面组件',
layout: '请选择布局组件',
i18nKey: '请输入国际化key',
icon: '请输入图标',
localIcon: '请选择本地图标',
order: '请输入排序',
sort: '请输入显示顺序',
keepAlive: '请选择是否缓存路由',
href: '请输入外链',
hideInMenu: '请选择是否隐藏菜单',
activeMenu: '请选择高亮的菜单的路由名称',
multiTab: '请选择是否支持多标签',
fixedInTab: '请选择是否固定在页签中',
fixedIndexInTab: '请输入固定在页签中的序号',
queryKey: '请输入路由参数Key',
queryValue: '请输入路由参数Value',
button: '请选择是否按钮',
buttonCode: '请输入按钮编码',
buttonDesc: '请输入按钮描述',
menuStatus: '请选择菜单状态'
},
tips: {
routeKind: '按当前下拉选项选择对应的路由类型',
routeKindSummary:
'大多数后台业务菜单直接选“普通页面”。只有做顶级单页、iframe、外链或重定向时才需要改成其他类型。',
routeKindItems: {
directory: '只做菜单分组,不承载实际页面。通常用于“系统管理”这类父级目录。',
view: '常规业务页面都选这个。比如角色管理、菜单管理、字典管理。',
single: '页面不挂在目录内容区里,而是作为顶级单页展示。适合用户中心这类单页入口。',
iframe: '页面内容通过 iframe 嵌入,需要在“路由参数 JSON”里提供 url。',
external: '点击菜单后直接打开外部网站,不在当前系统页面里渲染。',
redirect: '只用于路由跳转中转,普通业务菜单一般不选。'
},
routePath: '路由地址填写访问路径中的末级段。以“角色管理”为例,完整地址是 /system/role这里通常填写 role。',
pageResource:
'普通页面请从前端页面资源白名单中选择。例如角色管理对应 /system/role与组件键 view.system_role。',
component:
'组件路径填写前端页面资源白名单中的组件键,不是 src 下的文件路径。以“角色管理”为例,可填写或选择 view.system_role。'
},
addMenu: '新增菜单',
editMenu: '编辑菜单',
addChildMenu: '新增子菜单',
type: {
directory: '目录',
menu: '菜单',
button: '按钮'
},
iconType: {
iconify: 'iconify图标',
local: '本地图标'
},
routeKindEnum: {
directory: '目录路由',
view: '普通页面',
single: '顶级单页',
iframe: 'Iframe 页面',
external: '外链页面',
redirect: '重定向路由'
}
},
dict: {
typeTitle: '字典类型',
dataTitle: '字典数据',
currentType: '当前字典',
emptyType: '请先选择字典类型',
typeSearchPlaceholder: '字典类型 / 类型编码',
dictName: '字典名称',
dictCode: '字典编码',
dictStatus: '字典状态',
dictLabel: '字典标签',
dictValue: '字典键值',
sort: '排序',
remark: '备注',
form: {
dictName: '请输入字典名称',
dictCode: '请输入字典编码',
dictStatus: '请选择字典状态',
dictLabel: '请输入字典标签',
dictValue: '请输入字典键值',
sort: '请输入排序',
remark: '请输入备注'
},
addType: '新增字典类型',
editType: '编辑字典类型',
addData: '新增字典数据',
editData: '编辑字典数据'
}
}
},
form: {
required: '不能为空',
userName: {
required: '请输入用户名',
invalid: '用户名格式不正确'
},
phone: {
required: '请输入手机号',
invalid: '手机号格式不正确'
},
pwd: {
required: '请输入密码',
invalid: '密码格式不正确6-18位字符包含字母、数字、下划线'
},
confirmPwd: {
required: '请输入确认密码',
invalid: '两次输入密码不一致'
},
code: {
required: '请输入验证码',
invalid: '验证码格式不正确'
},
email: {
required: '请输入邮箱',
invalid: '邮箱格式不正确'
}
},
dropdown: {
closeCurrent: '关闭',
closeOther: '关闭其它',
closeLeft: '关闭左侧',
closeRight: '关闭右侧',
closeAll: '关闭所有'
},
icon: {
themeConfig: '主题配置',
themeSchema: '主题模式',
lang: '切换语言',
fullscreen: '全屏',
fullscreenExit: '退出全屏',
reload: '刷新页面',
collapse: '折叠菜单',
expand: '展开菜单',
pin: '固定',
unpin: '取消固定'
},
datatable: {
itemCount: '共 {total} 条'
}
};
export default local;

9
src/locales/locale.ts Normal file
View File

@@ -0,0 +1,9 @@
import zhCN from './langs/zh-cn';
import enUS from './langs/en-us';
const locales: Record<App.I18n.LangType, App.I18n.Schema> = {
'zh-CN': zhCN,
'en-US': enUS
};
export default locales;

13
src/locales/ui.ts Normal file
View File

@@ -0,0 +1,13 @@
// import { dateEnUS, dateZhCN, enUS, zhCN } from 'naive-ui';
import zhCn from 'element-plus/dist/locale/zh-cn.mjs';
import en from 'element-plus/dist/locale/en.mjs';
export const UILocales: any = {
'zh-CN': zhCn,
'en-US': en
};
// export const naiveDateLocales: Record<App.I18n.LangType, NDateLocale> = {
// 'zh-CN': dateZhCN,
// 'en-US': dateEnUS
// };