From 95b605696b07430aadd652102592b933d2c83997 Mon Sep 17 00:00:00 2001 From: WangJunZzz <510423039@qq.com> Date: Fri, 6 Dec 2024 21:50:37 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=92=8C=E5=89=8D=E7=AB=AF=E8=B7=AF=E7=94=B1?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Users/UserAppService.cs | 1 - vben28/package.json | 2 +- vben28/src/router/routes/basic.ts | 3 +-- vben28/src/store/modules/user.ts | 1 - vben28/src/views/admin/users/AbpUser.ts | 7 +++++++ vben28/src/views/admin/users/EditAbpUser.vue | 5 +++-- 6 files changed, 12 insertions(+), 7 deletions(-) diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Users/UserAppService.cs b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Users/UserAppService.cs index 7634967e5..e0cda457f 100644 --- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Users/UserAppService.cs +++ b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Users/UserAppService.cs @@ -109,7 +109,6 @@ public virtual async Task CreateAsync(IdentityUserCreateDto inp [Authorize(IdentityPermissions.Users.Update)] public virtual async Task UpdateAsync(UpdateUserInput input) { - input.UserInfo.IsActive = true; return await _identityUserAppService.UpdateAsync(input.UserId, input.UserInfo); } diff --git a/vben28/package.json b/vben28/package.json index 7940cb02f..b503a2d69 100644 --- a/vben28/package.json +++ b/vben28/package.json @@ -70,7 +70,7 @@ "vue": "3.2.33", "vue-i18n": "^9.1.9", "vue-json-pretty": "^2.0.6", - "vue-router": "^4.0.14", + "vue-router": "4.0.14", "vue-types": "^4.1.1", "xlsx": "^0.18.5", "oidc-client": "^1.11.5", diff --git a/vben28/src/router/routes/basic.ts b/vben28/src/router/routes/basic.ts index 6de261134..b92deea7e 100644 --- a/vben28/src/router/routes/basic.ts +++ b/vben28/src/router/routes/basic.ts @@ -5,7 +5,6 @@ import { LAYOUT, EXCEPTION_COMPONENT, PAGE_NOT_FOUND_NAME, - PAGE_NOT_FOUND_NAME_PATH, } from '/@/router/constant'; // 404 on a page @@ -21,7 +20,7 @@ export const PAGE_NOT_FOUND_ROUTE: AppRouteRecordRaw = { children: [ { path: '/:path(.*)*', - name: PAGE_NOT_FOUND_NAME_PATH, + name: PAGE_NOT_FOUND_NAME, component: EXCEPTION_COMPONENT, meta: { title: 'ErrorPage', diff --git a/vben28/src/store/modules/user.ts b/vben28/src/store/modules/user.ts index 596ec090f..b2af76dd1 100644 --- a/vben28/src/store/modules/user.ts +++ b/vben28/src/store/modules/user.ts @@ -224,7 +224,6 @@ export const useUserStore = defineStore({ */ async logout(goLogin = false) { try { - debugger; if (this.userInfo?.isSts) { await useOidcLogout(); } else { diff --git a/vben28/src/views/admin/users/AbpUser.ts b/vben28/src/views/admin/users/AbpUser.ts index 5cc062681..7f4b980b2 100644 --- a/vben28/src/views/admin/users/AbpUser.ts +++ b/vben28/src/views/admin/users/AbpUser.ts @@ -136,6 +136,13 @@ export const createFormSchema: FormSchema[] = [ ]; export const editFormSchema: FormSchema[] = [ + { + field: 'isActive', + component: 'Input', + label: t('routes.admin.userManagement_name'), + labelWidth: 130, + show: false, + }, { field: 'userName', component: 'Input', diff --git a/vben28/src/views/admin/users/EditAbpUser.vue b/vben28/src/views/admin/users/EditAbpUser.vue index c9a733ea0..9e96ef561 100644 --- a/vben28/src/views/admin/users/EditAbpUser.vue +++ b/vben28/src/views/admin/users/EditAbpUser.vue @@ -83,7 +83,8 @@ export default defineComponent({ name: data.record.name, userName: data.record.userName, email: data.record.email, - phoneNumber: data.record.phoneNumber + phoneNumber: data.record.phoneNumber, + isActive: data.record.isActive, }); }); @@ -127,7 +128,7 @@ export default defineComponent({ userInfo.concurrencyStamp = currentUserInfo.concurrencyStamp; userInfo.roleNames = defaultRolesRef.value; userInfo.password = request.password; - + userInfo.isActive = request.isActive; updateUserInput.userId = currentUserInfo.id; updateUserInput.userInfo = userInfo; await updateUserAsync({