--中英文国际化

This commit is contained in:
lai
2023-11-09 20:22:57 +08:00
parent c71e56a937
commit 22f2cd9a2e
6 changed files with 54 additions and 53 deletions

View File

@@ -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>