--中英文国际化
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"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user