Restore login log management entry

This commit is contained in:
2026-06-10 10:01:06 +08:00
parent defe2d6ef5
commit 17221a93bf
7 changed files with 112 additions and 10 deletions
@@ -41,17 +41,45 @@ export function getDeviceTypeOptions() {
export function getLoginTypeOptions() {
return [
{ label: '密码登录', value: 'password', type: 'info' as TagType },
{ label: '验证码登录', value: 'code', type: 'info' as TagType },
{ label: '二维码登录', value: 'qrcode', type: 'info' as TagType },
{
label: $t('loginLog.passwordLogin'),
type: 'info' as TagType,
value: 'password',
},
{
label: $t('loginLog.codeLogin'),
type: 'info' as TagType,
value: 'code',
},
{
label: $t('loginLog.qrcodeLogin'),
type: 'info' as TagType,
value: 'qrcode',
},
{ label: 'Gitee', value: 'gitee', type: 'success' as TagType },
{ label: 'GitHub', value: 'github', type: 'success' as TagType },
{ label: 'QQ', value: 'qq', type: 'success' as TagType },
{ label: 'Google', value: 'google', type: 'success' as TagType },
{ label: '微信', value: 'wechat', type: 'success' as TagType },
{ label: '微软', value: 'microsoft', type: 'success' as TagType },
{ label: '钉钉', value: 'dingtalk', type: 'success' as TagType },
{ label: '飞书', value: 'feishu', type: 'success' as TagType },
{
label: $t('loginLog.wechatLogin'),
type: 'success' as TagType,
value: 'wechat',
},
{
label: $t('loginLog.microsoftLogin'),
type: 'success' as TagType,
value: 'microsoft',
},
{
label: $t('loginLog.dingtalkLogin'),
type: 'success' as TagType,
value: 'dingtalk',
},
{
label: $t('loginLog.feishuLogin'),
type: 'success' as TagType,
value: 'feishu',
},
];
}
@@ -96,9 +124,9 @@ export function useSearchFormSchema(): VbenFormSchema[] {
{
component: 'Select',
fieldName: 'login_type',
label: '登录方式',
label: $t('loginLog.loginType'),
componentProps: {
placeholder: '请选择登录方式',
placeholder: $t('loginLog.selectLoginType'),
options: getLoginTypeOptions(),
clearable: true,
},
@@ -123,7 +151,7 @@ export function useZqTableColumns(): Column[] {
},
{
key: 'login_type',
title: '登录方式',
title: $t('loginLog.loginType'),
width: 120,
align: 'center' as const,
slots: { default: 'cell-login_type' },