feat: 网元软件多语言翻译
This commit is contained in:
@@ -584,6 +584,7 @@ export default {
|
|||||||
ne: {
|
ne: {
|
||||||
common: {
|
common: {
|
||||||
neType: 'NE Type',
|
neType: 'NE Type',
|
||||||
|
neTypePlease: "Please select network element type",
|
||||||
neId: 'NE ID',
|
neId: 'NE ID',
|
||||||
serialNum: 'Serial Num',
|
serialNum: 'Serial Num',
|
||||||
expiryDate: 'Expiry Date',
|
expiryDate: 'Expiry Date',
|
||||||
@@ -645,8 +646,16 @@ export default {
|
|||||||
editTitle: "Edit Host Commands",
|
editTitle: "Edit Host Commands",
|
||||||
},
|
},
|
||||||
neSoftware: {
|
neSoftware: {
|
||||||
|
uploadTitle: "Update Software",
|
||||||
upload: "Upload",
|
upload: "Upload",
|
||||||
uploadBatch: "Upload More Software",
|
uploadBatch: "Upload More Software",
|
||||||
|
name: "File Name",
|
||||||
|
path: "Software File",
|
||||||
|
pathPlease: "Please upload the software package file",
|
||||||
|
version: "Software Version",
|
||||||
|
versionPlease: "Please enter the software version number",
|
||||||
|
delTip: "Confirmed to remove the package?",
|
||||||
|
downTip: "Confirmation to download package [{txt}]?",
|
||||||
},
|
},
|
||||||
neVersion: {
|
neVersion: {
|
||||||
upgrade: "Upgrade To New Version",
|
upgrade: "Upgrade To New Version",
|
||||||
|
|||||||
@@ -584,6 +584,7 @@ export default {
|
|||||||
ne: {
|
ne: {
|
||||||
common: {
|
common: {
|
||||||
neType: '网元类型',
|
neType: '网元类型',
|
||||||
|
neTypePlease: "请选择网元类型",
|
||||||
neId: '网元内部标识',
|
neId: '网元内部标识',
|
||||||
serialNum: '序列号',
|
serialNum: '序列号',
|
||||||
expiryDate: '许可证到期时间',
|
expiryDate: '许可证到期时间',
|
||||||
@@ -645,8 +646,16 @@ export default {
|
|||||||
editTitle: "编辑主机命令",
|
editTitle: "编辑主机命令",
|
||||||
},
|
},
|
||||||
neSoftware: {
|
neSoftware: {
|
||||||
|
uploadTitle: "上传软件包",
|
||||||
upload: "上传",
|
upload: "上传",
|
||||||
uploadBatch: "上传多软件包",
|
uploadBatch: "上传多软件包",
|
||||||
|
name: "文件名",
|
||||||
|
path: "软件文件",
|
||||||
|
pathPlease: "请上传软件包文件",
|
||||||
|
version: "软件版本",
|
||||||
|
versionPlease: "请输入软件版本号",
|
||||||
|
delTip: "确认要删除软件包吗?",
|
||||||
|
downTip: "确认要下载软件包【{txt}】吗?",
|
||||||
},
|
},
|
||||||
neVersion: {
|
neVersion: {
|
||||||
upgrade: "升级到新版本",
|
upgrade: "升级到新版本",
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ const modalStateFrom = Form.useForm(
|
|||||||
required: true,
|
required: true,
|
||||||
min: 1,
|
min: 1,
|
||||||
max: 32,
|
max: 32,
|
||||||
message: t('views.configManage.softwareManage.neTypePlease'),
|
message: t('views.ne.common.neTypePlease'),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
version: [
|
version: [
|
||||||
@@ -79,13 +79,13 @@ const modalStateFrom = Form.useForm(
|
|||||||
required: true,
|
required: true,
|
||||||
min: 1,
|
min: 1,
|
||||||
max: 64,
|
max: 64,
|
||||||
message: t('views.configManage.softwareManage.versionPlease'),
|
message: t('views.ne.neSoftware.versionPlease'),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
path: [
|
path: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: t('views.configManage.softwareManage.updateFilePlease'),
|
message: t('views.ne.neSoftware.pathPlease'),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
@@ -205,7 +205,7 @@ function fnModalVisibleByEdit(id?: string) {
|
|||||||
.then(res => {
|
.then(res => {
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
if (res.code === RESULT_CODE_SUCCESS) {
|
||||||
Object.assign(modalState.from, res.data);
|
Object.assign(modalState.from, res.data);
|
||||||
modalState.title = 'Update Software';
|
modalState.title = t('views.ne.neSoftware.uploadTitle');
|
||||||
modalState.visibleByEdit = true;
|
modalState.visibleByEdit = true;
|
||||||
} else {
|
} else {
|
||||||
message.error(res.msg, 3);
|
message.error(res.msg, 3);
|
||||||
@@ -218,7 +218,7 @@ function fnModalVisibleByEdit(id?: string) {
|
|||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
modalState.title = 'Upload Software';
|
modalState.title = t('views.ne.neSoftware.uploadTitle');
|
||||||
modalState.visibleByEdit = true;
|
modalState.visibleByEdit = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -235,7 +235,7 @@ onMounted(() => {});
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<a-modal
|
<a-modal
|
||||||
width="800px"
|
width="500px"
|
||||||
:keyboard="false"
|
:keyboard="false"
|
||||||
:mask-closable="false"
|
:mask-closable="false"
|
||||||
:visible="modalState.visibleByEdit"
|
:visible="modalState.visibleByEdit"
|
||||||
@@ -247,12 +247,12 @@ onMounted(() => {});
|
|||||||
<a-form
|
<a-form
|
||||||
name="modalStateFrom"
|
name="modalStateFrom"
|
||||||
layout="horizontal"
|
layout="horizontal"
|
||||||
:wrapper-col="{ span: 18 }"
|
:wrapper-col="{ span: 16 }"
|
||||||
:label-col="{ span: 6 }"
|
:label-col="{ span: 8 }"
|
||||||
:labelWrap="true"
|
:labelWrap="true"
|
||||||
>
|
>
|
||||||
<a-form-item
|
<a-form-item
|
||||||
label="Upload File"
|
:label="t('views.ne.neSoftware.path')"
|
||||||
name="file"
|
name="file"
|
||||||
v-bind="modalStateFrom.validateInfos.path"
|
v-bind="modalStateFrom.validateInfos.path"
|
||||||
v-if="modalState.from.id === ''"
|
v-if="modalState.from.id === ''"
|
||||||
@@ -282,7 +282,7 @@ onMounted(() => {});
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<a-form-item
|
<a-form-item
|
||||||
label="NeType"
|
:label="t('views.ne.common.neType')"
|
||||||
name="neType"
|
name="neType"
|
||||||
v-bind="modalStateFrom.validateInfos.neType"
|
v-bind="modalStateFrom.validateInfos.neType"
|
||||||
>
|
>
|
||||||
@@ -302,7 +302,7 @@ onMounted(() => {});
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<a-form-item
|
<a-form-item
|
||||||
label="Version"
|
:label="t('views.ne.neSoftware.version')"
|
||||||
name="version"
|
name="version"
|
||||||
v-bind="modalStateFrom.validateInfos.version"
|
v-bind="modalStateFrom.validateInfos.version"
|
||||||
>
|
>
|
||||||
@@ -313,7 +313,7 @@ onMounted(() => {});
|
|||||||
></a-input>
|
></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<a-form-item label="Description" name="description">
|
<a-form-item :label="t('common.description')" name="description">
|
||||||
<a-textarea
|
<a-textarea
|
||||||
v-model:value="modalState.from.description"
|
v-model:value="modalState.from.description"
|
||||||
:maxlength="500"
|
:maxlength="500"
|
||||||
|
|||||||
@@ -85,13 +85,19 @@ let tableColumns = ref<TableColumnsType>([
|
|||||||
width: 100,
|
width: 100,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'neType',
|
title: t('views.ne.common.neType'),
|
||||||
dataIndex: 'neType',
|
dataIndex: 'neType',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
width: 100,
|
width: 100,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'name',
|
title: t('views.ne.neSoftware.version'),
|
||||||
|
dataIndex: 'version',
|
||||||
|
align: 'left',
|
||||||
|
width: 150,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t('views.ne.neSoftware.name'),
|
||||||
dataIndex: 'name',
|
dataIndex: 'name',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
width: 250,
|
width: 250,
|
||||||
@@ -100,13 +106,7 @@ let tableColumns = ref<TableColumnsType>([
|
|||||||
maxWidth: 400,
|
maxWidth: 400,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'version',
|
title: t('common.description'),
|
||||||
dataIndex: 'version',
|
|
||||||
align: 'left',
|
|
||||||
width: 150,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'description',
|
|
||||||
dataIndex: 'description',
|
dataIndex: 'description',
|
||||||
key: 'description',
|
key: 'description',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
@@ -116,7 +116,7 @@ let tableColumns = ref<TableColumnsType>([
|
|||||||
maxWidth: 400,
|
maxWidth: 400,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'createTime',
|
title: t('common.createTime'),
|
||||||
dataIndex: 'createTime',
|
dataIndex: 'createTime',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
customRender(opt) {
|
customRender(opt) {
|
||||||
@@ -251,9 +251,9 @@ function fnModalEditCancel() {
|
|||||||
/**删除软件包 */
|
/**删除软件包 */
|
||||||
function fnRecordDelete(id: string) {
|
function fnRecordDelete(id: string) {
|
||||||
if (!id || modalState.confirmLoading) return;
|
if (!id || modalState.confirmLoading) return;
|
||||||
let msg = 'Removing software packages?';
|
let msg = t('views.ne.neSoftware.delTip');
|
||||||
if (id === '0') {
|
if (id === '0') {
|
||||||
msg = `${msg} select ${tableState.selectedRowKeys.length}`;
|
msg = `${msg} ...${tableState.selectedRowKeys.length}`;
|
||||||
id = tableState.selectedRowKeys.join(',');
|
id = tableState.selectedRowKeys.join(',');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -285,18 +285,14 @@ function fnRecordDelete(id: string) {
|
|||||||
function fnDownloadFile(row: Record<string, any>) {
|
function fnDownloadFile(row: Record<string, any>) {
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: t('common.tipTitle'),
|
title: t('common.tipTitle'),
|
||||||
content: t('views.configManage.softwareManage.downloadTip', {
|
content: t('views.ne.neSoftware.downTip', {txt: row.name}),
|
||||||
fileName: row.name,
|
|
||||||
}),
|
|
||||||
onOk() {
|
onOk() {
|
||||||
const hide = message.loading(t('common.loading'), 0);
|
const hide = message.loading(t('common.loading'), 0);
|
||||||
downloadFile(row.path)
|
downloadFile(row.path)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
if (res.code === RESULT_CODE_SUCCESS) {
|
||||||
message.success({
|
message.success({
|
||||||
content: t('common.msgSuccess', {
|
content: t('common.operateOk'),
|
||||||
msg: t('common.downloadText'),
|
|
||||||
}),
|
|
||||||
duration: 2,
|
duration: 2,
|
||||||
});
|
});
|
||||||
saveAs(res.data, `${row.name}`);
|
saveAs(res.data, `${row.name}`);
|
||||||
@@ -360,7 +356,7 @@ onMounted(() => {
|
|||||||
<a-form :model="queryParams" name="queryParams" layout="horizontal">
|
<a-form :model="queryParams" name="queryParams" layout="horizontal">
|
||||||
<a-row :gutter="16">
|
<a-row :gutter="16">
|
||||||
<a-col :lg="6" :md="12" :xs="24">
|
<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
|
<a-auto-complete
|
||||||
v-model:value="queryParams.neType"
|
v-model:value="queryParams.neType"
|
||||||
:options="NE_TYPE_LIST.map(v => ({ value: v }))"
|
:options="NE_TYPE_LIST.map(v => ({ value: v }))"
|
||||||
@@ -370,7 +366,7 @@ onMounted(() => {
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="6" :md="12" :xs="24">
|
<a-col :lg="6" :md="12" :xs="24">
|
||||||
<a-form-item label="name" name="name">
|
<a-form-item :label="t('views.ne.neSoftware.name')" name="name">
|
||||||
<a-input
|
<a-input
|
||||||
v-model:value="queryParams.name"
|
v-model:value="queryParams.name"
|
||||||
allow-clear
|
allow-clear
|
||||||
@@ -379,7 +375,7 @@ onMounted(() => {
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="6" :md="12" :xs="24">
|
<a-col :lg="6" :md="12" :xs="24">
|
||||||
<a-form-item label="Version" name="version">
|
<a-form-item :label="t('views.ne.neSoftware.version')" name="version">
|
||||||
<a-input
|
<a-input
|
||||||
v-model:value="queryParams.version"
|
v-model:value="queryParams.version"
|
||||||
allow-clear
|
allow-clear
|
||||||
@@ -410,8 +406,8 @@ onMounted(() => {
|
|||||||
<template #title>
|
<template #title>
|
||||||
<a-space :size="8" align="center">
|
<a-space :size="8" align="center">
|
||||||
<a-button type="primary" @click.prevent="fnModalVisibleByEdit()">
|
<a-button type="primary" @click.prevent="fnModalVisibleByEdit()">
|
||||||
<template #icon><PlusOutlined /></template>
|
<template #icon><UploadOutlined /></template>
|
||||||
{{ t('common.addText') }}
|
{{ t('views.ne.neSoftware.upload') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button
|
<a-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@@ -420,8 +416,8 @@ onMounted(() => {
|
|||||||
(modalState.visibleByMoreFile = !modalState.visibleByMoreFile)
|
(modalState.visibleByMoreFile = !modalState.visibleByMoreFile)
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<template #icon><PlusOutlined /></template>
|
<template #icon><UploadOutlined /></template>
|
||||||
More File Upload
|
{{ t('views.ne.neSoftware.uploadBatch') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button
|
<a-button
|
||||||
type="default"
|
type="default"
|
||||||
|
|||||||
Reference in New Issue
Block a user