From 1bc9358d30c81561e692bae89c333eb5fc8337ab Mon Sep 17 00:00:00 2001 From: lai <371757574@qq.com> Date: Wed, 8 Nov 2023 11:21:39 +0800 Subject: [PATCH] =?UTF-8?q?---=E7=94=A8=E6=88=B7=E7=AE=A1=E7=90=86,?= =?UTF-8?q?=E7=BD=91=E5=85=83=E7=AE=A1=E7=90=86=E7=AD=89=E4=B8=AD=E8=8B=B1?= =?UTF-8?q?=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/locales/en-US.ts | 70 ++++- src/i18n/locales/zh-CN.ts | 70 ++++- src/views/account/components/base-info.vue | 10 +- src/views/account/components/reset-passwd.vue | 6 +- src/views/configManage/backupManage/index.vue | 6 +- src/views/configManage/configParam/index.vue | 4 +- .../configManage/configParamTree/index.vue | 4 +- src/views/configManage/neManage/index.vue | 239 +++++++-------- .../configManage/softwareManage/index.vue | 2 +- src/views/faultManage/active-alarm/index.vue | 10 +- src/views/faultManage/history-alarm/index.vue | 4 +- src/views/index.vue | 8 +- src/views/logManage/logSet/index.vue | 10 +- src/views/monitor/cache/index.vue | 6 +- src/views/monitor/job/index.vue | 26 +- src/views/monitor/job/log.vue | 12 +- src/views/monitor/online/index.vue | 4 +- src/views/neUser/auth/index.vue | 12 +- src/views/neUser/sub/index.vue | 8 +- src/views/perfManage/perfThreshold/index.vue | 8 +- src/views/perfManage/taskManage/index.vue | 8 +- src/views/system/config/index.vue | 16 +- src/views/system/dept/index.vue | 10 +- src/views/system/dict/data.vue | 12 +- src/views/system/dict/index.vue | 18 +- src/views/system/log/login/index.vue | 16 +- src/views/system/log/operate/index.vue | 12 +- src/views/system/menu/index.vue | 10 +- src/views/system/post/index.vue | 14 +- src/views/system/role/auth-user.vue | 6 +- src/views/system/role/index.vue | 24 +- .../setting/components/change-copyright.vue | 4 +- .../setting/components/change-login-bg.vue | 12 +- .../system/setting/components/change-logo.vue | 8 +- .../setting/components/change-title.vue | 4 +- src/views/system/user/index.vue | 281 ++++++++++-------- src/views/tool/upload/index.vue | 12 +- 37 files changed, 582 insertions(+), 404 deletions(-) diff --git a/src/i18n/locales/en-US.ts b/src/i18n/locales/en-US.ts index da57fdff..32ab66da 100644 --- a/src/i18n/locales/en-US.ts +++ b/src/i18n/locales/en-US.ts @@ -18,11 +18,13 @@ export default { search: 'Search', reset: 'Reset', viewText: 'View', + view: 'View', addText: 'Add', editText: 'Edit', deleteText: 'Delete', downloadText: 'Download', uploadText: 'Upload', + unableNull:' Cannot be empty', moreText: 'More', searchBarText: 'Search bar', reloadText: 'Refresh', @@ -82,6 +84,8 @@ export default { // 页面 views: { index: { + normal:'Normal', + abnormal:'Abnormal', hostName: 'hostName', osInfo: 'osInfo', dbInfo: 'dbInfo', @@ -114,12 +118,37 @@ export default { }, configManage: { neManage: { - reload: '重载配置', + addNe:'Add Network Element', + delSure:'Confirm deleting the data item with network element name {msg}', + editNe:'Edit Network Element', + exportSure:'Confirm exporting the configuration information with the network element name {msg}', + exportTip:'Export successful, please go to backup management for download', + getInfo:'Failed to get network element information', + neType:'Ne Type', + neTypePlease: 'Select network element type', + neId:'Ne Id', + neName:'Ne Name', + neTypeTip:'Fill in the type of network element created, such as:SMF', + uid:'rm UID', + uidTip:'Please enter a unique resource identifier', + ip:'IP Address', + mac:'Ne MAC address', + macTip:'Able to locate the physical address (MAC) of the network element', + port:'Port', + pvflag:'PV Flag', + pnf:'Physical Network Element', + vnf:'Virtual Network Element', + province:'Province', + vendorName:'Vendor Name', + dn:'Network Identification', + reload: 'Reload', restart: 'Restart', + totalSure:'Confirm the network element with {operator} network element name {msg}', stop: 'Stop', start: 'Start', export: 'Export', import: 'Import', + fileForm:'File Source', selectPlease:'Please select the source of the import file', server:'Server File', local:'Local File', @@ -179,6 +208,7 @@ export default { }, neUser: { auth: { + authInfo:'Authentication Info', neTypePlease: 'Query network element type', neType: 'UDM Type', export: 'Export', @@ -415,5 +445,43 @@ export default { down: '下行', } }, + system:{ + user: { + userInfo:' User Info', + userNum: 'User Number', + account: 'Account', + userName: 'User Name', + permission: 'Permission', + className: 'Class Name', + loginIp: 'Login address', + loginTime: 'Login Time', + status: 'Status', + userNameTip:'The account cannot start with a number and can contain uppercase and lowercase letters, numbers, and no less than 5 digits', + pwdTip:'The password should contain at least uppercase and lowercase letters, numbers, special symbols, and no less than 6 digits', + nickNameTip:'Nicknames can only contain letters, numbers, Chinese characters, and underscores, with no less than 2 digits', + emailTip:'Please enter the correct email address', + phoneTip:'Please enter the correct phone number', + resetPwd:'Reset Password', + start:'Enable', + stop:'Deactivate', + delSuss:'Successfully deleted', + sureTip:'Are you sure you want to {text} {userName} user?', + delSure:'Confirm deletion of data item with user ID {userId}?', + export:'Export', + import:'Import', + exportSure:'Are you sure to export the xlsx table file based on search criteria??', + phone:'Phone Number', + createTime:'Creation time', + userTop:'User profile', + sex:'User Gender', + email:'E-mail', + fromClass:'DEPARTMENT', + userWork:'User position', + userTip:'User Description', + loginPwd:'Login password', + updateSure:'Do you want to update existing data', + downloadObj:'Download Tpl', + } + }, }, }; diff --git a/src/i18n/locales/zh-CN.ts b/src/i18n/locales/zh-CN.ts index cda9213e..610bc342 100644 --- a/src/i18n/locales/zh-CN.ts +++ b/src/i18n/locales/zh-CN.ts @@ -9,7 +9,7 @@ export default { desc: '核心网管理平台', loading: '请稍等...', tipTitle: '提示', - msgSuccess: '成功 {msg}', + msgSuccess: '{msg}成功 ', errorFields: '请正确填写 {num} 处必填信息!', tablePaginationTotal: '总共 {total} 条', ok: '确定', @@ -18,11 +18,13 @@ export default { search: '搜索', reset: '重置', viewText: '查看详情', + view: '查看', addText: '新增', editText: '编辑', deleteText: '删除', downloadText: '下载', uploadText: '上传', + unableNull:'不能为空', moreText: '更多', searchBarText: '搜索栏', reloadText: '刷新', @@ -82,6 +84,8 @@ export default { // 页面 views: { index: { + normal:'正常', + abnormal:'异常', hostName: '主机名', osInfo: '操作系统信息', dbInfo: '数据库信息', @@ -114,12 +118,37 @@ export default { }, configManage: { neManage: { + addNe:'添加网元', + delSure:'确认删除网元名称为{msg}的数据项 ', + editNe:'修改网元', + exportSure:'确认导出网元名称为 {msg} 的配置信息', + exportTip:'导出成功,请到备份管理进行下载', + getInfo:'获取网元信息失败', + neType:'网元类型', + neTypePlease: '请输入网元类型', + neId:'网元内部标识', + neName:'网元名称', + neTypeTip:'填写创建的网元类型,如:SMF', + uid:'资源唯一标识', + uidTip:'请输入资源唯一标识', + ip:'IP地址', + mac:'网元物理地址', + macTip:'能够定位网元的物理地址(MAC)', + port:'端口', + pvflag:'网元虚拟化标识', + pnf:'物理网元', + vnf:'虚拟网元', + province:'网元服务省份', + vendorName:'厂商名称', + dn:'网络标识', reload: '重载配置', restart: '重启', + totalSure:'确认{oper}网元名称为 {msg} 的网元', stop: '停止', start: '启动', export: '导出', import: '导入', + fileForm:'文件来源', selectPlease:'请选择导入文件来源', server:'服务器文件', local:'本地文件', @@ -179,6 +208,7 @@ export default { }, neUser: { auth: { + authInfo:'鉴权信息', neTypePlease: '查询网元类型', neType: 'UDM网元类型', export: '导出', @@ -415,5 +445,43 @@ export default { down: '下行', } }, + system:{ + user: { + userInfo:'用户信息', + userNum: '用户编号', + account: '登录账号', + userName: '用户昵称', + permission: '用户权限', + className: '部门名称', + loginIp: '登录地址', + loginTime: '登录时间', + status: '用户状态', + userNameTip:'账号不能以数字开头,可包含大写小写字母,数字,且不少于5位', + pwdTip:'密码至少包含大小写字母、数字、特殊符号,且不少于6位', + nickNameTip:'昵称只能包含字母、数字、中文和下划线,且不少于2位', + emailTip:'请输入正确的邮箱地址', + phoneTip:'请输入正确的手机号码', + resetPwd:'重置密码', + start:'启用', + stop:'停用', + delSuss:'删除成功', + sureTip:'确定要{text} {userName} 用户吗?', + delSure:'确认删除用户编号为{userId}的数据项?', + export:'导出', + import:'导入', + exportSure:'确认根据搜索条件导出xlsx表格文件吗?', + phone:'手机号码', + createTime:'创建时间', + userTop:'用户头像', + sex:'用户性别', + email:'电子邮箱', + fromClass:'所属部门', + userWork:'用户岗位', + userTip:'用户说明', + loginPwd:'登入密码', + updateSure:'是否更新已经存在的数据', + downloadObj:'下载模板', + } + }, }, }; diff --git a/src/views/account/components/base-info.vue b/src/views/account/components/base-info.vue index 99aa31ed..00001bb7 100644 --- a/src/views/account/components/base-info.vue +++ b/src/views/account/components/base-info.vue @@ -40,19 +40,19 @@ function fnInitstateForm() { /**表单验证通过 */ function fnFinish() { Modal.confirm({ - title: '提示', + title: t('common.tipTitle'), content: `确认要提交修改用户基本信息吗?`, onOk() { stateForm.formClick = true; // 发送请求 - const hide = message.loading('请稍等...', 0); + const hide = message.loading(t('common.loading'), 0); const form = toRaw(stateForm.form); updateUserProfile(form).then(res => { hide(); stateForm.formClick = false; if (res.code === RESULT_CODE_SUCCESS) { Modal.success({ - title: '提示', + title: t('common.tipTitle'), content: `用户基本信息修改成功!`, okText: '我知道了', onOk() { @@ -87,11 +87,11 @@ function fnBeforeUpload(file: FileType) { /**上传变更 */ function fnUpload(up: UploadRequestOption) { Modal.confirm({ - title: '提示', + title: t('common.tipTitle'), content: `确认要上传/变更用户头像吗?`, onOk() { // 发送请求 - const hide = message.loading('请稍等...', 0); + const hide = message.loading(t('common.loading'), 0); upState.value = true; let formData = new FormData(); formData.append('file', up.file); diff --git a/src/views/account/components/reset-passwd.vue b/src/views/account/components/reset-passwd.vue index 9bbc2908..d7831d4e 100644 --- a/src/views/account/components/reset-passwd.vue +++ b/src/views/account/components/reset-passwd.vue @@ -41,17 +41,17 @@ function fnEqualToPassword( /**表单验证通过 */ function fnFinish() { Modal.confirm({ - title: '提示', + title: t('common.tipTitle'), content: `确认要提交修改密码吗?`, onOk() { state.formClick = true; // 发送请求 - const hide = message.loading('请稍等...', 0); + const hide = message.loading(t('common.loading'), 0); updateUserPwd(state.form.oldPassword, state.form.confirmPassword) .then(res => { if (res.code === RESULT_CODE_SUCCESS) { Modal.success({ - title: '提示', + title: t('common.tipTitle'), content: `恭喜您,${userName} 账号密码修改成功!`, okText: '重新登录', onOk() { diff --git a/src/views/configManage/backupManage/index.vue b/src/views/configManage/backupManage/index.vue index 027b989b..a1ad368d 100644 --- a/src/views/configManage/backupManage/index.vue +++ b/src/views/configManage/backupManage/index.vue @@ -151,7 +151,7 @@ function fnTableSize({ key }: MenuInfo) { /**信息文件下载 */ function fnDownloadFile(row: Record) { Modal.confirm({ - title: '提示', + title: t('common.tipTitle'), content: `确认下载记录编号为 【${row.id}】 的数据项文件?`, onOk() { const key = 'downloadNeBackup'; @@ -182,11 +182,11 @@ function fnDownloadFile(row: Record) { */ function fnRecordDelete(row: Record) { Modal.confirm({ - title: '提示', + title: t('common.tipTitle'), content: `确认删除记录编号为 【${row.id}】 的数据项?`, onOk() { const key = 'delNeBackup'; - message.loading({ content: '请稍等...', key }); + message.loading({ content: t('common.loading'), key }); delNeBackup(toRaw(row)).then(res => { if (res.code === RESULT_CODE_SUCCESS) { message.success({ diff --git a/src/views/configManage/configParam/index.vue b/src/views/configManage/configParam/index.vue index 64e40496..00e96ff9 100644 --- a/src/views/configManage/configParam/index.vue +++ b/src/views/configManage/configParam/index.vue @@ -353,7 +353,7 @@ function arrayDelete(row: Record) { const loc = from['index']['value']; Modal.confirm({ - title: '提示', + title: t('common.tipTitle'), content: `确认删除Index为 【${from['index']['value']}】 的数据项?`, onOk() { const hide = message.loading({ content: t('common.loading') }); @@ -701,7 +701,7 @@ function arrayChildDelete(row: Record) { const loc = `${tableState.arrayChildLoc}/${from['index']['value']}`; Modal.confirm({ - title: '提示', + title: t('common.tipTitle'), content: `确认删除${tableState.arrayChildTitle} Index 为 【${from['index']['value']}】 的数据项?`, onOk() { const hide = message.loading({ content: t('common.loading') }); diff --git a/src/views/configManage/configParamTree/index.vue b/src/views/configManage/configParamTree/index.vue index e6f5f0c6..cefd9d72 100644 --- a/src/views/configManage/configParamTree/index.vue +++ b/src/views/configManage/configParamTree/index.vue @@ -355,7 +355,7 @@ function arrayDelete(row: Record) { const loc = from['index']['value']; Modal.confirm({ - title: '提示', + title: t('common.tipTitle'), content: `确认删除Index为 【${from['index']['value']}】 的数据项?`, onOk() { const hide = message.loading({ content: t('common.loading') }); @@ -703,7 +703,7 @@ function arrayChildDelete(row: Record) { const loc = `${tableState.arrayChildLoc}/${from['index']['value']}`; Modal.confirm({ - title: '提示', + title: t('common.tipTitle'), content: `确认删除${tableState.arrayChildTitle} Index 为 【${from['index']['value']}】 的数据项?`, onOk() { const hide = message.loading({ content: t('common.loading') }); diff --git a/src/views/configManage/neManage/index.vue b/src/views/configManage/neManage/index.vue index 2cefa2b0..386907c4 100644 --- a/src/views/configManage/neManage/index.vue +++ b/src/views/configManage/neManage/index.vue @@ -84,75 +84,65 @@ let tableState: TabeStateType = reactive({ /**表格字段列 */ let tableColumns: ColumnsType = [ { - title: '网元类型', + title: t('views.configManage.neManage.neType'), dataIndex: 'neType', align: 'center', width: 3, }, { - title: '网元内部标识', + title: t('views.configManage.neManage.neId'), dataIndex: 'neId', align: 'center', width: 3, }, { - title: '资源唯一标识', + title: t('views.configManage.neManage.uid'), dataIndex: 'rmUid', align: 'center', width: 5, }, { - title: '网元名称', + title: t('views.configManage.neManage.neName'), dataIndex: 'neName', align: 'center', width: 5, }, { - title: 'IP地址', + title: t('views.configManage.neManage.ip'), dataIndex: 'ip', align: 'center', width: 5, }, { - title: '端口', + title: t('views.configManage.neManage.port'), dataIndex: 'port', align: 'center', width: 3, }, { - title: '网元虚拟化标识', + title: t('views.configManage.neManage.pvflag'), dataIndex: 'pvFlag', align: 'center', width: 5, }, { - title: '网元所在省份', + title: t('views.configManage.neManage.province'), dataIndex: 'province', align: 'center', width: 5, }, { - title: '厂商名称', + title: t('views.configManage.neManage.vendorName'), dataIndex: 'vendorName', align: 'center', width: 5, }, { - title: '网络标识', + title: t('views.configManage.neManage.dn'), dataIndex: 'dn', align: 'center', width: 5, }, - { - title: '修改时间', - dataIndex: 'updateTime', - align: 'center', - customRender(opt) { - if (!opt.value) return ''; - return parseDateToStr(opt.value); - }, - width: 5, - }, { title: t('common.operate'), key: 'id', @@ -247,13 +237,13 @@ let modalState: ModalStateType = reactive({ const modalStateFrom = Form.useForm( modalState.from, reactive({ - neType: [{ required: true, message: '网元类型不能为空' }], - neId: [{ required: true, message: '网元内部标识不能为空' }], - rmUid: [{ required: true, message: '资源唯一标识不能为空' }], - ip: [{ required: true, message: 'IP地址不能为空' }], - port: [{ required: true, message: '端口不能为空' }], - pvFlag: [{ required: true, message: '请选择网元虚拟化标识' }], - neName: [{ required: true, message: '网元名称不能为空' }], + neType: [{ required: true, message: t("views.configManage.neManage.neType")+ t("common.unableNull")}], + neId: [{ required: true, message: t("views.configManage.neManage.neId")+ t("common.unableNull") }], + rmUid: [{ required: true, message: t("views.configManage.neManage.uid")+ t("common.unableNull") }], + ip: [{ required: true, message: t("views.configManage.neManage.ip")+ t("common.unableNull") }], + port: [{ required: true, message: t("views.configManage.neManage.port")+ t("common.unableNull") }], + pvFlag: [{ required: true, message: t("views.configManage.neManage.pvflag")+ t("common.unableNull")}], + neName: [{ required: true, message: t("views.configManage.neManage.neName")+ t("common.unableNull") }], }) ); @@ -289,7 +279,7 @@ const importStateFrom = Form.useForm( function fnModalVisibleByEdit(row?: Record) { if (!row) { modalStateFrom.resetFields(); - modalState.title = '添加网元'; + modalState.title = t('views.configManage.neManage.addNe'); modalState.visibleByEdit = true; } else { if (modalState.confirmLoading) return; @@ -300,10 +290,10 @@ function fnModalVisibleByEdit(row?: Record) { hide(); if (res.code === RESULT_CODE_SUCCESS) { modalState.from = Object.assign(modalState.from, res.data); - modalState.title = '修改网元'; + modalState.title = t('views.configManage.neManage.editNe'); modalState.visibleByEdit = true; } else { - message.error(`获取网元信息失败`, 2); + message.error(t('views.configManage.neManage.getInfo'), 2); } }); } @@ -422,15 +412,15 @@ function fnModalCancel() { */ function fnRecordDelete(row: Record) { Modal.confirm({ - title: '提示', - content: `确认删除网元编号为 【${row.neName}】 的数据项?`, + title: t('common.tipTitle'), + content: t('views.configManage.neManage.delSure', { msg: row.neName }), onOk() { const key = 'delNotice'; - message.loading({ content: '请稍等...', key }); + message.loading({ content: t('common.loading'), key }); delNeInfo(row).then(res => { if (res.code === RESULT_CODE_SUCCESS) { message.success({ - content: `删除成功`, + content: t('common.msgSuccess', { msg: t('common.deleteText ') }), key, duration: 2, }); @@ -455,15 +445,15 @@ function fnRecordDelete(row: Record) { */ function fnRecordExport(row: Record) { Modal.confirm({ - title: '提示', - content: `确认导出网元编号为 【${row.neName}】 的配置信息?`, + title: t('common.tipTitle'), + content: t('views.configManage.neManage.exportSure', { msg: row.neName }), onOk() { const key = 'exportSet'; - message.loading({ content: '请稍等...', key }); + message.loading({ content: t('common.loading'), key }); exportSet(row).then(res => { if (res.code === RESULT_CODE_SUCCESS) { message.success({ - content: `导出成功,请到备份管理进行下载`, + content: t('views.configManage.neManage.exportTip'), key, duration: 2, }); @@ -485,15 +475,20 @@ function fnRecordExport(row: Record) { */ function fnRecordRestart(row: Record) { Modal.confirm({ - title: '提示', - content: `确认重启网元编号为 【${row.neName}】 的网元?`, + title: t('common.tipTitle'), + content: t('views.configManage.neManage.totalSure', { + msg: row.neName, + oper: t('views.configManage.neManage.restart'), + }), onOk() { const key = 'restartNf'; - message.loading({ content: '请稍等...', key }); + message.loading({ content: t('common.loading'), key }); restartNf(row).then(res => { if (res.code === RESULT_CODE_SUCCESS) { message.success({ - content: `重启执行成功`, + content: t('common.msgSuccess', { + msg: t('views.configManage.neManage.restart'), + }), key, duration: 2, }); @@ -515,15 +510,20 @@ function fnRecordRestart(row: Record) { */ function fnRecordStart(row: Record) { Modal.confirm({ - title: '提示', - content: `确认启动网元编号为 【${row.neName}】 的网元?`, + title: t('common.tipTitle'), + content: t('views.configManage.neManage.totalSure', { + msg: row.neName, + oper: t('views.configManage.neManage.start'), + }), onOk() { const key = 'startNf'; - message.loading({ content: '请稍等...', key }); + message.loading({ content: t('common.loading'), key }); startNf(row).then(res => { if (res.code === RESULT_CODE_SUCCESS) { message.success({ - content: `启动执行成功`, + content: t('common.msgSuccess', { + msg: t('views.configManage.neManage.start'), + }), key, duration: 2, }); @@ -545,15 +545,20 @@ function fnRecordStart(row: Record) { */ function fnRecordStop(row: Record) { Modal.confirm({ - title: '提示', - content: `确认停止网元编号为 【${row.neName}】 的网元?`, + title: t('common.tipTitle'), + content: t('views.configManage.neManage.totalSure', { + msg: row.neName, + oper: t('views.configManage.neManage.stop'), + }), onOk() { const key = 'stopNf'; - message.loading({ content: '请稍等...', key }); + message.loading({ content: t('common.loading'), key }); stopNf(row).then(res => { if (res.code === RESULT_CODE_SUCCESS) { message.success({ - content: `停止执行成功`, + content: t('common.msgSuccess', { + msg: t('views.configManage.neManage.stop'), + }), key, duration: 2, }); @@ -572,15 +577,20 @@ function fnRecordStop(row: Record) { /**网元重新加载 */ function fnNeReload(row: Record) { Modal.confirm({ - title: '提示', - content: `确认重新载入编号为 【${row.neName}】 的网元配置?`, + title: t('common.tipTitle'), + content: t('views.configManage.neManage.totalSure', { + msg: row.neName, + oper: t('views.configManage.neManage.reload'), + }), onOk() { const key = 'stopNf'; - message.loading({ content: '请稍等...', key }); + message.loading({ content: t('common.loading'), key }); updateNeConfigReload(row.neType, row.neId).then(res => { if (res.code === RESULT_CODE_SUCCESS) { message.success({ - content: `网元重新加载完成`, + content: t('common.msgSuccess', { + msg: t('views.configManage.neManage.reload'), + }), key, duration: 2, }); @@ -627,7 +637,7 @@ function fnRecordMore(type: string | number, row: Record) { if (type === 'import') { modalState.importFrom = Object.assign(modalState.importFrom, row); - modalState.title = '导入'; + modalState.title = t('views.configManage.neManage.import'); modalState.visibleByImport = true; } } @@ -706,11 +716,14 @@ onMounted(() => { - + @@ -797,7 +810,7 @@ onMounted(() => { :data-source="tableState.data" :size="tableState.size" :pagination="tablePagination" - :scroll="{ x: 2000, y: 400 }" + :scroll="{ x: 2000, y: 480 }" >