diff --git a/src/i18n/locales/en-US.ts b/src/i18n/locales/en-US.ts index aa745d73..0b925980 100644 --- a/src/i18n/locales/en-US.ts +++ b/src/i18n/locales/en-US.ts @@ -404,6 +404,30 @@ export default { neId: 'Internal identification', neIdPlease: 'Please select the corresponding network element', }, + configParam:{ + dataNull:'No configuration item data yet', + editSuss:'Modification successful', + editFail:'Edit failed', + Unable:'Illegal operation of attribute value', + delSure:'Confirm to delete the data item with Index [{value}]?', + addSuss:'Add successfully', + addFail:'Add failed', + delArraySure:'Confirm to delete the data item with {arrayChildTitle} Index as [{value}]?', + parUnable:'The parameter value is not within the reasonable range', + ipv4Tip:'Not a legal IPV4 address', + ipv6Tip:'Not a legal IPV6 address', + enumTip:'Not a reasonable enumeration value', + boolTip:'Not a reasonable Boolean value', + default:'The input value is of unknown type', + reloadSuss:'Network element reloading completed', + reloadFail:'Network element reloading failed', + neNUll:'No network element list data yet', + reload:'Reload', + post:'Submit', + editSure:'Are you sure you want to update this attribute value? ', + arraryEdit:'Are you sure to submit the record whose updated Index is [{value}]? ', + addSure:'Are you sure to submit the new record of Index: [{value}]? ' + } }, neUser: { auth: { @@ -1073,14 +1097,14 @@ export default { email:'Mail', }, post:{ - positionInfo:'Position information', - positionId:'Position number', - positionCode:'Position code', - positionName:'Position name', - positionSort:'Position sorting', - positionStatus:'Position status', - positionMark:'Position description', - createTime:'Creation time', + positionInfo:' Position Information', + positionId:'Position Number', + positionCode:'Position Code', + positionName:'Position Name', + positionSort:'Position Sorting', + positionStatus:'Position Status', + positionMark:'Position Description', + createTime:'Creation Time', codeTip:'Please enter the position code correctly', nameTip:'Please enter the position name correctly', delSure:'Confirm to delete the data item with post number [{postId}]?', @@ -1126,8 +1150,57 @@ export default { unlock:'Unlock', unlockSuss:'{userName} unlocked successfully', unlockSure:'Confirm to unlock user [{username}] data item?', - } + }, }, + menu:{ + menuInfo:' Menu Information', + menuName:'Menu Name', + menuId:'Menu Number', + menuSort:'Menu Sort', + menuTitle:'Menu Icon', + perId:'Permission ID', + formLoc:'Component Path', + status:'Display Status', + menuStatus:'Menu Status', + menuType:'Menu Type', + createTime:'Creation Time', + highMenu:'Superior Menu', + routerAdrr:'Routing Address', + delSure:'Confirm to delete the data item with menu number [{menuId}]?', + addSon:'Add Submenu', + hidden:'Hidden', + show:'Show', + root:'Directory', + menu:'Menu', + button:'Button', + yes:'Yes', + no:'No', + cache:'Cache', + noCache:'Not cache', + pageCache:'Page cache', + local:'Internal Address', + mark:'Menu Description', + pathTip:`The accessed routing address, such as: user, /auth 1. If the network address requires internal access, start with http(s):// Menu behavior (root node): The current window opens the menu behavior, (non-root node) :Embedded window. 2. If the network address requires external access, set the internal address option to No. Menu behavior: Open a new tab 3. If the embedded subpage needs to hide the page, set the display status option to Hide address splicing to embed routing. address`, + sonPage:'Subpage address', + componentTip:' The component path accessed by views in the page component directory, such as: system/user/index Note: The routing address without the .vue file suffix is the network address and can be filled in as a link', + perms:`Permission identification example: monitor:server:query Permission identification is used in the back-end controller, such as: @PreAuthorize({ hasPermissions: ['monitor:server:query'] }) Permission identification is used in the front-end Vue page, such as: v-perms:has="['monitor:server:query']"` + }, + dict:{ + dictInfo:'Dictionary Type Information', + dictId:'Dictionary Number', + dictName:'Dictionary Name', + dictType:'Dictionary Type', + dictSatus:'Dictionary Status', + createTime:'Creation Time', + realDictName:'Please enter the dictionary name correctly', + realDictType:'Please enter the dictionary type correctly', + delSure:'Confirm to delete the data item with parameter number [{dictId}]?', + reloadSure:'Are you sure you want to refresh the dictionary data cache?', + reloadSuss:'Refresh cache successfully', + dictData:'Dictionary Data', + reload:'Refresh Cache', + mark:'Dictionary Description', + } }, mmlManage: { operationtitle: "Interface Settings", diff --git a/src/i18n/locales/zh-CN.ts b/src/i18n/locales/zh-CN.ts index bf44e90a..6cad890e 100644 --- a/src/i18n/locales/zh-CN.ts +++ b/src/i18n/locales/zh-CN.ts @@ -404,6 +404,30 @@ export default { neId: '网元内部标识', neIdPlease: '请选择对应网元', }, + configParam:{ + dataNull:'暂无配置项数据', + editSuss:'修改成功', + editFail:'修改失败', + unable:'非法操作属性值', + delSure:'确认删除Index为 【{value}】 的数据项?', + addSuss:'新增成功', + addFail:'新增失败', + delArraySure:'确认删除{arrayChildTitle} Index 为 【{value}】 的数据项?', + parUnable:'参数值不在合理范围', + ipv4Tip:'不是合法的IPV4地址', + ipv6Tip:'不是合法的IPV6地址', + enumTip:'不是合理的枚举值', + boolTip:'不是合理的布尔类型的值', + default:'输入值是未知类型', + reloadSuss:'网元重新加载完成', + reloadFail:'网元重新加载失败', + neNUll:'暂无网元列表数据', + reload:'重载', + post:'提交', + editSure:'确认更新该属性值吗?', + arraryEdit:'确认提交更新 Index 为 【{value}】 的记录吗?', + addSure:'确认提交新增 Index :【{value}】 的记录吗?' + } }, neUser: { auth: { @@ -1126,8 +1150,57 @@ export default { unlock:'解锁', unlockSuss:'{userName} 解锁成功', unlockSure:'确认解锁用户 【{username}】 数据项?', - } + }, }, + menu:{ + menuInfo:'菜单信息', + menuName:'菜单名称', + menuId:'菜单编号', + menuSort:'菜单排序', + menuTitle:'菜单图标', + perId:'权限标识', + formLoc:'组件路径', + status:'显示状态', + menuStatus:'菜单状态', + menuType:'菜单类型', + createTime:'创建时间', + highMenu:'上级菜单', + routerAdrr:'路由地址', + delSure:'确认删除菜单编号为 【{menuId}】 的数据项?', + addSon:'新增子菜单', + hidden:'隐藏', + show:'显示', + root:'目录', + menu:'菜单', + button:'按钮', + yes:'是', + no:'否', + cache:'缓存', + noCache:'不缓存', + pageCache:'页面缓存', + local:'内部地址', + mark:'菜单说明', + pathTip:`访问的路由地址,如:user、/auth 1. 如网络地址需内部访问 则以 http(s):// 开头菜单行为(根节点):当前窗口打开 菜单行为,(非根节点):内嵌窗口.2. 如网络地址需外部访问则将内部地址选项设为否菜单行为:打开新标签3. 如内嵌子页面需要隐藏页面则将显示状态选项设为隐藏地址拼接以内嵌路由地址`, + sonPage:'子页面地址', + componentTip:' 页面组件目录 views 访问的组件路径,如:system/user/index 注意:不带 .vue 文件后缀路由地址是网络地址可填入链接', + perms:`权限标识示例:monitor:server:query 后端控制器中使用权限标识,如:@PreAuthorize({ hasPermissions: ['monitor:server:query'] }) 前端vue页面中使用权限标识,如:v-perms:has="['monitor:server:query']"` + }, + dict:{ + dictInfo:'字典类型信息', + dictId:'字典编号', + dictName:'字典名称', + dictType:'字典类型', + dictSatus:'字典状态', + createTime:'创建时间', + realDictName:'请正确输入字典名称', + realDictType:'请正确输入字典类型', + delSure:'确认删除参数编号为 【{dictId}】 的数据项?', + reloadSure:'确定要刷新字典数据缓存吗?', + reloadSuss:'刷新缓存成功', + dictData:'字典数据', + reload:'刷新缓存', + mark:'字典说明', + } }, mmlManage: { cmdTitle: "命令导航", @@ -1158,7 +1231,7 @@ export default { ipadd: "侦听IP地址", ipaddPlease: "请输入侦听IP地址", port: "侦听端口", - portPlease: "请输入远程端口,0~65535", + portPlease: "请输入远程端口,0~65535", okChange: "接口设置保存成功", noChange: "接口设置无变更", }, diff --git a/src/views/configManage/configParam/index.vue b/src/views/configManage/configParam/index.vue index e47cb371..2a1738f6 100644 --- a/src/views/configManage/configParam/index.vue +++ b/src/views/configManage/configParam/index.vue @@ -75,7 +75,7 @@ function fnTabActiveTopTag(key: string | number) { } } else { message.warning({ - content: `暂无配置项数据`, + content: t('views.configManage.configParam.dataNull'), duration: 3, }); } @@ -94,7 +94,7 @@ function fnGetParamConfigTopTab() { const neType = neTypeSelect.value[0]; if (!neType) { message.warning({ - content: `请选择网元类型`, + content: t('views.configManage.softwareManage.neTypePlease'), duration: 3, }); return; @@ -110,7 +110,7 @@ function fnGetParamConfigTopTab() { } } else { message.warning({ - content: `暂无配置项数据`, + content: t('views.configManage.configParam.dataNull'), duration: 3, }); } @@ -226,7 +226,9 @@ function listEditOk() { .then(res => { if (res.code === RESULT_CODE_SUCCESS) { message.success({ - content: `${from['display']} 属性值修改成功`, + content: + `${from['display']} ` + + t('views.configManage.configParam.editSuss'), duration: 3, }); // 改变表格数据 @@ -238,7 +240,7 @@ function listEditOk() { } } else { message.warning({ - content: `属性值修改失败`, + content: t('views.configManage.configParam.editFail'), duration: 3, }); } @@ -246,7 +248,7 @@ function listEditOk() { .catch(err => { console.error(err); message.error({ - content: `非法操作属性值`, + content: t('views.configManage.configParam.unable'), duration: 3, }); }) @@ -315,7 +317,9 @@ function arrayEditOk() { .then(res => { if (res.code === RESULT_CODE_SUCCESS) { message.success({ - content: `Index 为 ${from['index']['value']} 记录修改成功`, + content: + `Index : ${from['index']['value']} ` + + t('views.configManage.configParam.editSuss'), duration: 3, }); // 改变表格数据 @@ -328,7 +332,7 @@ function arrayEditOk() { } } else { message.warning({ - content: `记录修改失败`, + content: t('views.configManage.configParam.editFail'), duration: 3, }); } @@ -336,7 +340,7 @@ function arrayEditOk() { .catch(err => { console.error(err); message.error({ - content: `非法操作记录参数`, + content: t('views.configManage.configParam.unable'), duration: 3, }); }) @@ -354,7 +358,9 @@ function arrayDelete(row: Record) { Modal.confirm({ title: t('common.tipTitle'), - content: `确认删除Index为 【${from['index']['value']}】 的数据项?`, + content: t('views.configManage.configParam.delSure', { + value: from['index']['value'], + }), onOk() { const hide = message.loading({ content: t('common.loading') }); delParamConfigInfo({ @@ -366,7 +372,7 @@ function arrayDelete(row: Record) { .then(res => { if (res.code === RESULT_CODE_SUCCESS) { message.success({ - content: `删除成功`, + content: t('common.msgSuccess', { msg: t('common.deleteText') }), duration: 2, }); } else { @@ -510,13 +516,15 @@ function arrayAddOk() { .then(res => { if (res.code === RESULT_CODE_SUCCESS) { message.success({ - content: `Index 为 ${from['index']['value']} 记录新增成功`, + content: + `Index : ${from['index']['value']} ` + + t('views.configManage.configParam.addSuss'), duration: 3, }); } else { tableState.arrayData.pop(); message.warning({ - content: `新增失败`, + content: t('views.configManage.configParam.addFail'), duration: 3, }); } @@ -524,7 +532,7 @@ function arrayAddOk() { .catch(err => { console.error(err); message.error({ - content: `非法操作记录参数`, + content: t('views.configManage.configParam.unable'), duration: 3, }); }) @@ -670,13 +678,15 @@ function arrayChildEditOk() { .then(res => { if (res.code === RESULT_CODE_SUCCESS) { message.success({ - content: `Index 为 ${from['index']['value']} 记录修改成功`, + content: + `Index : ${from['index']['value']} ` + + t('views.configManage.configParam.editSuss'), duration: 3, }); fnTabActiveTopTag('#'); } else { message.warning({ - content: `记录修改失败`, + content: t('views.configManage.configParam.editFail'), duration: 3, }); } @@ -684,7 +694,7 @@ function arrayChildEditOk() { .catch(err => { console.error(err); message.error({ - content: `非法操作记录参数`, + content: t('views.configManage.configParam.unable'), duration: 3, }); }) @@ -702,7 +712,10 @@ function arrayChildDelete(row: Record) { Modal.confirm({ title: t('common.tipTitle'), - content: `确认删除${tableState.arrayChildTitle} Index 为 【${from['index']['value']}】 的数据项?`, + content: t('views.configManage.configParam.unable', { + arrayChildTitle: tableState.arrayChildTitle, + value: from['index']['value'], + }), onOk() { const hide = message.loading({ content: t('common.loading') }); delParamConfigInfo({ @@ -714,7 +727,7 @@ function arrayChildDelete(row: Record) { .then(res => { if (res.code === RESULT_CODE_SUCCESS) { message.success({ - content: `删除成功`, + content: t('common.msgSuccess', { msg: t('common.deleteText') }), duration: 2, }); } else { @@ -858,14 +871,16 @@ function arrayChildAddOk() { .then(res => { if (res.code === RESULT_CODE_SUCCESS) { message.success({ - content: `Index 为 ${from['index']['value']} 记录新增成功`, + content: + `Index :${from['index']['value']} ` + + t('views.configManage.configParam.addSuss'), duration: 3, }); fnTabActiveTopTag('#'); } else { tableState.arrayChildData.pop(); message.warning({ - content: `新增失败`, + content: t('views.configManage.configParam.addFail'), duration: 3, }); } @@ -873,7 +888,7 @@ function arrayChildAddOk() { .catch(err => { console.error(err); message.error({ - content: `非法操作记录参数`, + content: t('views.configManage.configParam.unable'), duration: 3, }); }) @@ -910,18 +925,29 @@ function ruleVerification(row: Record): (string | boolean)[] { const maxInt = parseInt(filterArr[1]); const valueInt = parseInt(value); if (valueInt < minInt || valueInt > maxInt) { - return [false, `${display} 参数值不在合理范围 ${filter}`]; + return [ + false, + `${display} ${t( + 'views.configManage.configParam.parUnable' + )} ${filter}`, + ]; } } break; case 'ipv4': if (!regExpIPv4.test(value)) { - return [false, `${display} 不是合法的IPV4地址`]; + return [ + false, + `${display} ${t('views.configManage.configParam.ipv4Tip')}`, + ]; } break; case 'ipv6': if (!regExpIPv6.test(value)) { - return [false, `${display} 不是合法的IPV6地址`]; + return [ + false, + `${display} ${t('views.configManage.configParam.ipv6Tip')}`, + ]; } break; case 'enum': @@ -934,7 +960,10 @@ function ruleVerification(row: Record): (string | boolean)[] { } if (!Object.keys(filterJson).includes(`${value}`)) { - return [false, `${display} 不是合理的枚举值`]; + return [ + false, + `${display} ${t('views.configManage.configParam.enumTip')}`, + ]; } } break; @@ -948,7 +977,10 @@ function ruleVerification(row: Record): (string | boolean)[] { } if (!Object.values(filterJson).includes(`${value}`)) { - return [false, `${display} 不是合理的布尔类型的值`]; + return [ + false, + `${display} ${t('views.configManage.configParam.boolTip')}`, + ]; } } break; @@ -960,7 +992,10 @@ function ruleVerification(row: Record): (string | boolean)[] { '^\\S{' + filterArr[0] + ',' + filterArr[1] + '}$' ); if (!rule.test(value)) { - return [false, `${display} 参数值不合理`]; + return [ + false, + `${display} ${t('views.configManage.configParam.parUnable')}`, + ]; } } catch (error) { console.error(error); @@ -973,7 +1008,10 @@ function ruleVerification(row: Record): (string | boolean)[] { try { let regex = new RegExp(filter); if (!regex.test(value)) { - return [false, `${display} 参数值不合理`]; + return [ + false, + `${display} ${t('views.configManage.configParam.parUnable')}`, + ]; } } catch (error) { console.error(error); @@ -982,7 +1020,10 @@ function ruleVerification(row: Record): (string | boolean)[] { break; default: - return [false, `${display} 输入值是未知类型`]; + return [ + false, + `${display} ${t('views.configManage.configParam.default')}`, + ]; } return result; } @@ -1000,12 +1041,12 @@ function fnNeReload() { .then(res => { if (res.code === RESULT_CODE_SUCCESS) { message.success({ - content: `网元重新加载完成`, + content: t('views.configManage.configParam.reloadSuss'), duration: 3, }); } else { message.error({ - content: `网元重新加载失败`, + content: t('views.configManage.configParam.reloadFail'), duration: 3, }); } @@ -1038,7 +1079,7 @@ onMounted(() => { } } else { message.warning({ - content: `暂无网元列表数据`, + content: t('views.configManage.configParam.neNUll'), duration: 2, }); } @@ -1056,12 +1097,14 @@ onMounted(() => { - + @@ -1089,7 +1132,6 @@ onMounted(() => { { > - 重新载入 + {{ t('views.configManage.configParam.reload') }} @@ -1188,7 +1230,7 @@ onMounted(() => { @@ -1253,14 +1295,18 @@ onMounted(() => { " > - + @@ -1268,9 +1314,11 @@ onMounted(() => { @@ -1280,7 +1328,7 @@ onMounted(() => { - + { @click.prevent="arrayChildExpand(record['index'], text)" v-else-if="Array.isArray(text.array)" > - 详情 + {{ t('common.viewText') }} +
{{ `${text.value}` }} @@ -1416,15 +1465,17 @@ onMounted(() => { " > - + @@ -1432,9 +1483,11 @@ onMounted(() => { @@ -1447,7 +1500,7 @@ onMounted(() => { - + { " v-else-if="Array.isArray(text.array)" > - 详情 + {{ t('common.viewText') }}
{{ `${text.value}` }} diff --git a/src/views/index.vue b/src/views/index.vue index 59c9c468..d4535cdf 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -468,7 +468,7 @@ onBeforeUnmount(() => { nfInfo.obj }} @@ -582,31 +603,31 @@ onMounted(() => { @@ -650,7 +677,7 @@ onMounted(() => { @@ -533,41 +565,41 @@ onMounted(() => { @@ -607,7 +645,11 @@ onMounted(() => {