diff --git a/src/views/configManage/backupManage/index.vue b/src/views/configManage/backupManage/index.vue index a1ad368d..6d626280 100644 --- a/src/views/configManage/backupManage/index.vue +++ b/src/views/configManage/backupManage/index.vue @@ -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) { 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) { function fnRecordDelete(row: Record) { 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) { 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) { 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(() => { > diff --git a/src/views/configManage/license/index.vue b/src/views/configManage/license/index.vue index 12a8349b..7cf317d3 100644 --- a/src/views/configManage/license/index.vue +++ b/src/views/configManage/license/index.vue @@ -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, }); } diff --git a/src/views/configManage/softwareManage/components/software-history.vue b/src/views/configManage/softwareManage/components/software-history.vue index b1030d34..b7c600db 100644 --- a/src/views/configManage/softwareManage/components/software-history.vue +++ b/src/views/configManage/softwareManage/components/software-history.vue @@ -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 }" > @@ -227,13 +226,12 @@ watch( - + diff --git a/src/views/configManage/softwareManage/index.vue b/src/views/configManage/softwareManage/index.vue index 85efca87..85321686 100644 --- a/src/views/configManage/softwareManage/index.vue +++ b/src/views/configManage/softwareManage/index.vue @@ -320,7 +320,7 @@ function fnDownloadFile(row: Record) { 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) { 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, }); } diff --git a/src/views/monitor/online/index.vue b/src/views/monitor/online/index.vue index 055e78b4..fb25f7ab 100644 --- a/src/views/monitor/online/index.vue +++ b/src/views/monitor/online/index.vue @@ -45,7 +45,7 @@ let tableState: TabeStateType = reactive({ /**表格字段列 */ let tableColumns: ColumnsType = [ { - title: '序号', + title: t('common.rowId'), dataIndex: 'num', width: '50px', align: 'center', @@ -55,42 +55,42 @@ let tableColumns: ColumnsType = [ }, }, { - title: '会话编号', + title: t('views.monitor.online.mettingId'), dataIndex: 'tokenId', align: 'center', }, { - title: '登录账号', + title: t('views.monitor.online.account'), dataIndex: 'userName', align: 'center', }, { - title: '所属部门', + title: t('views.monitor.online.class'), dataIndex: 'deptName', align: 'center', }, { - title: '登录主机', + title: t('views.monitor.online.host'), dataIndex: 'ipaddr', align: 'center', }, { - title: '登录地点', + title: t('views.monitor.online.loginDes'), dataIndex: 'loginLocation', align: 'center', }, { - title: '操作系统', + title: t('views.monitor.online.os'), dataIndex: 'os', align: 'center', }, { - title: '浏览器', + title: t('views.monitor.online.lib'), dataIndex: 'browser', align: 'center', }, { - title: '登录时间', + title: t('views.monitor.online.loginTime'), dataIndex: 'loginTime', align: 'center', customRender(opt) { @@ -99,7 +99,7 @@ let tableColumns: ColumnsType = [ }, }, { - title: '操作', + title: t('common.operate'), key: 'tokenId', align: 'center', }, @@ -165,14 +165,14 @@ function fnGetList() { function fnForceLogout(row: Record) { Modal.confirm({ title: t('common.tipTitle'), - content: `确认强退登录账号为 ${row.userName} 的用户?`, + content: t('views.monitor.online.getOutSure',{userName:row.userName}), onOk() { const hide = message.loading(t('common.loading'), 0); forceLogout(row.tokenId) .then(res => { if (res.code === RESULT_CODE_SUCCESS) { message.success({ - content: `已强退用户 ${row.userName}`, + content: t('common.msgSuccess', { msg: t('views.monitor.online.getOut') }), duration: 3, }); } else { @@ -312,7 +312,7 @@ onMounted(() => { v-perms:has="['monitor:online:forceLogout']" > - 强退 + {{ t('views.monitor.online.getOut') }} diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 3b29a154..d50f480d 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -911,7 +911,7 @@ onMounted(() => { v-perms:has="['system:user:import']" > - {{ t('views.system.user.export') }} + {{ t('views.system.user.import') }} { v-perms:has="['system:user:export']" > - {{ t('views.system.user.import') }} + {{ t('views.system.user.export') }} @@ -1378,7 +1378,10 @@ onMounted(() => { - + { - + { - + { > - + @@ -1478,7 +1480,7 @@ onMounted(() => { - {{t('views.system.user.updateSure')}} + {{ t('views.system.user.updateSure') }} @@ -1487,7 +1489,7 @@ onMounted(() => { :title="t('views.system.user.downloadObj')" @click.prevent="fnModalUploadImportExportTemplate" > - {{t('views.system.user.downloadObj')}} + {{ t('views.system.user.downloadObj') }}