feat: 网元信息表单多语言翻译
This commit is contained in:
@@ -172,6 +172,9 @@ export default {
|
||||
codeHit: 'Verification code',
|
||||
codeText: 'Obtain verification code',
|
||||
codeSmsSend: 'Successfully sent, please pay attention to checking the SMS',
|
||||
ipPlease: 'Please enter a valid IP address',
|
||||
ipv4Reg: 'Not a valid IPv4 address',
|
||||
ipv6Reg: 'Not a valid IPv6 address',
|
||||
},
|
||||
|
||||
// 布局
|
||||
@@ -586,9 +589,13 @@ export default {
|
||||
neType: 'NE Type',
|
||||
neTypePlease: "Please select network element type",
|
||||
neId: 'NE ID',
|
||||
neIdPlease: 'Please enter the network element identification',
|
||||
rmUid: 'Resource Unique ID',
|
||||
rmUidPlease: 'Please enter a resource unique ID',
|
||||
neName: 'NE Name',
|
||||
neNamePlease: 'Please enter the name of the network element',
|
||||
ipAddr: 'IP Addr',
|
||||
ipAddrPlease: 'Please enter the IP address of the network element',
|
||||
port: 'Port',
|
||||
serialNum: 'Serial Number',
|
||||
expiryDate: 'Expiry Date',
|
||||
@@ -618,6 +625,8 @@ export default {
|
||||
hostConfig: "Connection Configuration",
|
||||
rmUID: "Data resource location identifiers are used for data tagging such as logging, alarm reporting, etc.",
|
||||
ipAddr: "Support IPV4/IPV6, synchronize the change of the configuration address of the following configuration",
|
||||
addTitle: 'New network element information',
|
||||
editTitle: 'Editing network element information',
|
||||
delTip: 'Confirm deletion of network element information data items?',
|
||||
oam: {
|
||||
title: 'OAM Configuration',
|
||||
@@ -628,6 +637,7 @@ export default {
|
||||
snmpPort: 'Port',
|
||||
kpiEnable: 'Report',
|
||||
kpiTimer: 'Reporting Cycle',
|
||||
kpiTimerPlease: 'Please enter the reporting period (in seconds)',
|
||||
},
|
||||
},
|
||||
neHost: {
|
||||
@@ -654,6 +664,7 @@ export default {
|
||||
editTitle: "Edit Host Connection",
|
||||
test: "Test Connection To Host",
|
||||
testOk: "Test Connection Successful",
|
||||
authorizedRSA: "Do I have to configure authorization for a password-free direct connection?",
|
||||
},
|
||||
neHostCmd: {
|
||||
cmdType: "Type",
|
||||
|
||||
@@ -172,6 +172,9 @@ export default {
|
||||
codeHit: '验证码',
|
||||
codeText: '获取验证码',
|
||||
codeSmsSend: '发送成功,请注意查看短信',
|
||||
ipPlease: '请输入有效的IP地址',
|
||||
ipv4Reg: '不是有效IPv4地址',
|
||||
ipv6Reg: '不是有效IPv6地址',
|
||||
},
|
||||
|
||||
// 布局
|
||||
@@ -585,10 +588,14 @@ export default {
|
||||
common: {
|
||||
neType: '网元类型',
|
||||
neTypePlease: "请选择网元类型",
|
||||
neId: '网元内部标识',
|
||||
neId: '网元标识',
|
||||
neIdPlease: '请输入网元标识',
|
||||
rmUid: '资源唯一标识',
|
||||
rmUidPlease: '请输入资源唯一标识',
|
||||
neName: '网元名称',
|
||||
neNamePlease: '请输入网元名称',
|
||||
ipAddr: '网元服务IP',
|
||||
ipAddrPlease: '请输入网元IP地址',
|
||||
port: '网元服务端口',
|
||||
serialNum: '序列号',
|
||||
expiryDate: '许可证到期日期',
|
||||
@@ -618,6 +625,8 @@ export default {
|
||||
hostConfig: "终端连接配置",
|
||||
rmUID: "数据资源定位标识符用于日志、告警上报等数据标记",
|
||||
ipAddr: "支持IPV4/IPV6,同步变更下方配置的配置地址",
|
||||
addTitle: '新增网元信息',
|
||||
editTitle: '编辑网元信息',
|
||||
delTip: '确认删除网元信息数据项吗?',
|
||||
oam: {
|
||||
title: 'OAM配置',
|
||||
@@ -628,6 +637,7 @@ export default {
|
||||
snmpPort: '端口',
|
||||
kpiEnable: '上报',
|
||||
kpiTimer: '上报周期',
|
||||
kpiTimerPlease: '请输入上报周期(单位秒)',
|
||||
},
|
||||
},
|
||||
neHost: {
|
||||
@@ -654,6 +664,7 @@ export default {
|
||||
editTitle: "编辑主机连接",
|
||||
test: "测试连接",
|
||||
testOk: "测试连接成功",
|
||||
authorizedRSA: "是否要配置授权免密直连?",
|
||||
},
|
||||
neHostCmd: {
|
||||
cmdType: "命令类型",
|
||||
|
||||
@@ -69,22 +69,16 @@ function fnHostAuthorized(row: Record<string, any>) {
|
||||
if (modalState.confirmLoading) return;
|
||||
|
||||
Modal.confirm({
|
||||
title: '提示',
|
||||
content: '是否要配置免密直连?',
|
||||
title: t('common.tipTitle'),
|
||||
content: t('views.ne.neHost.authorizedRSA'),
|
||||
onOk: () => {
|
||||
modalState.confirmLoading = true;
|
||||
neHostAuthorizedRSA(row).then(res => {
|
||||
modalState.confirmLoading = false;
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
message.success({
|
||||
content: `操作成功`,
|
||||
duration: 2,
|
||||
});
|
||||
message.success(t('common.operateOk'), 3);
|
||||
} else {
|
||||
message.error({
|
||||
content: `操作失败`,
|
||||
duration: 2,
|
||||
});
|
||||
message.error(t('common.operateErr'), 3);
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -161,19 +155,19 @@ const modalStateFrom = Form.useForm(
|
||||
neType: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入网元类型',
|
||||
message: t('views.ne.common.neTypePlease'),
|
||||
},
|
||||
],
|
||||
neId: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入网元标识',
|
||||
message: t('views.ne.common.neIdPlease'),
|
||||
},
|
||||
],
|
||||
rmUid: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入资源唯一标识',
|
||||
message: t('views.ne.common.rmUidPlease'),
|
||||
},
|
||||
],
|
||||
ip: [
|
||||
@@ -185,7 +179,7 @@ const modalStateFrom = Form.useForm(
|
||||
neName: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入网元名称',
|
||||
message: t('views.ne.common.neNamePlease'),
|
||||
},
|
||||
],
|
||||
})
|
||||
@@ -198,17 +192,17 @@ function modalStateFromEqualIPV4AndIPV6(
|
||||
callback: (error?: string) => void
|
||||
) {
|
||||
if (!value) {
|
||||
return Promise.reject('请输入网元IP地址');
|
||||
return Promise.reject(t('views.ne.common.ipAddrPlease'));
|
||||
}
|
||||
|
||||
if (value.indexOf('.') === -1 && value.indexOf(':') === -1) {
|
||||
return Promise.reject('请输入有效的IP地址');
|
||||
return Promise.reject(t('valid.ipPlease'));
|
||||
}
|
||||
if (value.indexOf('.') !== -1 && !regExpIPv4.test(value)) {
|
||||
return Promise.reject('不是有效IPv4地址');
|
||||
return Promise.reject(t('valid.ipv4Reg'));
|
||||
}
|
||||
if (value.indexOf(':') !== -1 && !regExpIPv6.test(value)) {
|
||||
return Promise.reject('不是有效IPv6地址');
|
||||
return Promise.reject(t('valid.ipv6Reg'));
|
||||
}
|
||||
return Promise.resolve();
|
||||
}
|
||||
@@ -220,7 +214,7 @@ function modalStateFromEqualIPV4AndIPV6(
|
||||
function fnModalVisibleByEdit(editId: string) {
|
||||
if (!editId) {
|
||||
modalStateFrom.resetFields();
|
||||
modalState.title = t('views.configManage.neManage.addNe');
|
||||
modalState.title = t('views.ne.neInfo.addTitle');
|
||||
modalState.visibleByEdit = true;
|
||||
} else {
|
||||
if (modalState.confirmLoading) return;
|
||||
@@ -231,7 +225,7 @@ function fnModalVisibleByEdit(editId: string) {
|
||||
hide();
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
Object.assign(modalState.from, res.data);
|
||||
modalState.title = '编辑网元信息';
|
||||
modalState.title = t('views.ne.neInfo.editTitle');
|
||||
modalState.visibleByEdit = true;
|
||||
} else {
|
||||
message.error(t('common.getInfoFail'), 2);
|
||||
@@ -255,10 +249,7 @@ function fnModalOk() {
|
||||
result
|
||||
.then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
message.success({
|
||||
content: '操作成功',
|
||||
duration: 3,
|
||||
});
|
||||
message.success(t('common.operateOk'), 3);
|
||||
// 刷新缓存的网元信息
|
||||
useNeInfoStore().fnRefreshNelist();
|
||||
emit('ok');
|
||||
|
||||
@@ -59,7 +59,7 @@ const modalStateFrom = Form.useForm(
|
||||
kpiTimer: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入KPI上报周期(单位秒)',
|
||||
message: t('views.ne.neInfo.oam.kpiTimerPlease'),
|
||||
},
|
||||
],
|
||||
})
|
||||
@@ -115,10 +115,7 @@ function fnModalOk() {
|
||||
})
|
||||
.then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
message.success({
|
||||
content: '操作成功',
|
||||
duration: 3,
|
||||
});
|
||||
message.success(t('common.operateOk'), 3);
|
||||
emit('ok');
|
||||
fnModalCancel();
|
||||
} else {
|
||||
|
||||
@@ -127,17 +127,17 @@ function modalStateFromEqualIPV4AndIPV6(
|
||||
callback: (error?: string) => void
|
||||
) {
|
||||
if (!value) {
|
||||
return Promise.reject('请输入网元IP地址');
|
||||
return Promise.reject(t('views.ne.common.ipAddrPlease'));
|
||||
}
|
||||
|
||||
if (value.indexOf('.') === -1 && value.indexOf(':') === -1) {
|
||||
return Promise.reject('请输入有效的IP地址');
|
||||
return Promise.reject(t('valid.ipPlease'));
|
||||
}
|
||||
if (value.indexOf('.') !== -1 && !regExpIPv4.test(value)) {
|
||||
return Promise.reject('不是有效IPv4地址');
|
||||
return Promise.reject(t('valid.ipv4Reg'));
|
||||
}
|
||||
if (value.indexOf(':') !== -1 && !regExpIPv6.test(value)) {
|
||||
return Promise.reject('不是有效IPv6地址');
|
||||
return Promise.reject(t('valid.ipv6Reg'));
|
||||
}
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
@@ -112,17 +112,17 @@ function modalStateFromEqualIPV4AndIPV6(
|
||||
callback: (error?: string) => void
|
||||
) {
|
||||
if (!value) {
|
||||
return Promise.reject('请输入网元IP地址');
|
||||
return Promise.reject(t('views.ne.common.ipAddrPlease'));
|
||||
}
|
||||
|
||||
if (value.indexOf('.') === -1 && value.indexOf(':') === -1) {
|
||||
return Promise.reject('请输入有效的IP地址');
|
||||
return Promise.reject(t('valid.ipPlease'));
|
||||
}
|
||||
if (value.indexOf('.') !== -1 && !regExpIPv4.test(value)) {
|
||||
return Promise.reject('不是有效IPv4地址');
|
||||
return Promise.reject(t('valid.ipv4Reg'));
|
||||
}
|
||||
if (value.indexOf(':') !== -1 && !regExpIPv6.test(value)) {
|
||||
return Promise.reject('不是有效IPv6地址');
|
||||
return Promise.reject(t('valid.ipv6Reg'));
|
||||
}
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
@@ -222,17 +222,17 @@ function modalStateFromEqualIPV4AndIPV6(
|
||||
callback: (error?: string) => void
|
||||
) {
|
||||
if (!value) {
|
||||
return Promise.reject('请输入网元IP地址');
|
||||
return Promise.reject(t('views.ne.common.ipAddrPlease'));
|
||||
}
|
||||
|
||||
if (value.indexOf('.') === -1 && value.indexOf(':') === -1) {
|
||||
return Promise.reject('请输入有效的IP地址');
|
||||
return Promise.reject(t('valid.ipPlease'));
|
||||
}
|
||||
if (value.indexOf('.') !== -1 && !regExpIPv4.test(value)) {
|
||||
return Promise.reject('不是有效IPv4地址');
|
||||
return Promise.reject(t('valid.ipv4Reg'));
|
||||
}
|
||||
if (value.indexOf(':') !== -1 && !regExpIPv6.test(value)) {
|
||||
return Promise.reject('不是有效IPv6地址');
|
||||
return Promise.reject(t('valid.ipv6Reg'));
|
||||
}
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user