|
@@ -1,5 +1,6 @@
|
|
|
import type { SmartColumn, SmartSearchFormSchema } from '@/components/SmartTable';
|
|
import type { SmartColumn, SmartSearchFormSchema } from '@/components/SmartTable';
|
|
|
import dayjs from 'dayjs';
|
|
import dayjs from 'dayjs';
|
|
|
|
|
+import { Ref, unref } from 'vue';
|
|
|
|
|
|
|
|
export type LoginIdent = 'LOGIN_LOG' | 'INTERFACE_LOG';
|
|
export type LoginIdent = 'LOGIN_LOG' | 'INTERFACE_LOG';
|
|
|
|
|
|
|
@@ -33,6 +34,14 @@ const tableColumns: Array<SmartColumn & { ident?: LoginIdent[] }> = [
|
|
|
field: 'createBy',
|
|
field: 'createBy',
|
|
|
width: 120,
|
|
width: 120,
|
|
|
},
|
|
},
|
|
|
|
|
+ {
|
|
|
|
|
+ title: '{system.views.log.title.tenant}',
|
|
|
|
|
+ field: 'tenantId',
|
|
|
|
|
+ width: 120,
|
|
|
|
|
+ formatter: ({ row }) => {
|
|
|
|
|
+ return row.tenant?.tenantShortName || row.tenant?.tenantName;
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
{
|
|
{
|
|
|
title: '{system.views.log.title.ip}',
|
|
title: '{system.views.log.title.ip}',
|
|
|
field: 'ip',
|
|
field: 'ip',
|
|
@@ -172,8 +181,13 @@ export const getOperationTypeEnum = (t: Function) => {
|
|
|
* 获取搜索表单
|
|
* 获取搜索表单
|
|
|
* @param t
|
|
* @param t
|
|
|
* @param ident
|
|
* @param ident
|
|
|
|
|
+ * @param getIsPlatformTenant
|
|
|
*/
|
|
*/
|
|
|
-export const getSearchFormSchemas = (t: Function, ident: LoginIdent) => {
|
|
|
|
|
|
|
+export const getSearchFormSchemas = (
|
|
|
|
|
+ t: Function,
|
|
|
|
|
+ ident: LoginIdent,
|
|
|
|
|
+ getIsPlatformTenant: Ref<boolean>,
|
|
|
|
|
+) => {
|
|
|
const schemas: Array<SmartSearchFormSchema & { ident?: LoginIdent[] }> = [
|
|
const schemas: Array<SmartSearchFormSchema & { ident?: LoginIdent[] }> = [
|
|
|
{
|
|
{
|
|
|
label: t('system.views.log.title.operation'),
|
|
label: t('system.views.log.title.operation'),
|
|
@@ -226,6 +240,15 @@ export const getSearchFormSchemas = (t: Function, ident: LoginIdent) => {
|
|
|
options: getOperationTypeEnum(t),
|
|
options: getOperationTypeEnum(t),
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
|
|
+ {
|
|
|
|
|
+ label: t('system.views.exception.title.tenant'),
|
|
|
|
|
+ field: 'tenantId',
|
|
|
|
|
+ slot: 'search-tenantId',
|
|
|
|
|
+ searchSymbol: '=',
|
|
|
|
|
+ ifShow() {
|
|
|
|
|
+ return unref(getIsPlatformTenant);
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
];
|
|
];
|
|
|
return schemas.filter((item) => item.ident === undefined || item.ident.includes(ident));
|
|
return schemas.filter((item) => item.ident === undefined || item.ident.includes(ident));
|
|
|
};
|
|
};
|