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

@@ -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>