From a77a808b3d13de86c00b570cd056765cbb4e78f5 Mon Sep 17 00:00:00 2001 From: cKey <35512826+colinin@users.noreply.github.com> Date: Mon, 5 Oct 2020 20:27:52 +0800 Subject: [PATCH] Correct any inaccuracies --- ...FileManagementFeatureDefinitionProvider.cs | 2 +- vueJs/src/api/apiresources.ts | 5 +- vueJs/src/api/auditing.ts | 4 +- vueJs/src/api/clients.ts | 4 +- vueJs/src/api/feature-management.ts | 59 +- vueJs/src/api/identityresources.ts | 5 +- vueJs/src/api/organizationunit.ts | 6 +- vueJs/src/api/profile.ts | 56 + vueJs/src/api/roles.ts | 3 +- vueJs/src/api/tenant-management.ts | 3 +- vueJs/src/api/types.ts | 2 +- vueJs/src/api/users.ts | 3 +- vueJs/src/icons/components/index.ts | 2 + vueJs/src/icons/components/logout.ts | 12 + vueJs/src/icons/components/profile.ts | 12 + vueJs/src/icons/svg/logout.svg | 1 + vueJs/src/icons/svg/profile.svg | 1 + vueJs/src/lang/index.ts | 20 +- vueJs/src/layout/components/Navbar/index.vue | 12 +- vueJs/src/mixins/DataListMiXin.ts | 28 + vueJs/src/router/index.ts | 34 + vueJs/src/store/modules/abp.ts | 20 +- vueJs/src/store/modules/user.ts | 1 - vueJs/src/utils/request.ts | 1 - .../views/admin/apigateway/aggregateRoute.vue | 4 +- .../components/RouteGroupCreateOrEditForm.vue | 1 - vueJs/src/views/admin/apigateway/global.vue | 4 +- vueJs/src/views/admin/apigateway/group.vue | 4 +- vueJs/src/views/admin/apigateway/route.vue | 4 +- .../audit-log/components/AuditLogDialog.vue | 1 + .../audit-log/components/AuditLogProfile.vue | 7 +- .../views/admin/auditing/audit-log/index.vue | 58 +- .../components/SecurityLogDialog.vue | 1 + .../admin/auditing/security-log/index.vue | 26 +- .../admin/components/FeatureManagement.vue | 267 ++--- .../ApiResourceCreateOrEditForm.vue | 36 +- .../components/ApiResourceScopeEditForm.vue | 24 +- .../components/ApiResourceSecretEditForm.vue | 26 +- .../identityServer/api-resources/index.vue | 76 +- .../client/components/ClientClaimEditForm.vue | 22 +- .../client/components/ClientCloneForm.vue | 23 +- .../client/components/ClientCreateForm.vue | 27 +- .../client/components/ClientEditForm.vue | 1012 +++++++++-------- .../components/ClientPermissionEditForm.vue | 101 +- .../components/ClientPropertyEditForm.vue | 24 +- .../components/ClientSecretEditForm.vue | 24 +- .../admin/identityServer/client/index.vue | 162 +-- .../identityServer/components/ScopeInput.vue | 1 - .../IdentityResourceCreateOrEditForm.vue | 38 +- .../IdentityResourcePropertyEditForm.vue | 34 +- .../identity-resources/index.vue | 49 +- .../components/RoleOrganizationUint.vue | 9 +- vueJs/src/views/admin/roles/index.vue | 9 +- .../settings/components/SettingEditForm.vue | 5 +- ...nForm.vue => TenantConnectionEditForm.vue} | 41 +- .../components/TenantCreateOrEditForm.vue | 34 +- .../components/TenantFeatureEditForm.vue | 4 +- vueJs/src/views/admin/tenants/index.vue | 50 +- vueJs/src/views/admin/users/index.vue | 10 +- vueJs/src/views/file-management/index.vue | 4 +- .../profile-setting/components/MyProfile.vue | 144 +++ .../profile-setting/components/MySecurity.vue | 0 vueJs/src/views/profile-setting/index.vue | 33 + 63 files changed, 1578 insertions(+), 1117 deletions(-) create mode 100644 vueJs/src/api/profile.ts create mode 100644 vueJs/src/icons/components/logout.ts create mode 100644 vueJs/src/icons/components/profile.ts create mode 100644 vueJs/src/icons/svg/logout.svg create mode 100644 vueJs/src/icons/svg/profile.svg rename vueJs/src/views/admin/tenants/components/{TenantEditConnectionForm.vue => TenantConnectionEditForm.vue} (88%) create mode 100644 vueJs/src/views/profile-setting/components/MyProfile.vue create mode 100644 vueJs/src/views/profile-setting/components/MySecurity.vue create mode 100644 vueJs/src/views/profile-setting/index.vue diff --git a/aspnet-core/modules/file-management/LINGYUN.Abp.FileManagement.Application.Contracts/LINGYUN/Abp/FileManagement/Features/AbpFileManagementFeatureDefinitionProvider.cs b/aspnet-core/modules/file-management/LINGYUN.Abp.FileManagement.Application.Contracts/LINGYUN/Abp/FileManagement/Features/AbpFileManagementFeatureDefinitionProvider.cs index 57edb92ae..272a27e72 100644 --- a/aspnet-core/modules/file-management/LINGYUN.Abp.FileManagement.Application.Contracts/LINGYUN/Abp/FileManagement/Features/AbpFileManagementFeatureDefinitionProvider.cs +++ b/aspnet-core/modules/file-management/LINGYUN.Abp.FileManagement.Application.Contracts/LINGYUN/Abp/FileManagement/Features/AbpFileManagementFeatureDefinitionProvider.cs @@ -38,7 +38,7 @@ namespace LINGYUN.Abp.FileManagement.Features defaultValue: 1.ToString(), displayName: L("Features:DisplayName:MaxUploadFileCount"), description: L("Features:Description:MaxUploadFileCount"), - valueType: new ToggleStringValueType(new NumericValueValidator(1, 10))); + valueType: new FreeTextStringValueType(new NumericValueValidator(1, 10))); } protected ILocalizableString L(string name) diff --git a/vueJs/src/api/apiresources.ts b/vueJs/src/api/apiresources.ts index 4056bf72b..f299a4765 100644 --- a/vueJs/src/api/apiresources.ts +++ b/vueJs/src/api/apiresources.ts @@ -1,5 +1,4 @@ import ApiService from './serviceBase' -import { pagerFormat } from '@/utils/index' import { FullAuditedEntityDto, PagedAndSortedResultRequestDto, PagedResultDto } from './types' const serviceUrl = process.env.VUE_APP_BASE_API @@ -23,9 +22,7 @@ export default class ApiResourceService { let _url = '/api/IdentityServer/ApiResources' _url += '?filter=' + payload.filter _url += '&sorting=' + payload.sorting - // abp设计原因,需要前端计算分页 - _url += '&skipCount=' + pagerFormat(payload.skipCount) * payload.maxResultCount - // _url += '&skipCount=' + pagerFormat(payload.skipCount) + _url += '&skipCount=' + payload.skipCount _url += '&maxResultCount=' + payload.maxResultCount return ApiService.Get>(_url, serviceUrl) } diff --git a/vueJs/src/api/auditing.ts b/vueJs/src/api/auditing.ts index 5b5590718..b91a008f9 100644 --- a/vueJs/src/api/auditing.ts +++ b/vueJs/src/api/auditing.ts @@ -1,4 +1,4 @@ -import { urlStringify, abpPagerFormat } from '@/utils/index' +import { urlStringify } from '@/utils/index' import ApiService from './serviceBase' import { PagedAndSortedResultRequestDto, PagedResultDto } from './types' @@ -12,7 +12,6 @@ export default class AuditingService { public static getAuditLogs(payload: AuditLogGetPaged) { let _url = '/api/auditing/audit-log?' - payload.skipCount = abpPagerFormat(payload.skipCount, payload.maxResultCount) _url += urlStringify(payload) return ApiService.Get>(_url, serviceUrl) } @@ -29,7 +28,6 @@ export default class AuditingService { public static getSecurityLogs(payload: SecurityLogGetPaged) { let _url = '/api/auditing/security-log?' - payload.skipCount = abpPagerFormat(payload.skipCount, payload.maxResultCount) _url += urlStringify(payload) return ApiService.Get>(_url, serviceUrl) } diff --git a/vueJs/src/api/clients.ts b/vueJs/src/api/clients.ts index 1a12fee29..ec06284f6 100644 --- a/vueJs/src/api/clients.ts +++ b/vueJs/src/api/clients.ts @@ -1,5 +1,4 @@ import ApiService from './serviceBase' -import { pagerFormat } from '@/utils/index' import { FullAuditedEntityDto, PagedAndSortedResultRequestDto, PagedResultDto } from './types' const serviceUrl = process.env.VUE_APP_BASE_API @@ -15,8 +14,7 @@ export default class ClientService { let _url = '/api/IdentityServer/Clients' _url += '?filter=' + payload.filter _url += '&sorting=' + payload.sorting - // 因为abp设计的原因, 需要前端组合页面 - _url += '&skipCount=' + pagerFormat(payload.skipCount) * payload.maxResultCount + _url += '&skipCount=' + payload.skipCount _url += '&maxResultCount=' + payload.maxResultCount return ApiService.Get>(_url, serviceUrl) } diff --git a/vueJs/src/api/feature-management.ts b/vueJs/src/api/feature-management.ts index ca09e24e6..50633e181 100644 --- a/vueJs/src/api/feature-management.ts +++ b/vueJs/src/api/feature-management.ts @@ -7,7 +7,7 @@ export default class FeatureManagementService { let _url = '/api/feature-management/features?' _url += 'providerName=' + providerName _url += '&providerKey=' + providerKey - return ApiService.Get(_url, serviceUrl) + return ApiService.Get(_url, serviceUrl) } public static updateFeatures(providerName: string, providerKey: string, features: Features) { @@ -19,8 +19,8 @@ export default class FeatureManagementService { } export class Provider { - providerName!: string - providerKey!: string + Name!: string + Key!: string } export class ValueType { @@ -37,6 +37,7 @@ export class Feature { valueType?: ValueType depth?: number parentName?: string + provider!: Provider constructor( name: string, @@ -54,3 +55,55 @@ export class Features { this.features = new Array() } } + +export class FeatureGroup { + name!: string + displayName?: string + features = new Array() +} + +export class FeatureGroups { + groups = new Array() +} + +/** + * 适用于动态表单的功能节点 + */ +export class FeatureItem { + /** 功能名称 */ + name!: string + /** 显示名称 */ + displayName?: string + /** 当前值 */ + value!: any + /** 说明 */ + description?: string + /** 值类型 */ + valueType?: ValueType + /** 深度 */ + depth?: number + /** 子节点 */ + children!: FeatureItem[] + + /** 构造器 */ + constructor( + name: string, + value: any, + displayName?: string, + description?: string, + valueType?: ValueType, + depth?: number + ) { + this.name = name + this.depth = depth + this.valueType = valueType + this.displayName = displayName + this.description = description + this.children = new Array() + if (value !== null) { + this.value = value.toLowerCase() === 'true' ? true // boolean类型 + : !isNaN(Number(value)) ? Number(value) // number类型 + : value + } + } +} diff --git a/vueJs/src/api/identityresources.ts b/vueJs/src/api/identityresources.ts index e08bccf49..d5594c17b 100644 --- a/vueJs/src/api/identityresources.ts +++ b/vueJs/src/api/identityresources.ts @@ -1,5 +1,4 @@ import ApiService from './serviceBase' -import { pagerFormat } from '@/utils/index' import { FullAuditedEntityDto, PagedResultDto, PagedAndSortedResultRequestDto } from './types' /** 远程服务地址 */ @@ -27,9 +26,7 @@ export default class IdentityResourceService { let _url = '/api/IdentityServer/IdentityResources' _url += '?filter=' + payload.filter _url += '&sorting=' + payload.sorting - // abp设计原因,需要前端计算分页 - _url += '&skipCount=' + pagerFormat(payload.skipCount) * payload.maxResultCount - // _url += '&skipCount=' + pagerFormat(payload.skipCount) + _url += '&skipCount=' + payload.skipCount _url += '&maxResultCount=' + payload.maxResultCount return ApiService.Get>(_url, serviceUrl) } diff --git a/vueJs/src/api/organizationunit.ts b/vueJs/src/api/organizationunit.ts index 865ec9f17..405973308 100644 --- a/vueJs/src/api/organizationunit.ts +++ b/vueJs/src/api/organizationunit.ts @@ -1,5 +1,4 @@ import ApiService from './serviceBase' -import { pagerFormat } from '@/utils/index' import { AuditedEntityDto, PagedResultDto, PagedAndSortedResultRequestDto, ListResultDto } from './types' import { RoleDto } from './roles' import { UserDataDto } from './users' @@ -36,7 +35,7 @@ export default class OrganizationUnitService { let _url = '/api/identity/organization-units' _url += '?filter=' + payload.filter _url += '&sorting=' + payload.sorting - _url += '&skipCount=' + pagerFormat(payload.skipCount) + _url += '&skipCount=' + payload.skipCount _url += '&maxResultCount=' + payload.maxResultCount return ApiService.Get>(_url, serviceUrl) } @@ -120,8 +119,7 @@ export default class OrganizationUnitService { _url += '?id=' + payload.id _url += '&filter=' + payload.filter _url += '&sorting=' + payload.sorting - // abp设计原因,需要前端计算分页 - _url += '&skipCount=' + pagerFormat(payload.skipCount) * payload.maxResultCount + _url += '&skipCount=' + payload.skipCount // _url += '&skipCount=' + pagerFormat(payload.skipCount) _url += '&maxResultCount=' + payload.maxResultCount return ApiService.Get>(_url, serviceUrl) diff --git a/vueJs/src/api/profile.ts b/vueJs/src/api/profile.ts new file mode 100644 index 000000000..dc17ce5af --- /dev/null +++ b/vueJs/src/api/profile.ts @@ -0,0 +1,56 @@ +import ApiService from './serviceBase' + +const IdentityServiceUrl = process.env.VUE_APP_BASE_API + +export default class MyProfileService { + public static getMyProfile() { + const _url = '/api/identity/my-profile' + return ApiService.Get(_url, IdentityServiceUrl) + } + + public static updateMyProfile(payload: UpdateMyProfile) { + const _url = '/api/identity/my-profile' + return ApiService.Put(_url, payload, IdentityServiceUrl) + } + + public static changePassword(payload: ChangePassword) { + const _url = '/api/identity/my-profile/change-password' + return ApiService.Post(_url, payload, IdentityServiceUrl) + } +} + +export class MyProfileBase { + userName?: string + email?: string + name?: string + surname?: string + phoneNumber?: string + + constructor( + name = '', + email = '', + userName = '', + surname = '', + phoneNumber = '' + ) { + this.name = name + this.email = email + this.userName = userName + this.surname = surname + this.phoneNumber = phoneNumber + } +} + +export class MyProfile extends MyProfileBase { + isExternal!: boolean + hasPassword!: boolean + extraProperties?: {[key: string]: any } +} + +export class UpdateMyProfile extends MyProfileBase { +} + +export class ChangePassword { + currentPassword!: string + newPassword!: string +} diff --git a/vueJs/src/api/roles.ts b/vueJs/src/api/roles.ts index d365b1a95..c4911af75 100644 --- a/vueJs/src/api/roles.ts +++ b/vueJs/src/api/roles.ts @@ -1,4 +1,3 @@ -import { pagerFormat } from '@/utils/index' import ApiService from './serviceBase' import { OrganizationUnit } from './organizationunit' import { ListResultDto, PagedAndSortedResultRequestDto, PagedResultDto } from './types' @@ -13,7 +12,7 @@ export default class RoleService { public static getRoles(payload: RoleGetPagedDto) { let _url = '/api/identity/roles' // 因为abp设计的原因, 需要前端组合页面 - _url += '?skipCount=' + pagerFormat(payload.skipCount) * payload.maxResultCount + _url += '?skipCount=' + payload.skipCount _url += '&maxResultCount=' + payload.maxResultCount _url += '&sorting=' + payload.sorting _url += '&filter=' + payload.filter diff --git a/vueJs/src/api/tenant-management.ts b/vueJs/src/api/tenant-management.ts index 65b9c9f3c..6dab8fae4 100644 --- a/vueJs/src/api/tenant-management.ts +++ b/vueJs/src/api/tenant-management.ts @@ -1,4 +1,3 @@ -import { pagerFormat } from '@/utils' import { ListResultDto, PagedResultDto, PagedAndSortedResultRequestDto, FullAuditedEntityDto } from './types' import ApiService from './serviceBase' @@ -28,7 +27,7 @@ export default class TenantService { _url += '?filter=' + payload.filter _url += '&sorting=' + payload.sorting // 因为abp设计的原因, 需要前端组合页面 - _url += '&skipCount=' + pagerFormat(payload.skipCount) * payload.maxResultCount + _url += '&skipCount=' + payload.skipCount _url += '&maxResultCount=' + payload.maxResultCount return ApiService.Get>(_url, serviceUrl) } diff --git a/vueJs/src/api/types.ts b/vueJs/src/api/types.ts index 5884a42a4..989c71f30 100644 --- a/vueJs/src/api/types.ts +++ b/vueJs/src/api/types.ts @@ -77,7 +77,7 @@ export class PagedAndSortedResultRequestDto implements IPagedResultRequest, ISor constructor() { this.sorting = '' this.skipCount = 1 - this.maxResultCount = 30 + this.maxResultCount = 10 } } diff --git a/vueJs/src/api/users.ts b/vueJs/src/api/users.ts index 2c77ae85f..c334adcee 100644 --- a/vueJs/src/api/users.ts +++ b/vueJs/src/api/users.ts @@ -1,5 +1,4 @@ import qs from 'querystring' -import { pagerFormat } from '@/utils/index' import { PagedAndSortedResultRequestDto, FullAuditedEntityDto, PagedResultDto, ListResultDto } from '@/api/types' import { OrganizationUnit } from './organizationunit' import ApiService from './serviceBase' @@ -11,7 +10,7 @@ export default class UserApiService { public static getUsers(input: UsersGetPagedDto) { let _url = '/api/identity/users' // 因为abp设计的原因, 需要前端组合页面 - _url += '?skipCount=' + pagerFormat(input.skipCount) * input.maxResultCount + _url += '?skipCount=' + input.skipCount _url += '&maxResultCount=' + input.maxResultCount if (input.sorting) { _url += '&sorting=' + input.sorting diff --git a/vueJs/src/icons/components/index.ts b/vueJs/src/icons/components/index.ts index 590fdfc69..23985118b 100644 --- a/vueJs/src/icons/components/index.ts +++ b/vueJs/src/icons/components/index.ts @@ -43,6 +43,7 @@ import './like' import './link' import './list' import './lock' +import './logout' import './manager' import './message' import './money' @@ -52,6 +53,7 @@ import './password' import './pdf' import './people' import './peoples' +import './profile' import './qq' import './role' import './route' diff --git a/vueJs/src/icons/components/logout.ts b/vueJs/src/icons/components/logout.ts new file mode 100644 index 000000000..ede0f8a87 --- /dev/null +++ b/vueJs/src/icons/components/logout.ts @@ -0,0 +1,12 @@ +/* eslint-disable */ +/* tslint:disable */ +// @ts-ignore +import icon from 'vue-svgicon' +icon.register({ + 'logout': { + width: 128, + height: 128, + viewBox: '0 0 1024 1024', + data: '' + } +}) diff --git a/vueJs/src/icons/components/profile.ts b/vueJs/src/icons/components/profile.ts new file mode 100644 index 000000000..9a55070e9 --- /dev/null +++ b/vueJs/src/icons/components/profile.ts @@ -0,0 +1,12 @@ +/* eslint-disable */ +/* tslint:disable */ +// @ts-ignore +import icon from 'vue-svgicon' +icon.register({ + 'profile': { + width: 128, + height: 128, + viewBox: '0 0 1024 1024', + data: '' + } +}) diff --git a/vueJs/src/icons/svg/logout.svg b/vueJs/src/icons/svg/logout.svg new file mode 100644 index 000000000..f0db20df9 --- /dev/null +++ b/vueJs/src/icons/svg/logout.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/vueJs/src/icons/svg/profile.svg b/vueJs/src/icons/svg/profile.svg new file mode 100644 index 000000000..b3ae16aa1 --- /dev/null +++ b/vueJs/src/icons/svg/profile.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/vueJs/src/lang/index.ts b/vueJs/src/lang/index.ts index efece6d26..63e08cdbf 100644 --- a/vueJs/src/lang/index.ts +++ b/vueJs/src/lang/index.ts @@ -29,14 +29,13 @@ export const getLocale = () => { if (cookieLanguage) { return cookieLanguage } - // const language = navigator.language.toLowerCase() - // const locales = Object.keys(messages) - // for (const locale of locales) { - // if (language.indexOf(locale) > -1) { - // return locale - // } - // } - + const language = navigator.language.toLowerCase() + const locales = Object.keys(messages) + for (const locale of locales) { + if (language.indexOf(locale) > -1) { + return locale + } + } return 'zh-Hans' } @@ -45,4 +44,9 @@ const i18n = new VueI18n({ messages }) +export function setLanguage(language: string, values: any) { + i18n.mergeLocaleMessage(language, values) + i18n.locale = language +} + export default i18n diff --git a/vueJs/src/layout/components/Navbar/index.vue b/vueJs/src/layout/components/Navbar/index.vue index c50288194..62a83149a 100644 --- a/vueJs/src/layout/components/Navbar/index.vue +++ b/vueJs/src/layout/components/Navbar/index.vue @@ -37,12 +37,14 @@ - {{ $t('navbar.profile') }} + + {{ $t('AbpAccount.PersonalInfo') }} - + - {{ $t('navbar.dashboard') }} + + {{ $t('AbpAccount.PersonalSettings') }} - {{ $t('navbar.logOut') }} + + {{ $t('AbpAccount.Logout') }} @@ -95,7 +98,6 @@ export default class extends Vue { } get name() { - console.log(navigator) return UserModule.name ?? UserModule.userName } diff --git a/vueJs/src/mixins/DataListMiXin.ts b/vueJs/src/mixins/DataListMiXin.ts index 18913d1c6..36487fcd1 100644 --- a/vueJs/src/mixins/DataListMiXin.ts +++ b/vueJs/src/mixins/DataListMiXin.ts @@ -10,12 +10,27 @@ export default class DataListMiXin extends Vue { public dataList = new Array() /** 数据总数 */ public dataTotal = 0 + /** 当前页码 */ + public currentPage = 1 /** 是否正在加载数据 */ public dataLoading = false /** 查询过滤器 *如果继承自分页查询接口的其他过滤类型,需要重写初始化类型 */ public dataFilter = new PagedAndSortedResultRequestDto() + /** 页大小 */ + get pageSize() { + return this.dataFilter.maxResultCount + } + + set pageSize(value: number) { + this.dataFilter.maxResultCount = value + } + + protected processDataFilter() { + this.dataFilter.skipCount = this.currentPage + this.dataFilter.maxResultCount = this.pageSize + } /** * 刷新数据 @@ -39,6 +54,7 @@ export default class DataListMiXin extends Vue { this.dataLoading = true // 这里还可以处理对于过滤器的变动 // 例如 abp 框架的skipCount区别于常见的pageNumber + this.processDataFilter() this.getPagedList(this.dataFilter) .then(res => { this.dataList = res.items @@ -64,6 +80,12 @@ export default class DataListMiXin extends Vue { }) } + /** 重置列表数据 */ + protected resetList() { + this.currentPage = 1 + this.refreshData() + } + /** * 重写以执行具体查询分页数据逻辑 * @param filter 查询过滤器 @@ -80,6 +102,12 @@ export default class DataListMiXin extends Vue { }) } + /** 重置分页数据 */ + protected resetPagedList() { + this.currentPage = 1 + this.refreshPagedData() + } + /** * 排序变更事件 * @param column 事件列 diff --git a/vueJs/src/router/index.ts b/vueJs/src/router/index.ts index d237eb057..3566d6c04 100644 --- a/vueJs/src/router/index.ts +++ b/vueJs/src/router/index.ts @@ -107,6 +107,22 @@ export const constantRoutes: RouteConfig[] = [ ] export const asyncRoutes: RouteConfig[] = [ + { + path: '/icon', + component: Layout, + children: [ + { + path: 'index', + component: () => import(/* webpackChunkName: "icons" */ '@/views/icons/index.vue'), + name: 'Icons', + meta: { + title: 'icons', + icon: 'icon', + noCache: true + } + } + ] + }, { path: '/profile', component: Layout, @@ -125,6 +141,24 @@ export const asyncRoutes: RouteConfig[] = [ } ] }, + { + path: '/profile-setting', + component: Layout, + redirect: '/profile-setting/index', + meta: { hidden: true }, + children: [ + { + path: 'index', + component: () => import(/* webpackChunkName: "profile" */ '@/views/profile-setting/index.vue'), + name: '个人设置', + meta: { + title: '个人设置', + icon: 'setting', + noCache: true + } + } + ] + }, adminRouter, auditingRouter, apigatewayRouter, diff --git a/vueJs/src/store/modules/abp.ts b/vueJs/src/store/modules/abp.ts index af2d5c34d..1d9700d86 100644 --- a/vueJs/src/store/modules/abp.ts +++ b/vueJs/src/store/modules/abp.ts @@ -1,5 +1,5 @@ import store from '@/store' -import i18n from '@/lang/index' +import { setLanguage } from '@/lang/index' import { getOrDefault, setItem } from '@/utils/localStorage' import AbpConfigurationService, { IAbpConfiguration, AbpConfiguration as AbpConfig } from '@/api/abpconfiguration' import { VuexModule, Module, Mutation, Action, getModule } from 'vuex-module-decorators' @@ -22,22 +22,8 @@ class AbpConfiguration extends VuexModule implements IAbpState { @Mutation private SET_ABPLOCALIZER(configuration: IAbpConfiguration) { - const { cultureName } = configuration.localization.currentCulture - const localeMessage = i18n.getLocaleMessage(cultureName) - // const resources: { [key: string]: any} = {} - Object.keys(configuration.localization.values).forEach(key => { - const resource = configuration.localization.values[key] - if (typeof resource !== 'object') return - Object.keys(resource).forEach(key2 => { - if (/'{|{/g.test(resource[key2])) { - resource[key2] = resource[key2].replace(/'{|{/g, '{').replace(/}'|}/g, '}') - } - }) - localeMessage[key] = resource - // resources[key] = resource - }) - i18n.setLocaleMessage(cultureName, localeMessage) - // i18n.mergeLocaleMessage(cultureName, resources) + const { currentCulture, values } = configuration.localization + setLanguage(currentCulture.cultureName, values) } @Action({ rawError: true }) diff --git a/vueJs/src/store/modules/user.ts b/vueJs/src/store/modules/user.ts index 600b5b135..9d8d96865 100644 --- a/vueJs/src/store/modules/user.ts +++ b/vueJs/src/store/modules/user.ts @@ -73,7 +73,6 @@ class User extends VuexModule implements IUserState { this.SET_TOKEN(token) this.SET_REFRESHTOKEN(loginResult.refresh_token) await this.PostLogin() - console.log(this.token) } @Action({ rawError: true }) diff --git a/vueJs/src/utils/request.ts b/vueJs/src/utils/request.ts index 93c68c5cc..48f06d5ea 100644 --- a/vueJs/src/utils/request.ts +++ b/vueJs/src/utils/request.ts @@ -102,7 +102,6 @@ service.interceptors.response.use( return response }, (error) => { - console.log(error.response) if (error.response.status === 401) { UserModule.RefreshSession().then(token => { const config = error.response.config diff --git a/vueJs/src/views/admin/apigateway/aggregateRoute.vue b/vueJs/src/views/admin/apigateway/aggregateRoute.vue index 4f34afba0..e6e8bf42c 100644 --- a/vueJs/src/views/admin/apigateway/aggregateRoute.vue +++ b/vueJs/src/views/admin/apigateway/aggregateRoute.vue @@ -174,8 +174,8 @@ diff --git a/vueJs/src/views/admin/apigateway/components/RouteGroupCreateOrEditForm.vue b/vueJs/src/views/admin/apigateway/components/RouteGroupCreateOrEditForm.vue index aa5693bf2..bcb43c818 100644 --- a/vueJs/src/views/admin/apigateway/components/RouteGroupCreateOrEditForm.vue +++ b/vueJs/src/views/admin/apigateway/components/RouteGroupCreateOrEditForm.vue @@ -117,7 +117,6 @@ export default class extends Vue { private handleAppIdChange(val: any) { if (val) { ApiGateWayService.getRouteGroupByAppId(val).then(router => { - console.log(router) this.apiGateWayRouteGroup = router }) } diff --git a/vueJs/src/views/admin/apigateway/global.vue b/vueJs/src/views/admin/apigateway/global.vue index d2fddd51c..fe3b9d29e 100644 --- a/vueJs/src/views/admin/apigateway/global.vue +++ b/vueJs/src/views/admin/apigateway/global.vue @@ -140,8 +140,8 @@ diff --git a/vueJs/src/views/admin/apigateway/group.vue b/vueJs/src/views/admin/apigateway/group.vue index c121ab8e8..6cd890df0 100644 --- a/vueJs/src/views/admin/apigateway/group.vue +++ b/vueJs/src/views/admin/apigateway/group.vue @@ -156,8 +156,8 @@ diff --git a/vueJs/src/views/admin/apigateway/route.vue b/vueJs/src/views/admin/apigateway/route.vue index 9812a9230..425f9c4fc 100644 --- a/vueJs/src/views/admin/apigateway/route.vue +++ b/vueJs/src/views/admin/apigateway/route.vue @@ -189,8 +189,8 @@ diff --git a/vueJs/src/views/admin/auditing/audit-log/components/AuditLogDialog.vue b/vueJs/src/views/admin/auditing/audit-log/components/AuditLogDialog.vue index a6ce6e2e9..b45054293 100644 --- a/vueJs/src/views/admin/auditing/audit-log/components/AuditLogDialog.vue +++ b/vueJs/src/views/admin/auditing/audit-log/components/AuditLogDialog.vue @@ -3,6 +3,7 @@ :visible="showDialog" :title="$t('AbpAuditLogging.AuditLog')" width="800px" + custom-class="modal-form" :close-on-click-modal="true" @close="onFormClosed" > diff --git a/vueJs/src/views/admin/auditing/audit-log/components/AuditLogProfile.vue b/vueJs/src/views/admin/auditing/audit-log/components/AuditLogProfile.vue index 43bcd2145..bee3ccd1e 100644 --- a/vueJs/src/views/admin/auditing/audit-log/components/AuditLogProfile.vue +++ b/vueJs/src/views/admin/auditing/audit-log/components/AuditLogProfile.vue @@ -131,7 +131,7 @@ name="methodInvoke" style="height:300px;overflow-y:auto;overflow-x:hidden;" > - + - + diff --git a/vueJs/src/views/admin/auditing/audit-log/index.vue b/vueJs/src/views/admin/auditing/audit-log/index.vue index c9f39dfc4..e6222951b 100644 --- a/vueJs/src/views/admin/auditing/audit-log/index.vue +++ b/vueJs/src/views/admin/auditing/audit-log/index.vue @@ -112,7 +112,7 @@ class="filter-item" style="display:block;margin:0 auto; width: 150px;" type="primary" - @click="refreshPagedData" + @click="resetPagedList" > {{ $t('AbpAuditLogging.SecrchLog') }} @@ -157,11 +157,36 @@ + + + + + + diff --git a/vueJs/src/views/admin/identityServer/api-resources/components/ApiResourceCreateOrEditForm.vue b/vueJs/src/views/admin/identityServer/api-resources/components/ApiResourceCreateOrEditForm.vue index e863c6ba0..2a864eaf7 100644 --- a/vueJs/src/views/admin/identityServer/api-resources/components/ApiResourceCreateOrEditForm.vue +++ b/vueJs/src/views/admin/identityServer/api-resources/components/ApiResourceCreateOrEditForm.vue @@ -1,6 +1,16 @@ diff --git a/vueJs/src/views/admin/identityServer/client/components/ClientPropertyEditForm.vue b/vueJs/src/views/admin/identityServer/client/components/ClientPropertyEditForm.vue index 42b1116dc..e84835fa5 100644 --- a/vueJs/src/views/admin/identityServer/client/components/ClientPropertyEditForm.vue +++ b/vueJs/src/views/admin/identityServer/client/components/ClientPropertyEditForm.vue @@ -1,6 +1,14 @@ + + diff --git a/vueJs/src/views/profile-setting/components/MySecurity.vue b/vueJs/src/views/profile-setting/components/MySecurity.vue new file mode 100644 index 000000000..e69de29bb diff --git a/vueJs/src/views/profile-setting/index.vue b/vueJs/src/views/profile-setting/index.vue new file mode 100644 index 000000000..17f54a664 --- /dev/null +++ b/vueJs/src/views/profile-setting/index.vue @@ -0,0 +1,33 @@ + + +