feat: 网元版本多语言翻译

This commit is contained in:
TsMask
2024-05-17 16:04:44 +08:00
parent 85ae7dc5ea
commit 69f3347a4d
5 changed files with 59 additions and 65 deletions

View File

@@ -55,6 +55,8 @@ export default {
rowId: 'ID',
createTime: 'Create Time',
updateTime: 'Update Time',
remark: 'Remark',
description: 'Description',
operate: 'Operation',
operateOk: 'Operation Successful!',
operateErr: 'Operation Failed!',
@@ -585,7 +587,6 @@ export default {
neId: 'NE ID',
serialNum: 'Serial Num',
expiryDate: 'Expiry Date',
remark: 'Remark',
},
neInfo: {
version: "Version",
@@ -643,15 +644,25 @@ export default {
addTitle: "New Host Commands",
editTitle: "Edit Host Commands",
},
neSoftware: {
upload: "Upload",
uploadBatch: "Upload More Software",
},
neVersion: {
upgrade: "Upgrade To New Version",
upgradeTip: "Are you sure you want to upgrade to the new version?",
upgradeTipEmpty: "There is currently no upgrade available",
upgradeTipEqual: "The current version is the same as the new version",
rollback: 'Rollback To Previous Version',
rollbackTip: "Are you sure you want to roll back to the previous version?",
rollbackTipEmpty: "There is currently no rollback available",
upgradeTip: "Confirmed to upgrade to the new version?",
upgradeTipEmpty: "There are currently no new versions available",
upgradeTipEqual: "Current version is the same as the new version",
rollback: 'Switch to previous version',
rollbackTip: "Confirm switching to the previous version?",
rollbackTipEmpty: "There is currently no previous version available",
rollbackTipEqual: 'The current version is the same as the previous version',
version: "Current Version",
preVersion: "Previous Version",
newVersion: "New Version",
status: "Revision Status",
upgradeBatch: "Batch Upgrade",
upgradeBatchTip: "Do you perform new version upgrades on checked records?",
},
neLicense: {
status: "License Status",

View File

@@ -55,6 +55,8 @@ export default {
rowId: '编号',
createTime: '创建时间',
updateTime: '更新时间',
remark: '备注',
description: '说明',
operate: '操作',
operateOk: '操作成功!',
operateErr: '操作失败!',
@@ -585,7 +587,6 @@ export default {
neId: '网元内部标识',
serialNum: '序列号',
expiryDate: '许可证到期时间',
remark: '备注',
},
neInfo: {
version: "网元版本",
@@ -643,15 +644,25 @@ export default {
addTitle: "新增主机命令",
editTitle: "编辑主机命令",
},
neSoftware: {
upload: "上传",
uploadBatch: "上传多软件包",
},
neVersion: {
upgrade: "升级到新版本",
upgradeTip: "确认要升级到新版本吗?",
upgradeTipEmpty: "当前没有可用的升级",
upgradeTipEmpty: "当前没有可用的新版本",
upgradeTipEqual: "当前版本与新版本相同",
rollback: '回滚到以前的版本',
rollbackTip: "确认要回滚到上一版本吗?",
rollbackTipEmpty: "目前没有可用的回滚",
rollbackTipEqual: '当前版本与之前版本相同',
rollback: '切换到上一个版本',
rollbackTip: "确认切换到上一版本吗?",
rollbackTipEmpty: "目前没有可用的上一个版本",
rollbackTipEqual: '当前版本与之前版本相同',
version: "当前版本",
preVersion: "上一个版本",
newVersion: "新版本",
status: "版本状态",
upgradeBatch: "批量更新",
upgradeBatchTip: "对勾选的记录进行新版本升级吗?",
},
neLicense: {
status: "许可证状态",

View File

@@ -372,7 +372,7 @@ onMounted(() => {});
<a-switch v-model:checked="modalState.from.reload"> </a-switch>
</a-form-item>
<a-form-item :label="t('views.ne.common.remark')" name="remark">
<a-form-item :label="t('common.remark')" name="remark">
<a-textarea
v-model:value="modalState.from.remark"
:maxlength="200"

View File

@@ -114,7 +114,7 @@ let tableColumns = ref<TableColumnsType>([
width: 120,
},
{
title: t('views.ne.common.remark'),
title: t('common.remark'),
dataIndex: 'remark',
key: 'remark',
align: 'left',

View File

@@ -36,8 +36,6 @@ let queryParams = reactive({
neType: undefined,
/**网元ID */
neId: '',
/**版本 */
version: '',
/**当前页数 */
pageNum: 1,
/**每页条数 */
@@ -49,7 +47,6 @@ function fnQueryReset() {
queryParams = Object.assign(queryParams, {
neType: undefined,
neId: '',
version: '',
pageNum: 1,
pageSize: 20,
});
@@ -90,28 +87,28 @@ let tableColumns = ref<TableColumnsType>([
width: 100,
},
{
title: 'neType',
title: t('views.ne.common.neType'),
dataIndex: 'neType',
align: 'left',
width: 100,
},
{
title: 'neId',
title: t('views.ne.common.neId'),
dataIndex: 'neId',
align: 'left',
width: 100,
},
{
title: 'version',
title: t('views.ne.neVersion.version'),
dataIndex: 'version',
align: 'left',
width: 100,
width: 150,
resizable: true,
minWidth: 100,
minWidth: 150,
maxWidth: 200,
},
{
title: 'Previous Version',
title: t('views.ne.neVersion.preVersion'),
dataIndex: 'preVersion',
align: 'left',
width: 150,
@@ -120,24 +117,25 @@ let tableColumns = ref<TableColumnsType>([
maxWidth: 200,
},
{
title: 'New Version',
title: t('views.ne.neVersion.newVersion'),
dataIndex: 'newVersion',
align: 'left',
width: 100,
width: 150,
resizable: true,
minWidth: 100,
minWidth: 150,
maxWidth: 200,
},
{
title: 'status',
title: t('views.ne.neVersion.status'),
key: 'status',
dataIndex: 'status',
align: 'left',
width: 100,
width: 120,
},
{
title: 'updateTime',
title: t('common.updateTime'),
dataIndex: 'updateTime',
align: 'center',
align: 'left',
customRender(opt) {
if (!opt.value) return '';
return parseDateToStr(opt.value);
@@ -342,7 +340,7 @@ function fnRecordVersion(
function fnRecordUpgrade() {
Modal.confirm({
title: t('common.tipTitle'),
content: `check upgrade version?`,
content: t('views.ne.neVersion.upgradeBatchTip'),
onOk() {
if (modalState.confirmLoading) return;
modalState.confirmLoading = true;
@@ -366,23 +364,6 @@ function fnRecordUpgrade() {
preinput: preinput,
});
}
// operateNeVersion({
// neType: 'row.neType',
// neId: 'row.neId',
// action: 'upgrade',
// preinput: 'preinput',
// })
// .then(res => {
// if (res.code === RESULT_CODE_SUCCESS) {
// console.log(res);
// } else {
// message.error(res.msg, 3);
// }
// })
// .finally(() => {
// hide();
// modalState.confirmLoading = false;
// });
// 发请求信息
modalState.visibleByUpgrade = true;
@@ -450,7 +431,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="neType" name="neId ">
<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 }))"
@@ -460,7 +441,7 @@ onMounted(() => {
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :xs="24">
<a-form-item label="neId" name="neId">
<a-form-item :label="t('views.ne.common.neId')" name="neId">
<a-input
v-model:value="queryParams.neId"
allow-clear
@@ -468,15 +449,6 @@ onMounted(() => {
></a-input>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :xs="24">
<a-form-item label="Version" name="version">
<a-input
v-model:value="queryParams.version"
allow-clear
:placeholder="t('common.inputPlease')"
></a-input>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :xs="24">
<a-form-item>
<a-space :size="8">
@@ -505,8 +477,8 @@ onMounted(() => {
() => (modalState.visibleByEdit = !modalState.visibleByEdit)
"
>
<template #icon><PlusOutlined /></template>
Upload Software
<template #icon><UploadOutlined /></template>
{{ t('views.ne.neSoftware.upload') }}
</a-button>
<a-button
type="primary"
@@ -515,8 +487,8 @@ onMounted(() => {
(modalState.visibleByMoreFile = !modalState.visibleByMoreFile)
"
>
<template #icon><PlusOutlined /></template>
Upload More Software
<template #icon><UploadOutlined /></template>
{{ t('views.ne.neSoftware.uploadBatch') }}
</a-button>
<a-button
type="default"
@@ -526,7 +498,7 @@ onMounted(() => {
@click.prevent="fnRecordUpgrade()"
>
<template #icon><ThunderboltOutlined /></template>
Check Upgrade
{{ t('views.ne.neVersion.upgradeBatch') }}
</a-button>
</a-space>
</template>