feat: 网元信息OAM多语言翻译

This commit is contained in:
TsMask
2024-05-20 11:58:25 +08:00
parent 9b9d6222e1
commit 48f278997f
5 changed files with 139 additions and 138 deletions

View File

@@ -100,19 +100,19 @@ let tableColumns: ColumnsType = [
width: 150,
},
{
title: t('views.configManage.neManage.neName'),
title: t('views.ne.common.neName'),
dataIndex: 'neName',
align: 'left',
width: 150,
},
{
title: t('views.configManage.neManage.ip'),
title: t('views.ne.common.ipAddr'),
dataIndex: 'ip',
align: 'left',
width: 150,
},
{
title: t('views.configManage.neManage.port'),
title: t('views.ne.common.port'),
dataIndex: 'port',
align: 'left',
width: 100,
@@ -231,36 +231,21 @@ function fnModalEditCancel() {
*/
function fnRecordDelete(id: string) {
if (!id || modalState.confirmLoading) return;
let msg = '';
let msg = t('views.ne.neInfo.delTip');
if (id === '0') {
const neInfo: any = tableState.data.find(
(item: any) => item.id === tableState.selectedRowKeys[0]
);
if (neInfo) {
msg = neInfo.neName;
}
msg = `${msg}... ${tableState.selectedRowKeys.length}`;
id = tableState.selectedRowKeys.join(',');
} else {
const neInfo: any = tableState.data.find((item: any) => item.id === id);
if (neInfo) {
msg = neInfo.neName;
}
msg = `${msg} ...${tableState.selectedRowKeys.length}`;
}
Modal.confirm({
title: t('common.tipTitle'),
content: `确认删除网元名称为【${msg}】的数据项?`,
content: msg,
onOk() {
modalState.confirmLoading = true;
const hide = message.loading(t('common.loading'), 0);
delNeInfo(id)
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({
content: `操作成功`,
duration: 3,
});
message.success(t('common.operateOk'), 3);
fnGetList(1);
} else {
message.error({
@@ -414,10 +399,7 @@ onMounted(() => {
<a-form :model="queryParams" name="queryParams" layout="horizontal">
<a-row :gutter="16">
<a-col :lg="6" :md="12" :xs="24">
<a-form-item
:label="t('views.ne.common.neType')"
name="neType "
>
<a-form-item :label="t('views.ne.common.neType')" name="neType ">
<a-auto-complete
v-model:value="queryParams.neType"
:options="NE_TYPE_LIST.map(v => ({ value: v }))"
@@ -563,7 +545,7 @@ onMounted(() => {
<a-menu @click="({ key }:any) => fnRecordMore(key, record)">
<a-menu-item key="log">
<FileTextOutlined />
{{ t('views.configManage.neManage.log') }}
{{ t('views.ne.common.log') }}
</a-menu-item>
<a-menu-item key="start">
<ThunderboltOutlined />
@@ -616,7 +598,7 @@ onMounted(() => {
</a-tag>
</div>
<div>
<span>{{ t('views.ne.neInfo.version') }}</span>
<span>{{ t('views.ne.neVersion.version') }}</span>
<span>{{ record.serverState.version }}</span>
</div>
<div>