--中英文国际化
This commit is contained in:
@@ -14,7 +14,6 @@ import {
|
||||
} from '@/api/configManage/backupManage';
|
||||
import { saveAs } from 'file-saver';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import {updateConfig } from '@/api/configManage/config';
|
||||
import {updateBackInfo } from '@/api/configManage/backupManage';
|
||||
import useNeInfoStore from '@/store/modules/neinfo';
|
||||
const { t } = useI18n();
|
||||
@@ -91,7 +90,7 @@ let tableColumns: ColumnsType = [
|
||||
width: 3,
|
||||
},
|
||||
{
|
||||
title: '备份说明',
|
||||
title: t('views.configManage.backupManage.remark'),
|
||||
dataIndex: 'comment',
|
||||
align: 'center',
|
||||
width: 3,
|
||||
@@ -152,14 +151,14 @@ function fnTableSize({ key }: MenuInfo) {
|
||||
function fnDownloadFile(row: Record<string, any>) {
|
||||
Modal.confirm({
|
||||
title: t('common.tipTitle'),
|
||||
content: `确认下载记录编号为 【${row.id}】 的数据项文件?`,
|
||||
content: t('views.configManage.backupManage.totalSure',{oper:t('common.downloadText'),id:row.id}),
|
||||
onOk() {
|
||||
const key = 'downloadNeBackup';
|
||||
message.loading({ content: t('common.loading'), key });
|
||||
downloadNeBackup(toRaw(row)).then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
message.success({
|
||||
content: `已完成下载`,
|
||||
content: t('common.msgSuccess', { msg: t('common.downloadText') }),
|
||||
key,
|
||||
duration: 2,
|
||||
});
|
||||
@@ -183,14 +182,14 @@ function fnDownloadFile(row: Record<string, any>) {
|
||||
function fnRecordDelete(row: Record<string, any>) {
|
||||
Modal.confirm({
|
||||
title: t('common.tipTitle'),
|
||||
content: `确认删除记录编号为 【${row.id}】 的数据项?`,
|
||||
content: t('views.configManage.backupManage.totalSure',{oper:t('common.deleteText'),id:row.id}),
|
||||
onOk() {
|
||||
const key = 'delNeBackup';
|
||||
message.loading({ content: t('common.loading'), key });
|
||||
delNeBackup(toRaw(row)).then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
message.success({
|
||||
content: `删除成功`,
|
||||
content: t('common.msgSuccess', { msg: t('common.deleteText') }),
|
||||
key,
|
||||
duration: 2,
|
||||
});
|
||||
@@ -258,7 +257,7 @@ function fnModalVisibleByEdit(row: Record<string, any>) {
|
||||
if (modalState.confirmLoading) return;
|
||||
modalState.from.backupInfo = row.comment;
|
||||
modalState.from.id = row.id;
|
||||
modalState.title = '编辑备份文件';
|
||||
modalState.title = t('views.configManage.backupManage.edit');
|
||||
modalState.visibleByEdit = true;
|
||||
}
|
||||
|
||||
@@ -266,7 +265,7 @@ function fnModalVisibleByEdit(row: Record<string, any>) {
|
||||
const modalStateFrom = Form.useForm(
|
||||
modalState.from,
|
||||
reactive({
|
||||
backupInfo: [{ required: true, message: '备份说明不能为空' }],
|
||||
backupInfo: [{ required: true, message: t('views.configManage.backupManage.remark') + t('common.unableNull') }],
|
||||
})
|
||||
);
|
||||
/**
|
||||
@@ -475,7 +474,7 @@ onMounted(() => {
|
||||
>
|
||||
<a-form name="modalStateFrom" layout="horizontal">
|
||||
<a-form-item
|
||||
label="备注说明"
|
||||
:label="t('views.configManage.backupManage.remark')"
|
||||
name="backupInfo"
|
||||
v-bind="modalStateFrom.validateInfos.backupInfo"
|
||||
>
|
||||
|
||||
@@ -267,7 +267,8 @@ function fnBeforeUploadFile(file: FileType) {
|
||||
const fileName = file.name;
|
||||
const suff = fileName.substring(fileName.lastIndexOf('.'));
|
||||
if (!['.ini'].includes(suff)) {
|
||||
message.error('只支持上传文件格式(.ini)', 3);
|
||||
message.error(t('views.configManage.softwareManage.onlyAble',{fileText:'(.ini)'}), 3);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -294,7 +295,7 @@ onMounted(() => {
|
||||
fnGetList();
|
||||
} else {
|
||||
message.warning({
|
||||
content: `暂无网元列表数据`,
|
||||
content: t('views.configManage.softwareManage.nullData'),
|
||||
duration: 2,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -78,44 +78,44 @@ let tableState: TabeStateType = reactive({
|
||||
/**表格字段列 */
|
||||
let tableColumns: ColumnsType = [
|
||||
{
|
||||
title: '网元类型',
|
||||
title:t('views.configManage.softwareManage.neType'),
|
||||
dataIndex: 'neType',
|
||||
align: 'center',
|
||||
width: 2,
|
||||
},
|
||||
{
|
||||
title: '网元内部标识',
|
||||
title: t('views.configManage.neManage.neId'),
|
||||
dataIndex: 'neId',
|
||||
align: 'center',
|
||||
width: 2,
|
||||
},
|
||||
{
|
||||
title: '版本',
|
||||
title: t('views.configManage.softwareManage.versions'),
|
||||
dataIndex: 'version',
|
||||
align: 'center',
|
||||
width: 2,
|
||||
},
|
||||
{
|
||||
title: '升级前版本',
|
||||
title: t('views.configManage.softwareManage.upVersions'),
|
||||
dataIndex: 'preVersion',
|
||||
align: 'center',
|
||||
width: 2,
|
||||
},
|
||||
{
|
||||
title: '回退前版本',
|
||||
title:t('views.configManage.softwareManage.backVersions'),
|
||||
dataIndex: 'newVersion',
|
||||
align: 'center',
|
||||
width: 2,
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
title: t('views.configManage.softwareManage.status'),
|
||||
dataIndex: 'status',
|
||||
key: 'status',
|
||||
align: 'center',
|
||||
width: 2,
|
||||
},
|
||||
{
|
||||
title: '激活时间',
|
||||
title: t('views.configManage.softwareManage.letUpTime'),
|
||||
dataIndex: 'updateTime',
|
||||
align: 'center',
|
||||
customRender(opt) {
|
||||
@@ -210,7 +210,6 @@ watch(
|
||||
:model="queryParams"
|
||||
name="queryParams"
|
||||
layout="horizontal"
|
||||
:label-col="{ span: 5 }"
|
||||
>
|
||||
<a-row :gutter="16">
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
@@ -227,13 +226,12 @@ watch(
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item label="创建时间" name="queryRangePicker">
|
||||
<a-form-item :label="t('views.configManage.softwareManage.createTime')" name="queryRangePicker">
|
||||
<a-range-picker
|
||||
v-model:value="queryRangePicker"
|
||||
allow-clear
|
||||
bordered
|
||||
value-format="YYYY-MM-DD"
|
||||
:placeholder="['创建开始', '创建结束']"
|
||||
style="width: 100%"
|
||||
></a-range-picker>
|
||||
</a-form-item>
|
||||
|
||||
@@ -320,7 +320,7 @@ function fnDownloadFile(row: Record<string, any>) {
|
||||
downloadNeSoftware(toRaw(row)).then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
message.success({
|
||||
content: `已完成下载`,
|
||||
content: t('common.msgSuccess', { msg: t('common.downloadText') }),
|
||||
key,
|
||||
duration: 2,
|
||||
});
|
||||
@@ -374,7 +374,7 @@ function fnRecordDelete(row: Record<string, any>) {
|
||||
function fnGetList(pageNum?: number) {
|
||||
if (tableState.loading) return;
|
||||
tableState.loading = true;
|
||||
if(pageNum){
|
||||
if (pageNum) {
|
||||
queryParams.pageNum = pageNum;
|
||||
}
|
||||
listNeSoftware(toRaw(queryParams)).then(res => {
|
||||
@@ -529,7 +529,8 @@ function fnBeforeUploadFile(file: FileType) {
|
||||
const fileName = file.name;
|
||||
const suff = fileName.substring(fileName.lastIndexOf('.'));
|
||||
if (!['.deb', '.rpm'].includes(suff)) {
|
||||
message.error('只支持上传文件格式(.deb、.rpm)', 3);
|
||||
message.error(t('views.configManage.softwareManage.onlyAble',{fileText:'(.deb、.rpm)'}), 3);
|
||||
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -551,7 +552,7 @@ function fnBeforeUploadCms(file: FileType) {
|
||||
const fileName = file.name;
|
||||
const suff = fileName.substring(fileName.lastIndexOf('.'));
|
||||
if (!['.cms'].includes(suff)) {
|
||||
message.error('只支持上传文件格式(.cms)', 3);
|
||||
message.error(t('views.configManage.softwareManage.onlyAble',{fileText:'(.cms)'}), 3);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -579,7 +580,7 @@ onMounted(() => {
|
||||
}
|
||||
} else {
|
||||
message.warning({
|
||||
content: `暂无网元列表数据`,
|
||||
content: t('views.configManage.softwareManage.nullData'),
|
||||
duration: 2,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user