--中英文国际化
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,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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<string, string>) {
|
||||
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']"
|
||||
>
|
||||
<template #icon><LogoutOutlined /></template>
|
||||
强退
|
||||
{{ t('views.monitor.online.getOut') }}
|
||||
</a-button>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
@@ -911,7 +911,7 @@ onMounted(() => {
|
||||
v-perms:has="['system:user:import']"
|
||||
>
|
||||
<template #icon><ImportOutlined /></template>
|
||||
{{ t('views.system.user.export') }}
|
||||
{{ t('views.system.user.import') }}
|
||||
</a-button>
|
||||
<a-button
|
||||
type="dashed"
|
||||
@@ -919,7 +919,7 @@ onMounted(() => {
|
||||
v-perms:has="['system:user:export']"
|
||||
>
|
||||
<template #icon><ExportOutlined /></template>
|
||||
{{ t('views.system.user.import') }}
|
||||
{{ t('views.system.user.export') }}
|
||||
</a-button>
|
||||
</a-space>
|
||||
</template>
|
||||
@@ -1378,7 +1378,10 @@ onMounted(() => {
|
||||
|
||||
<a-row :gutter="16">
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item :label="t('views.system.user.userWork')" name="postIds">
|
||||
<a-form-item
|
||||
:label="t('views.system.user.userWork')"
|
||||
name="postIds"
|
||||
>
|
||||
<a-select
|
||||
v-model:value="modalState.from.postIds"
|
||||
allow-clear
|
||||
@@ -1393,7 +1396,10 @@ onMounted(() => {
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item :label="t('views.system.user.permission')" name="roleIds">
|
||||
<a-form-item
|
||||
:label="t('views.system.user.permission')"
|
||||
name="roleIds"
|
||||
>
|
||||
<a-select
|
||||
v-model:value="modalState.from.roleIds"
|
||||
:allow-clear="false"
|
||||
@@ -1409,7 +1415,7 @@ onMounted(() => {
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<a-form-item :label="t('views.system.user.userTip')" name="remark">
|
||||
<a-form-item :label="t('views.system.user.userTip')" name="remark">
|
||||
<a-textarea
|
||||
v-model:value="modalState.from.remark"
|
||||
:auto-size="{ minRows: 4, maxRows: 6 }"
|
||||
@@ -1433,22 +1439,18 @@ onMounted(() => {
|
||||
>
|
||||
<a-form name="modalStateFromByResetPwd" layout="horizontal">
|
||||
<a-form-item
|
||||
:label="t('views.system.user.account')"
|
||||
:label="t('views.system.user.account')"
|
||||
name="userName"
|
||||
v-bind="modalStateFrom.validateInfos.userName"
|
||||
>
|
||||
<a-input
|
||||
:value="modalState.from.userName"
|
||||
disabled
|
||||
:maxlength="30"
|
||||
>
|
||||
<a-input :value="modalState.from.userName" disabled :maxlength="30">
|
||||
<template #prefix>
|
||||
<UserOutlined />
|
||||
</template>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
:label="t('views.system.user.loginPwd')"
|
||||
:label="t('views.system.user.loginPwd')"
|
||||
name="password"
|
||||
v-bind="modalStateFrom.validateInfos.password"
|
||||
>
|
||||
@@ -1478,7 +1480,7 @@ onMounted(() => {
|
||||
<a-row :gutter="18" justify="space-between" align="middle">
|
||||
<a-col :span="12">
|
||||
<a-checkbox v-model:checked="uploadImportState.updateSupport">
|
||||
{{t('views.system.user.updateSure')}}
|
||||
{{ t('views.system.user.updateSure') }}
|
||||
</a-checkbox>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
@@ -1487,7 +1489,7 @@ onMounted(() => {
|
||||
:title="t('views.system.user.downloadObj')"
|
||||
@click.prevent="fnModalUploadImportExportTemplate"
|
||||
>
|
||||
{{t('views.system.user.downloadObj')}}
|
||||
{{ t('views.system.user.downloadObj') }}
|
||||
</a-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
Reference in New Issue
Block a user