From 7b932692ee38f490c24f37d773662710ade2b80f Mon Sep 17 00:00:00 2001 From: colin Date: Fri, 20 Dec 2024 17:01:00 +0800 Subject: [PATCH] =?UTF-8?q?feat(users):=20=E5=A2=9E=E5=8A=A0=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E5=AE=9E=E4=BD=93=E5=8F=98=E6=9B=B4=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity-changes/EntityChangeDrawer.vue | 4 +++- .../entity-changes/EntityChangeTable.vue | 1 - .../vben5/packages/@abp/identity/package.json | 1 + .../src/components/users/UserTable.vue | 23 ++++++++++++++++++- 4 files changed, 26 insertions(+), 3 deletions(-) diff --git a/apps/vben5/packages/@abp/auditing/src/components/entity-changes/EntityChangeDrawer.vue b/apps/vben5/packages/@abp/auditing/src/components/entity-changes/EntityChangeDrawer.vue index 2e7262a67..a01b23883 100644 --- a/apps/vben5/packages/@abp/auditing/src/components/entity-changes/EntityChangeDrawer.vue +++ b/apps/vben5/packages/@abp/auditing/src/components/entity-changes/EntityChangeDrawer.vue @@ -38,7 +38,9 @@ const [Drawer, drawerApi] = useVbenDrawer({ diff --git a/apps/vben5/packages/@abp/auditing/src/components/entity-changes/EntityChangeTable.vue b/apps/vben5/packages/@abp/auditing/src/components/entity-changes/EntityChangeTable.vue index bf7c6eb18..f1c341341 100644 --- a/apps/vben5/packages/@abp/auditing/src/components/entity-changes/EntityChangeTable.vue +++ b/apps/vben5/packages/@abp/auditing/src/components/entity-changes/EntityChangeTable.vue @@ -149,7 +149,6 @@ watchEffect(() => { :data="getEntityChanges" :expand-config="{ padding: true, - trigger: 'row', }" :pager-config="pagerConfig" @page-change="onPageChange" diff --git a/apps/vben5/packages/@abp/identity/package.json b/apps/vben5/packages/@abp/identity/package.json index 0a1fad4a5..b19e896c6 100644 --- a/apps/vben5/packages/@abp/identity/package.json +++ b/apps/vben5/packages/@abp/identity/package.json @@ -20,6 +20,7 @@ } }, "dependencies": { + "@abp/auditing": "workspace:*", "@abp/core": "workspace:*", "@abp/permission": "workspace:*", "@abp/request": "workspace:*", diff --git a/apps/vben5/packages/@abp/identity/src/components/users/UserTable.vue b/apps/vben5/packages/@abp/identity/src/components/users/UserTable.vue index 758e31ebd..c1a707a89 100644 --- a/apps/vben5/packages/@abp/identity/src/components/users/UserTable.vue +++ b/apps/vben5/packages/@abp/identity/src/components/users/UserTable.vue @@ -7,10 +7,11 @@ import type { IdentityUserDto } from '../../types/users'; import { computed, defineAsyncComponent, h } from 'vue'; import { useAccess } from '@vben/access'; -import { useVbenModal } from '@vben/common-ui'; +import { useVbenDrawer, useVbenModal } from '@vben/common-ui'; import { createIconifyIcon } from '@vben/icons'; import { $t } from '@vben/locales'; +import { AuditLogPermissions, EntityChangeDrawer } from '@abp/auditing'; import { formatToDateTime, useAbpStore } from '@abp/core'; import { PermissionModal } from '@abp/permission'; import { useVbenVxeGrid } from '@abp/ui'; @@ -45,6 +46,7 @@ const PasswordIcon = createIconifyIcon('carbon:password'); const MenuOutlined = createIconifyIcon('heroicons-outline:menu-alt-3'); const ClaimOutlined = createIconifyIcon('la:id-card-solid'); const PermissionsOutlined = createIconifyIcon('icon-park-outline:permissions'); +const AuditLogIcon = createIconifyIcon('fluent-mdl2:compliance-audit'); const getLockEnd = computed(() => { return (row: IdentityUserDto) => { @@ -159,6 +161,9 @@ const [UserClaimModal, claimModalApi] = useVbenModal({ const [UserPermissionModal, permissionModalApi] = useVbenModal({ connectedComponent: PermissionModal, }); +const [UserChangeDrawer, userChangeDrawerApi] = useVbenDrawer({ + connectedComponent: EntityChangeDrawer, +}); const [Grid, { query }] = useVbenVxeGrid({ formOptions, gridEvents, @@ -198,6 +203,14 @@ const handleMenuClick = async (row: IdentityUserDto, info: MenuInfo) => { claimModalApi.open(); break; } + case 'entity-changes': { + userChangeDrawerApi.setData({ + entityId: row.id, + entityTypeFullName: 'Volo.Abp.Identity.IdentityUser', + }); + userChangeDrawerApi.open(); + break; + } case 'lock': { lockModalApi.setData(row); lockModalApi.open(); @@ -332,6 +345,13 @@ const handleMenuClick = async (row: IdentityUserDto, info: MenuInfo) => { > {{ $t('AppPlatform.Menu:Manage') }} + + {{ $t('AbpAuditLogging.EntitiesChanged') }} +