Browse Source

Correct any inaccuracies

pull/100/head
cKey 5 years ago
parent
commit
a77a808b3d
  1. 2
      aspnet-core/modules/file-management/LINGYUN.Abp.FileManagement.Application.Contracts/LINGYUN/Abp/FileManagement/Features/AbpFileManagementFeatureDefinitionProvider.cs
  2. 5
      vueJs/src/api/apiresources.ts
  3. 4
      vueJs/src/api/auditing.ts
  4. 4
      vueJs/src/api/clients.ts
  5. 59
      vueJs/src/api/feature-management.ts
  6. 5
      vueJs/src/api/identityresources.ts
  7. 6
      vueJs/src/api/organizationunit.ts
  8. 56
      vueJs/src/api/profile.ts
  9. 3
      vueJs/src/api/roles.ts
  10. 3
      vueJs/src/api/tenant-management.ts
  11. 2
      vueJs/src/api/types.ts
  12. 3
      vueJs/src/api/users.ts
  13. 2
      vueJs/src/icons/components/index.ts
  14. 12
      vueJs/src/icons/components/logout.ts
  15. 12
      vueJs/src/icons/components/profile.ts
  16. 1
      vueJs/src/icons/svg/logout.svg
  17. 1
      vueJs/src/icons/svg/profile.svg
  18. 20
      vueJs/src/lang/index.ts
  19. 12
      vueJs/src/layout/components/Navbar/index.vue
  20. 28
      vueJs/src/mixins/DataListMiXin.ts
  21. 34
      vueJs/src/router/index.ts
  22. 20
      vueJs/src/store/modules/abp.ts
  23. 1
      vueJs/src/store/modules/user.ts
  24. 1
      vueJs/src/utils/request.ts
  25. 4
      vueJs/src/views/admin/apigateway/aggregateRoute.vue
  26. 1
      vueJs/src/views/admin/apigateway/components/RouteGroupCreateOrEditForm.vue
  27. 4
      vueJs/src/views/admin/apigateway/global.vue
  28. 4
      vueJs/src/views/admin/apigateway/group.vue
  29. 4
      vueJs/src/views/admin/apigateway/route.vue
  30. 1
      vueJs/src/views/admin/auditing/audit-log/components/AuditLogDialog.vue
  31. 7
      vueJs/src/views/admin/auditing/audit-log/components/AuditLogProfile.vue
  32. 58
      vueJs/src/views/admin/auditing/audit-log/index.vue
  33. 1
      vueJs/src/views/admin/auditing/security-log/components/SecurityLogDialog.vue
  34. 26
      vueJs/src/views/admin/auditing/security-log/index.vue
  35. 207
      vueJs/src/views/admin/components/FeatureManagement.vue
  36. 34
      vueJs/src/views/admin/identityServer/api-resources/components/ApiResourceCreateOrEditForm.vue
  37. 22
      vueJs/src/views/admin/identityServer/api-resources/components/ApiResourceScopeEditForm.vue
  38. 24
      vueJs/src/views/admin/identityServer/api-resources/components/ApiResourceSecretEditForm.vue
  39. 58
      vueJs/src/views/admin/identityServer/api-resources/index.vue
  40. 20
      vueJs/src/views/admin/identityServer/client/components/ClientClaimEditForm.vue
  41. 21
      vueJs/src/views/admin/identityServer/client/components/ClientCloneForm.vue
  42. 25
      vueJs/src/views/admin/identityServer/client/components/ClientCreateForm.vue
  43. 28
      vueJs/src/views/admin/identityServer/client/components/ClientEditForm.vue
  44. 37
      vueJs/src/views/admin/identityServer/client/components/ClientPermissionEditForm.vue
  45. 22
      vueJs/src/views/admin/identityServer/client/components/ClientPropertyEditForm.vue
  46. 22
      vueJs/src/views/admin/identityServer/client/components/ClientSecretEditForm.vue
  47. 134
      vueJs/src/views/admin/identityServer/client/index.vue
  48. 1
      vueJs/src/views/admin/identityServer/components/ScopeInput.vue
  49. 36
      vueJs/src/views/admin/identityServer/identity-resources/components/IdentityResourceCreateOrEditForm.vue
  50. 32
      vueJs/src/views/admin/identityServer/identity-resources/components/IdentityResourcePropertyEditForm.vue
  51. 41
      vueJs/src/views/admin/identityServer/identity-resources/index.vue
  52. 9
      vueJs/src/views/admin/organization-unit/components/RoleOrganizationUint.vue
  53. 9
      vueJs/src/views/admin/roles/index.vue
  54. 5
      vueJs/src/views/admin/settings/components/SettingEditForm.vue
  55. 41
      vueJs/src/views/admin/tenants/components/TenantConnectionEditForm.vue
  56. 34
      vueJs/src/views/admin/tenants/components/TenantCreateOrEditForm.vue
  57. 4
      vueJs/src/views/admin/tenants/components/TenantFeatureEditForm.vue
  58. 42
      vueJs/src/views/admin/tenants/index.vue
  59. 10
      vueJs/src/views/admin/users/index.vue
  60. 4
      vueJs/src/views/file-management/index.vue
  61. 144
      vueJs/src/views/profile-setting/components/MyProfile.vue
  62. 0
      vueJs/src/views/profile-setting/components/MySecurity.vue
  63. 33
      vueJs/src/views/profile-setting/index.vue

2
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)

5
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<PagedResultDto<ApiResource>>(_url, serviceUrl)
}

4
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<PagedResultDto<AuditLog>>(_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<PagedResultDto<SecurityLog>>(_url, serviceUrl)
}

4
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<PagedResultDto<Client>>(_url, serviceUrl)
}

59
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<Features>(_url, serviceUrl)
return ApiService.Get<FeatureGroups>(_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<Feature>()
}
}
export class FeatureGroup {
name!: string
displayName?: string
features = new Array<Feature>()
}
export class FeatureGroups {
groups = new Array<FeatureGroup>()
}
/**
*
*/
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<FeatureItem>()
if (value !== null) {
this.value = value.toLowerCase() === 'true' ? true // boolean类型
: !isNaN(Number(value)) ? Number(value) // number类型
: value
}
}
}

5
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<PagedResultDto<IdentityResource>>(_url, serviceUrl)
}

6
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<PagedResultDto<OrganizationUnit>>(_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<PagedResultDto<RoleDto>>(_url, serviceUrl)

56
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<MyProfile>(_url, IdentityServiceUrl)
}
public static updateMyProfile(payload: UpdateMyProfile) {
const _url = '/api/identity/my-profile'
return ApiService.Put<MyProfile>(_url, payload, IdentityServiceUrl)
}
public static changePassword(payload: ChangePassword) {
const _url = '/api/identity/my-profile/change-password'
return ApiService.Post<void>(_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
}

3
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

3
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<PagedResultDto<TenantDto>>(_url, serviceUrl)
}

2
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
}
}

3
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

2
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'

12
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: '<path pid="0" _fill="#333" d="M783.536 240.464a32 32 0 10-45.248 45.248c124.768 124.768 124.768 327.776 0 452.544-124.768 124.768-327.776 124.768-452.544 0s-124.768-327.776 0-452.544a32 32 0 10-45.248-45.248c-149.968 149.968-149.968 393.104 0 543.056s393.104 149.968 543.056 0 149.936-393.088-.016-543.056zM512 512a32 32 0 01-32-32V160a32 32 0 0164 0v320a32 32 0 01-32 32z"/>'
}
})

12
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: '<path pid="0" _fill="#333" d="M639.3 483.2c55.9-39.4 89.3-103.5 89.6-171.9-2.8-120.2-102.5-215.6-222.8-212.9-116.5 2.6-210.3 96.4-212.9 212.9.3 68.4 33.6 132.5 89.6 171.9-137.9 50.4-230 181.1-231.1 327.8.9 65.4 54.6 117.8 120 116.9h478.8c65.4.8 119.1-51.5 120-116.9-1.3-146.7-93.4-277.4-231.2-327.8zM358.4 311.4c-2.1-84.3 64.5-154.3 148.8-156.4 84.3-2.1 154.3 64.5 156.4 148.8S599.1 458 514.8 460.1H511c-83.1 1-151.4-65.6-152.6-148.7zm392 552.8H271.6c-29.7.5-54.2-23.2-54.7-53v-.2c4.4-162.4 139.7-290.5 302.2-286.1 156.2 4.3 281.8 129.9 286.1 286.1-.4 29.7-24.8 53.5-54.5 53.1-.2.1-.2.1-.3.1z"/>'
}
})

1
vueJs/src/icons/svg/logout.svg

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="128px" height="128.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#333333" d="M783.536 240.464a32 32 0 1 0-45.248 45.248c124.768 124.768 124.768 327.776 0 452.544-124.768 124.768-327.776 124.768-452.544 0s-124.768-327.776 0-452.544a32 32 0 1 0-45.248-45.248c-149.968 149.968-149.968 393.104 0 543.056s393.104 149.968 543.056 0 149.936-393.088-0.016-543.056zM512 512a32 32 0 0 1-32-32V160a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32z" /></svg>

After

Width:  |  Height:  |  Size: 641 B

1
vueJs/src/icons/svg/profile.svg

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="128px" height="128.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#333333" d="M639.3 483.2c55.9-39.4 89.3-103.5 89.6-171.9-2.8-120.2-102.5-215.6-222.8-212.9-116.5 2.6-210.3 96.4-212.9 212.9 0.3 68.4 33.6 132.5 89.6 171.9-137.9 50.4-230 181.1-231.1 327.8 0.9 65.4 54.6 117.8 120 116.9h478.8c65.4 0.8 119.1-51.5 120-116.9-1.3-146.7-93.4-277.4-231.2-327.8zM358.4 311.4c-2.1-84.3 64.5-154.3 148.8-156.4 84.3-2.1 154.3 64.5 156.4 148.8S599.1 458 514.8 460.1H511c-83.1 1-151.4-65.6-152.6-148.7z m392 552.8H271.6c-29.7 0.5-54.2-23.2-54.7-53v-0.2c4.4-162.4 139.7-290.5 302.2-286.1 156.2 4.3 281.8 129.9 286.1 286.1-0.4 29.7-24.8 53.5-54.5 53.1-0.2 0.1-0.2 0.1-0.3 0.1z" /></svg>

After

Width:  |  Height:  |  Size: 874 B

20
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

12
vueJs/src/layout/components/Navbar/index.vue

@ -37,12 +37,14 @@
<el-dropdown-menu slot="dropdown">
<router-link to="/profile/">
<el-dropdown-item>
{{ $t('navbar.profile') }}
<svg-icon name="profile" />
{{ $t('AbpAccount.PersonalInfo') }}
</el-dropdown-item>
</router-link>
<router-link to="/">
<router-link to="/profile-setting/">
<el-dropdown-item>
{{ $t('navbar.dashboard') }}
<svg-icon name="setting" />
{{ $t('AbpAccount.PersonalSettings') }}
</el-dropdown-item>
</router-link>
<el-dropdown-item
@ -50,7 +52,8 @@
@click.native="logout"
>
<span style="display:block;">
{{ $t('navbar.logOut') }}
<svg-icon name="logout" />
{{ $t('AbpAccount.Logout') }}
</span>
</el-dropdown-item>
</el-dropdown-menu>
@ -95,7 +98,6 @@ export default class extends Vue {
}
get name() {
console.log(navigator)
return UserModule.name ?? UserModule.userName
}

28
vueJs/src/mixins/DataListMiXin.ts

@ -10,12 +10,27 @@ export default class DataListMiXin extends Vue {
public dataList = new Array<any>()
/** 数据总数 */
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

34
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,

20
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 })

1
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 })

1
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

4
vueJs/src/views/admin/apigateway/aggregateRoute.vue

@ -174,8 +174,8 @@
<Pagination
v-show="dataTotal>0"
:total="dataTotal"
:page.sync="dataFilter.skipCount"
:limit.sync="dataFilter.maxResultCount"
:page.sync="currentPage"
:limit.sync="pageSize"
@pagination="refreshPagedData"
@sort-change="handleSortChange"
/>

1
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
})
}

4
vueJs/src/views/admin/apigateway/global.vue

@ -140,8 +140,8 @@
<Pagination
v-show="dataTotal>0"
:total="dataTotal"
:page.sync="dataFilter.skipCount"
:limit.sync="dataFilter.maxResultCount"
:page.sync="currentPage"
:limit.sync="pageSize"
@pagination="refreshPagedData"
/>

4
vueJs/src/views/admin/apigateway/group.vue

@ -156,8 +156,8 @@
<Pagination
v-show="dataTotal>0"
:total="dataTotal"
:page.sync="dataFilter.skipCount"
:limit.sync="dataFilter.maxResultCount"
:page.sync="currentPage"
:limit.sync="pageSize"
@pagination="refreshPagedData"
/>

4
vueJs/src/views/admin/apigateway/route.vue

@ -189,8 +189,8 @@
<Pagination
v-show="dataTotal>0"
:total="dataTotal"
:page.sync="dataFilter.skipCount"
:limit.sync="dataFilter.maxResultCount"
:page.sync="currentPage"
:limit.sync="pageSize"
@pagination="refreshPagedData"
@sort-change="handleSortChange"
/>

1
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"
>

7
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;"
>
<el-timeline>
<el-timeline class="timeline-card">
<el-timeline-item
v-for="(action, index) in getActions"
:key="index"
@ -173,7 +173,7 @@
name="entitiesChanged"
style="height:300px;overflow-y:auto;overflow-x:hidden;"
>
<el-timeline>
<el-timeline class="timeline-card">
<el-timeline-item
v-for="(entity, index) in getEntitiesChanges"
:key="index"
@ -415,4 +415,7 @@ export default class extends Vue {
</script>
<style lang="scss" scoped>
.timeline-card {
margin: 5px;
}
</style>

58
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"
>
<i class="el-icon-search" />
{{ $t('AbpAuditLogging.SecrchLog') }}
@ -157,11 +157,36 @@
</el-tag>
</template>
</el-table-column>
<el-table-column
:label="$t('AbpAuditLogging.HttpMethod')"
prop="httpMethod"
sortable
width="150px"
align="center"
>
<template slot-scope="{row}">
<el-tag
:type="row.httpMethod | httpMethodFilter"
>
{{ row.httpMethod }}
</el-tag>
</template>
</el-table-column>
<el-table-column
:label="$t('AbpAuditLogging.ExecutionTime')"
prop="executionTime"
sortable
width="200px"
>
<template slot-scope="{row}">
<span>{{ row.executionTime | dateTimeFormatFilter }}</span>
</template>
</el-table-column>
<el-table-column
:label="$t('AbpAuditLogging.ExecutionDuration')"
prop="executionDuration"
sortable
width="130px"
width="160px"
align="center"
>
<template slot-scope="{row}">
@ -176,7 +201,7 @@
:label="$t('AbpAuditLogging.HttpStatusCode')"
prop="httpStatusCode"
sortable
width="100px"
width="130px"
align="center"
>
<template slot-scope="{row}">
@ -231,21 +256,6 @@
<span>{{ row.clientIpAddress }}</span>
</template>
</el-table-column>
<el-table-column
:label="$t('AbpAuditLogging.HttpMethod')"
prop="httpMethod"
sortable
width="150px"
align="center"
>
<template slot-scope="{row}">
<el-tag
:type="row.httpMethod | httpMethodFilter"
>
{{ row.httpMethod }}
</el-tag>
</template>
</el-table-column>
<el-table-column
:label="$t('operaActions')"
align="center"
@ -276,8 +286,8 @@
<pagination
v-show="dataTotal>0"
:total="dataTotal"
:page.sync="dataFilter.skipCount"
:limit.sync="dataFilter.maxResultCount"
:page.sync="currentPage"
:limit.sync="pageSize"
@pagination="refreshPagedData"
@sort-change="handleSortChange"
/>
@ -291,6 +301,7 @@
</template>
<script lang="ts">
import { dateFormat, abpPagerFormat } from '@/utils'
import { checkPermission } from '@/utils/permission'
import AuditingService, { AuditLog, AuditLogGetPaged } from '@/api/auditing'
import DataListMiXin from '@/mixins/DataListMiXin'
@ -313,6 +324,9 @@ const statusMap: { [key: string]: string } = {
AuditLogDialog
},
filters: {
dateTimeFormatFilter(dateTime: Date) {
return dateFormat(new Date(dateTime), 'YYYY-mm-dd HH:MM:SS:NS')
},
httpMethodFilter(httpMethod: string) {
return statusMap[httpMethod]
},
@ -357,6 +371,10 @@ export default class extends mixins(DataListMiXin) {
this.refreshPagedData()
}
protected processDataFilter() {
this.dataFilter.skipCount = abpPagerFormat(this.currentPage, this.pageSize)
}
protected getPagedList(filter: any) {
return AuditingService.getAuditLogs(filter)
}

1
vueJs/src/views/admin/auditing/security-log/components/SecurityLogDialog.vue

@ -3,6 +3,7 @@
:visible="showDialog"
:title="$t('AbpAuditLogging.SecurityLog')"
width="800px"
custom-class="modal-form"
:close-on-click-modal="true"
@close="onFormClosed"
>

26
vueJs/src/views/admin/auditing/security-log/index.vue

@ -84,7 +84,7 @@
class="filter-item"
style="display:block;margin:0 auto; width: 150px;"
type="primary"
@click="refreshPagedData"
@click="resetPagedList"
>
<i class="el-icon-search" />
{{ $t('AbpAuditLogging.SecrchLog') }}
@ -117,6 +117,16 @@
<span>{{ row.applicationName }}</span>
</template>
</el-table-column>
<el-table-column
:label="$t('AbpAuditLogging.CreationTime')"
prop="creationTime"
sortable
width="200px"
>
<template slot-scope="{row}">
<span>{{ row.creationTime | dateTimeFormatFilter }}</span>
</template>
</el-table-column>
<el-table-column
:label="$t('AbpAuditLogging.UserName')"
prop="userName"
@ -213,8 +223,8 @@
<pagination
v-show="dataTotal>0"
:total="dataTotal"
:page.sync="dataFilter.skipCount"
:limit.sync="dataFilter.maxResultCount"
:page.sync="currentPage"
:limit.sync="pageSize"
@pagination="refreshPagedData"
@sort-change="handleSortChange"
/>
@ -228,6 +238,7 @@
</template>
<script lang="ts">
import { dateFormat, abpPagerFormat } from '@/utils'
import { checkPermission } from '@/utils/permission'
import AuditingService, { SecurityLog, SecurityLogGetPaged } from '@/api/auditing'
import DataListMiXin from '@/mixins/DataListMiXin'
@ -241,6 +252,11 @@ import SecurityLogDialog from './components/SecurityLogDialog.vue'
Pagination,
SecurityLogDialog
},
filters: {
dateTimeFormatFilter(dateTime: Date) {
return dateFormat(new Date(dateTime), 'YYYY-mm-dd HH:MM:SS:NS')
}
},
methods: {
checkPermission
}
@ -254,6 +270,10 @@ export default class extends mixins(DataListMiXin) {
this.refreshPagedData()
}
protected processDataFilter() {
this.dataFilter.skipCount = abpPagerFormat(this.currentPage, this.pageSize)
}
protected getPagedList(filter: any) {
return AuditingService.getSecurityLogs(filter)
}

207
vueJs/src/views/admin/components/FeatureManagement.vue

@ -2,66 +2,75 @@
<div class="app-container">
<el-form
ref="frmFeature"
:model="features"
label-width="100px"
:model="featureGroups"
label-width="130px"
>
<el-tabs v-model="selectTab">
<el-tab-pane
v-for="(feature, fi) in features.features"
v-for="(group, gi) in featureGroups.groups"
:key="group.name"
:label="group.displayName"
:name="group.name"
>
<div
v-for="(feature, fi) in group.features"
:key="feature.name"
:label="feature.displayName"
:name="feature.name"
>
<el-form-item
v-for="(featureChildren, fci) in feature.children"
:key="featureChildren.name"
:label="featureChildren.displayName"
:prop="'features.' + fi + '.children.' + fci + '.value'"
:rules="featureChildren.valueType.validator | inputRuleFilter(localizer)"
v-if="feature.valueType !== null"
:label="feature.displayName"
:prop="'groups.' + gi + '.features.' + fi + '.value'"
:rules="feature.valueType.validator | inputRuleFilter(localizer)"
>
<el-popover
:ref="'popover_' + fi + '_' + fci"
:ref="'popover_' + gi + '_' + fi"
trigger="hover"
:title="featureChildren.displayName"
:content="featureChildren.description"
:title="feature.displayName"
:content="feature.description"
/>
<span
slot="label"
v-popover="'popover_' + fi + '_' + fci"
>{{ featureChildren.displayName }}</span>
v-popover="'popover_' + gi + '_' + fi"
>{{ feature.displayName }}</span>
<div
v-if="featureChildren.valueType.name === 'ToggleStringValueType'"
v-if="feature.valueType.name === 'ToggleStringValueType'"
>
<el-switch
v-if="featureChildren.valueType.validator.name === 'BOOLEAN'"
v-model="featureChildren.value"
:value="getBooleanValue(feature.value)"
@change="(value) => handleCheckBoxValueChanged(feature, value)"
/>
</div>
<div
v-else-if="feature.valueType.name === 'FreeTextStringValueType'"
>
<el-input
v-else-if="featureChildren.valueType.validator.name === 'NUMERIC'"
v-model.number="featureChildren.value"
v-if="feature.valueType.validator.name === 'NUMERIC'"
v-model.number="feature.value"
type="number"
/>
<el-input
v-else-if="featureChildren.valueType.validator.name === 'STRING'"
v-model="featureChildren.value"
v-else
v-model="feature.value"
type="text"
/>
</div>
<div
v-else-if="featureChildren.valueType.name === 'SELECTION'"
v-else-if="feature.valueType.name === 'SelectionStringValueType'"
>
<el-select
v-model="featureChildren.value"
v-model="feature.value"
style="width: 100%;"
>
<el-option
v-for="valueItem in featureChildren.valueType.itemSource.items"
v-for="valueItem in feature.valueType.itemSource.items"
:key="valueItem.value"
:label="valueItem.displayText"
:label="localizer(valueItem.displayText.resourceName + ':' + valueItem.displayText.name)"
:value="valueItem.value"
/>
</el-select>
</div>
</el-form-item>
</div>
</el-tab-pane>
</el-tabs>
<el-button
@ -83,80 +92,21 @@
<script lang="ts">
import { Component, Prop, Vue, Watch } from 'vue-property-decorator'
import FeatureManagementService, { ValueType, Feature, Features } from '@/api/feature-management'
import FeatureManagementService, { Feature, FeatureGroups, Features } from '@/api/feature-management'
import { ElForm } from 'element-ui/types/form'
/**
* 适用于动态表单的功能节点列表
*/
class FeatureItems {
features = new Array<FeatureItem>()
}
/**
* 适用于动态表单的功能节点
*/
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<FeatureItem>()
if (value !== null) {
this.value = value.toLowerCase() === 'true' ? true // boolean
: !isNaN(Number(value)) ? Number(value) // number
: value
}
}
/**
* 创建子节点
* @feature 子节点
*/
public appendChildren(feature: FeatureItem) {
this.children.push(feature)
@Component({
name: 'FeatureManagement',
computed: {
getBooleanValue() {
return (value: any) => {
if (value === 'true') {
return true
}
/**
* 获取子节点
* @name 节点名称
*/
public getChildren(name: string) {
const childrenIndex = this.children.findIndex(feature => feature.name === name)
if (childrenIndex >= 0) {
return this.children[childrenIndex]
return false
}
return undefined
}
}
@Component({
name: 'FeatureManagement',
},
filters: {
/**
* 动态处理功能表单验证
@ -214,6 +164,9 @@ export default class extends Vue {
@Prop({ default: '' })
private providerKey!: string
@Prop({ default: false })
private loadFeature!: boolean
/**
* 默认选择tab选项卡
* 如果不定义的话,动态组合的表单需要手动点击一次才会显示?
@ -222,13 +175,21 @@ export default class extends Vue {
/**
* 用于拼接动态表单的功能数据,需要把abp返回的数据做一次调整
*/
private features = new FeatureItems()
// private features = new FeatureItems()
@Watch('providerKey', { immediate: true })
private featureGroups = new FeatureGroups()
mounted() {
this.handleGetFeatures()
}
@Watch('providerKey')
onProviderKeyChanged() {
if (this.providerKey) {
this.handleGetFeatures()
}
private handleCheckBoxValueChanged(feature: Feature, value: any) {
feature.value = value.toString()
}
/**
@ -243,46 +204,31 @@ export default class extends Vue {
* 获取功能列表
*/
private handleGetFeatures() {
if (this.loadFeature && this.providerKey) {
FeatureManagementService.getFeatures(this.providerName, this.providerKey).then(res => {
this.features = new FeatureItems()
res.features.forEach(feature => {
const featureItem = new FeatureItem(
feature.name,
feature.value,
feature.displayName,
feature.description,
feature.valueType,
feature.depth
)
if (feature.parentName) {
const children = this.features.features.find(f => f.name === feature.parentName)
if (children) {
children.appendChildren(featureItem)
} else {
this.features.features.push(featureItem)
}
} else {
this.features.features.push(featureItem)
this.featureGroups = res
if (this.featureGroups.groups.length > 0) {
this.selectTab = this.featureGroups.groups[0].name
}
})
// ?
if (this.features.features.length > 0) {
this.selectTab = this.features.features[0].name
}
})
}
/**
* 保存变更
*/
private onSave() {
if (this.features.features.length > 0) {
if (this.featureGroups.groups.length > 0) {
const frmFeature = this.$refs.frmFeature as any
frmFeature.validate((valid: boolean) => {
if (valid) {
const updateFeatures = new Features()
this.features.features.forEach(feature => {
this.getChangedFeatures(feature, updateFeatures)
this.featureGroups.groups.forEach(group => {
group.features.forEach(feature => {
if (feature.valueType != null) {
updateFeatures.features.push(new Feature(feature.name, feature.value))
}
})
})
FeatureManagementService
.updateFeatures(this.providerName, this.providerKey, updateFeatures)
@ -295,23 +241,12 @@ export default class extends Vue {
}
}
/**
* 递归获取abp的功能接口格式数据
*/
private getChangedFeatures(feature: FeatureItem, features: Features) {
const updateFeature = new Feature(feature.name, feature.value)
features.features.push(updateFeature)
feature.children.forEach(children => {
this.getChangedFeatures(children, features)
})
}
/**
* 关闭模态窗口
*/
private onClosed() {
this.$emit('closed')
this.resetFeature()
this.$emit('closed')
}
}
</script>

34
vueJs/src/views/admin/identityServer/api-resources/components/ApiResourceCreateOrEditForm.vue

@ -1,6 +1,16 @@
<template>
<el-dialog
v-el-draggable-dialog
width="800px"
:visible="showDialog"
:title="title"
custom-class="modal-form"
:show-close="false"
:close-on-click-modal="false"
:close-on-press-escape="false"
@close="onFormClosed(false)"
>
<div class="app-container">
<div class="filter-container">
<el-form
ref="formApiResource"
label-width="100px"
@ -70,7 +80,7 @@
</el-form-item>
</el-form>
</div>
</div>
</el-dialog>
</template>
<script lang="ts">
@ -85,6 +95,12 @@ import ElInputTagEx from '@/components/InputTagEx/index.vue'
}
})
export default class extends Vue {
@Prop({ default: false })
private showDialog!: boolean
@Prop({ default: '' })
private title!: string
@Prop({ default: '' })
private apiResourceId!: string
@ -128,8 +144,7 @@ export default class extends Vue {
this.apiResource = resource
const successMessage = this.l('identityServer.updateApiResourceSuccess', { name: resource.name })
this.$message.success(successMessage)
frmApiResource.resetFields()
this.$emit('closed', true)
this.onFormClosed(true)
})
} else {
const createApiResource = ApiResourceCreate.create(this.apiResource)
@ -137,17 +152,20 @@ export default class extends Vue {
this.apiResource = resource
const successMessage = this.l('identityServer.createApiResourceSuccess', { name: resource.name })
this.$message.success(successMessage)
frmApiResource.resetFields()
this.$emit('closed', true)
this.onFormClosed(true)
})
}
}
})
}
private onCancel() {
private onFormClosed(changed: boolean) {
this.resetFields()
this.$emit('closed', false)
this.$emit('closed', changed)
}
private onCancel() {
this.onFormClosed(false)
}
public resetFields() {

22
vueJs/src/views/admin/identityServer/api-resources/components/ApiResourceScopeEditForm.vue

@ -1,6 +1,14 @@
<template>
<el-dialog
v-el-draggable-dialog
width="800px"
:visible="showDialog"
:title="$t('identityServer.apiResourceScope')"
custom-class="modal-form"
:show-close="false"
@close="onFormClosed"
>
<div class="app-container">
<div class="filter-container">
<el-form
v-if="checkPermission(['IdentityServer.ApiResources.Secrets.Create'])"
ref="formApiScope"
@ -141,7 +149,7 @@
</template>
</el-table-column>
</el-table>
</div>
</el-dialog>
</template>
<script lang="ts">
@ -170,6 +178,9 @@ import ElInputTagEx from '@/components/InputTagEx/index.vue'
}
})
export default class extends Vue {
@Prop({ default: false })
private showDialog!: boolean
@Prop({ default: '' })
private apiResourceId!: string
@ -220,13 +231,18 @@ export default class extends Vue {
this.apiScopes.push(scope)
const successMessage = this.l('identityServer.createApiScopeSuccess', { name: this.apiScope.name })
this.$message.success(successMessage)
frmApiScope.resetFields()
this.$emit('apiScopeChanged')
this.onFormClosed()
})
}
})
}
private onFormClosed() {
this.resetFields()
this.$emit('closed')
}
public resetFields() {
const frmApiScope = this.$refs.formApiScope as any
frmApiScope.resetFields()

24
vueJs/src/views/admin/identityServer/api-resources/components/ApiResourceSecretEditForm.vue

@ -1,6 +1,14 @@
<template>
<el-dialog
v-el-draggable-dialog
width="800px"
:visible="showDialog"
:title="$t('identityServer.apiResourceSecret')"
custom-class="modal-form"
:show-close="false"
@close="onFormClosed"
>
<div class="app-container">
<div class="filter-container">
<el-form
v-if="checkPermission(['IdentityServer.ApiResources.Secrets.Create'])"
ref="formApiSecret"
@ -185,7 +193,7 @@
</template>
</el-table-column>
</el-table>
</div>
</el-dialog>
</template>
<script lang="ts">
@ -210,6 +218,9 @@ import { checkPermission } from '@/utils/permission'
}
})
export default class extends Vue {
@Prop({ default: false })
private showDialog!: boolean
@Prop({ default: '' })
private apiResourceId!: string
@ -263,14 +274,19 @@ export default class extends Vue {
this.apiSecrets.push(secret)
const successMessage = this.l('identityServer.createApiSecretSuccess', { type: this.apiSecret.type })
this.$message.success(successMessage)
frmApiSecret.resetFields()
this.$emit('apiSecretChanged')
this.onFormClosed()
})
}
})
}
public resetFields() {
private onFormClosed() {
this.resetFields()
this.$emit('closed')
}
private resetFields() {
const frmApiSecret = this.$refs.formApiSecret as any
frmApiSecret.resetFields()
}

58
vueJs/src/views/admin/identityServer/api-resources/index.vue

@ -167,66 +167,39 @@
<Pagination
v-show="dataTotal>0"
:total="dataTotal"
:page.sync="dataFilter.skipCount"
:limit.sync="dataFilter.maxResultCount"
:page.sync="currentPage"
:limit.sync="pageSize"
@pagination="refreshPagedData"
@sort-change="handleSortChange"
/>
<el-dialog
v-el-draggable-dialog
width="800px"
:visible.sync="showEditApiResourceDialog"
<api-resource-create-or-edit-form
:show-dialog="showEditApiResourceDialog"
:title="editApiResourceTitle"
custom-class="modal-form"
:show-close="false"
:close-on-click-modal="false"
:close-on-press-escape="false"
>
<ApiResourceCreateOrEditForm
:api-resource-id="editApiResource.id"
@closed="handleApiResourceEditFormClosed"
/>
</el-dialog>
<el-dialog
v-el-draggable-dialog
width="800px"
:visible.sync="showEditApiSecretDialog"
:title="$t('identityServer.apiResourceSecret')"
custom-class="modal-form"
:show-close="false"
@closed="handleApiSecretEditFormClosed"
>
<ApiSecretEditForm
ref="formApiSecret"
<api-secret-edit-form
:show-dialog="showEditApiSecretDialog"
:api-resource-id="editApiResource.id"
:api-secrets="editApiResource.secrets"
@apiSecretChanged="refreshPagedData"
@closed="handleApiSecretEditFormClosed"
/>
</el-dialog>
<el-dialog
v-el-draggable-dialog
width="800px"
:visible.sync="showEditApiScopeDialog"
:title="$t('identityServer.apiResourceScope')"
custom-class="modal-form"
:show-close="false"
@closed="handleApiScopeEditFormClosed"
>
<ApiScopeEditForm
ref="formApiScope"
<api-scope-edit-form
:show-dialog="showEditApiScopeDialog"
:api-resource-id="editApiResource.id"
:api-scopes="editApiResource.scopes"
@apiSecretChanged="refreshPagedData"
@closed="handleApiScopeEditFormClosed"
/>
</el-dialog>
</div>
</template>
<script lang="ts">
import { dateFormat } from '@/utils/index'
import { dateFormat, abpPagerFormat } from '@/utils/index'
import { checkPermission } from '@/utils/permission'
import DataListMiXin from '@/mixins/DataListMiXin'
import Component, { mixins } from 'vue-class-component'
@ -277,6 +250,10 @@ export default class extends mixins(DataListMiXin) {
this.refreshPagedData()
}
protected processDataFilter() {
this.dataFilter.skipCount = abpPagerFormat(this.currentPage, this.pageSize)
}
protected getPagedList(filter: any) {
return ApiResourceService.getApiResources(filter)
}
@ -294,7 +271,6 @@ export default class extends mixins(DataListMiXin) {
private handleApiResourceEditFormClosed(changed: boolean) {
this.editApiResourceTitle = ''
this.editApiResource = ApiResource.empty()
this.showEditApiResourceDialog = false
if (changed) {
this.refreshPagedData()
@ -303,14 +279,10 @@ export default class extends mixins(DataListMiXin) {
private handleApiSecretEditFormClosed() {
this.showEditApiSecretDialog = false
const frmApiSecret = this.$refs.formApiSecret as ApiSecretEditForm
frmApiSecret.resetFields()
}
private handleApiScopeEditFormClosed() {
this.showEditApiScopeDialog = false
const frmApiScope = this.$refs.formApiScope as ApiScopeEditForm
frmApiScope.resetFields()
}
private handleDeleteApiResource(id: string, name: string) {

20
vueJs/src/views/admin/identityServer/client/components/ClientClaimEditForm.vue

@ -1,6 +1,14 @@
<template>
<el-dialog
v-el-draggable-dialog
width="800px"
:visible="showDialog"
:title="$t('identityServer.clientClaim')"
custom-class="modal-form"
:show-close="false"
@close="onFormClosed"
>
<div class="app-container">
<div class="filter-container">
<el-form
ref="formClientClaim"
label-width="100px"
@ -92,7 +100,7 @@
</template>
</el-table-column>
</el-table>
</div>
</el-dialog>
</template>
<script lang="ts">
@ -107,6 +115,9 @@ import { checkPermission } from '@/utils/permission'
}
})
export default class extends Vue {
@Prop({ default: false })
private showDialog!: boolean
@Prop({ default: '' })
private clientId!: string
@ -165,6 +176,11 @@ export default class extends Vue {
})
}
private onFormClosed() {
this.resetFields()
this.$emit('closed')
}
public resetFields() {
const frmClientClaim = this.$refs.formClientClaim as any
frmClientClaim.resetFields()

21
vueJs/src/views/admin/identityServer/client/components/ClientCloneForm.vue

@ -1,6 +1,16 @@
<template>
<el-dialog
v-el-draggable-dialog
width="800px"
:visible="showDialog"
:title="$t('identityServer.cloneClint')"
custom-class="modal-form"
:show-close="false"
:close-on-click-modal="false"
:close-on-press-escape="false"
@close="onFormClosed"
>
<div class="app-container">
<div class="filter-container">
<el-form
ref="formCloneClient"
label-width="175px"
@ -117,7 +127,7 @@
</el-form-item>
</el-form>
</div>
</div>
</el-dialog>
</template>
<script lang="ts">
@ -128,6 +138,9 @@ import { Component, Vue, Prop, Watch } from 'vue-property-decorator'
name: 'ClientCloneForm'
})
export default class extends Vue {
@Prop({ default: false })
private showDialog!: boolean
@Prop({ default: '' })
private clientId!: string
@ -165,6 +178,10 @@ export default class extends Vue {
})
}
private onFormClosed() {
this.onCancel()
}
private onCancel() {
this.resetFields()
this.$emit('closed')

25
vueJs/src/views/admin/identityServer/client/components/ClientCreateForm.vue

@ -1,6 +1,14 @@
<template>
<el-dialog
v-el-draggable-dialog
width="800px"
:visible="showDialog"
:title="$t('identityServer.createClient')"
custom-class="modal-form"
:show-close="false"
@close="onFormClosed(false)"
>
<div class="app-container">
<div class="filter-container">
<el-form
ref="formClient"
label-width="100px"
@ -59,12 +67,12 @@
</el-form-item>
</el-form>
</div>
</div>
</el-dialog>
</template>
<script lang="ts">
import ClientService, { ClientCreate } from '@/api/clients'
import { Component, Vue } from 'vue-property-decorator'
import { Component, Vue, Prop } from 'vue-property-decorator'
import ElInputTagEx from '@/components/InputTagEx/index.vue'
@Component({
@ -74,6 +82,9 @@ import ElInputTagEx from '@/components/InputTagEx/index.vue'
}
})
export default class extends Vue {
@Prop({ default: false })
private showDialog!: boolean
private client: ClientCreate
private clientRules = {
clientId: [
@ -96,14 +107,18 @@ export default class extends Vue {
ClientService.createClient(this.client).then(client => {
const successMessage = this.l('identityServer.createClientSuccess', { id: client.clientId })
this.$message.success(successMessage)
frmClient.resetFields()
this.$emit('clientChanged')
this.$emit('closed')
this.onFormClosed(true)
})
}
})
}
private onFormClosed(changed: boolean) {
this.resetFields()
this.$emit('closed', changed)
}
public resetFields() {
const frmClient = this.$refs.formClient as any
frmClient.resetFields()

28
vueJs/src/views/admin/identityServer/client/components/ClientEditForm.vue

@ -1,4 +1,13 @@
<template>
<el-dialog
v-el-draggable-dialog
width="800px"
:visible="showDialog"
:title="$t('identityServer.updateClientByName', {name: client.clientName})"
custom-class="modal-form"
:show-close="false"
@close="onFormClosed(false)"
>
<el-form
ref="formClient"
label-width="100px"
@ -516,6 +525,7 @@
</el-button>
</el-form-item>
</el-form>
</el-dialog>
</template>
<script lang="ts">
@ -530,6 +540,9 @@ import ClientService, { Client, ClientUpdate } from '@/api/clients'
}
})
export default class extends Vue {
@Prop({ default: false })
private showDialog!: boolean
@Prop({ default: '' })
private clientId!: string
@ -601,17 +614,24 @@ export default class extends Vue {
this.client = clientDto
const successMessage = this.l('identityServer.updateClientSuccess', { id: this.client.clientId })
this.$message.success(successMessage)
clientEditForm.resetFields()
this.$emit('closed', true)
this.onFormClosed(true)
})
}
})
}
private onCancel() {
private onFormClosed(changed: boolean) {
this.resetFormFields()
this.$emit('closed', changed)
}
private resetFormFields() {
const clientEditForm = this.$refs.formClient as any
clientEditForm.resetFields()
this.$emit('closed', false)
}
private onCancel() {
this.onFormClosed(false)
}
private l(name: string, values?: any[] | { [key: string]: any }) {

37
vueJs/src/views/admin/identityServer/client/components/ClientPermissionEditForm.vue

@ -1,4 +1,13 @@
<template>
<el-dialog
v-el-draggable-dialog
width="800px"
:visible="showDialog"
:title="$t('identityServer.clientPermission')"
custom-class="modal-form"
:show-close="false"
@close="onFormClosed"
>
<el-form
ref="formClient"
label-width="100px"
@ -6,7 +15,7 @@
label-position="top"
>
<el-form-item v-if="hasLoadPermission">
<PermissionTree
<permission-tree
ref="PermissionTree"
:expanded="false"
:readonly="!checkPermission(['IdentityServer.Clients.ManagePermissions'])"
@ -33,6 +42,7 @@
</el-button>
</el-form-item>
</el-form>
</el-dialog>
</template>
<script lang="ts">
@ -52,6 +62,9 @@ import PermissionService, { PermissionDto, UpdatePermissionsDto } from '@/api/pe
}
})
export default class extends Vue {
@Prop({ default: false })
private showDialog!: boolean
/** 客户端标识 */
@Prop({ default: '' })
private clientId!: string
@ -74,9 +87,17 @@ export default class extends Vue {
}
/** 监听客户端标识变更事件,刷新客户端权限数据 */
@Watch('clientId', { immediate: true })
@Watch('clientId')
private onClientIdChanged() {
if (this.clientId) {
this.handledGetClientPermissions()
}
mounted() {
this.handledGetClientPermissions()
}
private handledGetClientPermissions() {
if (this.showDialog && this.clientId) {
PermissionService.getPermissionsByKey('C', this.clientId).then(permission => {
this.clientPermission = permission
this.hasLoadPermission = true
@ -98,16 +119,18 @@ export default class extends Vue {
const setClientPermissions = new UpdatePermissionsDto()
setClientPermissions.permissions = this.editClientPermissions
PermissionService.setPermissionsByKey('C', this.clientId, setClientPermissions).then(() => {
this.onCancel()
this.onFormClosed()
})
}
}
private onFormClosed() {
this.$emit('closed')
}
/** 取消操作 */
private onCancel() {
const permissionTree = this.$refs.PermissionTree as PermissionTree
permissionTree.resetPermissions()
this.$emit('closed')
this.onFormClosed()
}
}
</script>

22
vueJs/src/views/admin/identityServer/client/components/ClientPropertyEditForm.vue

@ -1,6 +1,14 @@
<template>
<el-dialog
v-el-draggable-dialog
width="800px"
:visible="showDialog"
:title="$t('identityServer.clientProperty')"
custom-class="modal-form"
:show-close="false"
@close="onFormClosed"
>
<div class="app-container">
<div class="filter-container">
<el-form
ref="formClientProperty"
label-width="100px"
@ -92,7 +100,7 @@
</template>
</el-table-column>
</el-table>
</div>
</el-dialog>
</template>
<script lang="ts">
@ -107,6 +115,9 @@ import { checkPermission } from '@/utils/permission'
}
})
export default class extends Vue {
@Prop({ default: false })
private showDialog!: boolean
@Prop({ default: '' })
private clientId!: string
@ -158,13 +169,18 @@ export default class extends Vue {
this.clientProperties.push(property)
const successMessage = this.l('identityServer.createPropertySuccess', { type: this.clientProperty.key })
this.$message.success(successMessage)
frmClientProperty.resetFields()
this.$emit('clientPropertyChanged')
this.onFormClosed()
})
}
})
}
private onFormClosed() {
this.resetFields()
this.$emit('closed')
}
public resetFields() {
const frmClientProperty = this.$refs.formClientProperty as any
frmClientProperty.resetFields()

22
vueJs/src/views/admin/identityServer/client/components/ClientSecretEditForm.vue

@ -1,6 +1,14 @@
<template>
<el-dialog
v-el-draggable-dialog
width="800px"
:visible="showDialog"
:title="$t('identityServer.clientSecret')"
custom-class="modal-form"
:show-close="false"
@close="onFormClosed"
>
<div class="app-container">
<div class="filter-container">
<el-form
ref="formClientSecret"
label-width="100px"
@ -186,7 +194,7 @@
</template>
</el-table-column>
</el-table>
</div>
</el-dialog>
</template>
<script lang="ts">
@ -211,6 +219,9 @@ import { checkPermission } from '@/utils/permission'
}
})
export default class extends Vue {
@Prop({ default: false })
private showDialog!: boolean
@Prop({ default: '' })
private clientId!: string
@ -264,13 +275,18 @@ export default class extends Vue {
this.clientSecrets.push(secret)
const successMessage = this.l('identityServer.createSecretSuccess', { type: this.clientSecret.type })
this.$message.success(successMessage)
frmClientSecret.resetFields()
this.$emit('clientSecretChanged')
this.onFormClosed()
})
}
})
}
private onFormClosed() {
this.resetFields()
this.$emit('closed')
}
public resetFields() {
const frmClientSecret = this.$refs.formClientSecret as any
frmClientSecret.resetFields()

134
vueJs/src/views/admin/identityServer/client/index.vue

@ -218,130 +218,63 @@
<Pagination
v-show="dataTotal>0"
:total="dataTotal"
:page.sync="dataFilter.skipCount"
:limit.sync="dataFilter.maxResultCount"
:page.sync="currentPage"
:limit.sync="pageSize"
@pagination="refreshPagedData"
@sort-change="handleSortChange"
/>
<el-dialog
v-el-draggable-dialog
width="800px"
:visible.sync="showCreateClientDialog"
:title="$t('identityServer.createClient')"
custom-class="modal-form"
:show-close="false"
@closed="handleClientCreateFormClosed"
>
<ClientCreateForm
ref="formCreateClient"
<client-create-form
:show-dialog="showCreateClientDialog"
@closed="handleClientCreateFormClosed"
/>
</el-dialog>
<el-dialog
v-el-draggable-dialog
width="800px"
:visible.sync="showCloneClientDialog"
:title="$t('identityServer.cloneClint')"
custom-class="modal-form"
:show-close="false"
:close-on-click-modal="false"
:close-on-press-escape="false"
>
<ClientCloneForm
ref="formCloneClient"
<client-clone-form
:show-dialog="showCloneClientDialog"
:client-id="editClient.id"
@closed="handleClientCloneFormClosed"
/>
</el-dialog>
<el-dialog
v-el-draggable-dialog
width="800px"
:visible.sync="showEditClientDialog"
:title="editClientTitle"
custom-class="modal-form"
:show-close="false"
:close-on-click-modal="false"
:close-on-press-escape="false"
>
<ClientEditForm
<client-edit-form
:show-dialog="showEditClientDialog"
:client-id="editClient.id"
@closed="handleClientEditFormClosed"
/>
</el-dialog>
<el-dialog
v-el-draggable-dialog
width="800px"
:visible.sync="showEditClientSecretDialog"
:title="$t('identityServer.clientSecret')"
custom-class="modal-form"
:show-close="false"
@closed="handleClientSecretEditFormClosed"
>
<ClientSecretEditForm
ref="formClientSecret"
<client-secret-edit-form
:show-dialog="showEditClientSecretDialog"
:client-id="editClient.id"
:client-secrets="editClient.clientSecrets"
@clientSecretChanged="refreshPagedData"
@closed="handleClientSecretEditFormClosed"
@clientClaimChanged="refreshPagedData"
/>
</el-dialog>
<el-dialog
v-el-draggable-dialog
width="800px"
:visible.sync="showEditClientClaimDialog"
:title="$t('identityServer.clientClaim')"
custom-class="modal-form"
:show-close="false"
@closed="handleClientClaimEditFormClosed"
@clientClaimChanged="refreshPagedData"
>
<ClientClaimEditForm
ref="formClientClaim"
<client-claim-edit-form
:show-dialog="showEditClientClaimDialog"
:client-id="editClient.id"
:client-claims="editClient.claims"
@closed="handleClientClaimEditFormClosed"
@clientClaimChanged="refreshPagedData"
/>
</el-dialog>
<el-dialog
v-el-draggable-dialog
width="800px"
:visible.sync="showEditClientPropertyDialog"
:title="$t('identityServer.clientProperty')"
custom-class="modal-form"
:show-close="false"
@closed="handleClientPropertyEditFormClosed"
@clientPropertyChanged="refreshPagedData"
>
<ClientPropertyEditForm
ref="formClientProperty"
<client-property-edit-form
:show-dialog="showEditClientPropertyDialog"
:client-id="editClient.id"
:client-properties="editClient.properties"
@clientPropertyChanged="refreshPagedData"
@closed="handleClientPropertyEditFormClosed"
/>
</el-dialog>
<el-dialog
v-el-draggable-dialog
width="800px"
:visible.sync="showEditClientPermissionDialog"
:title="$t('identityServer.clientPermission')"
custom-class="modal-form"
:show-close="false"
@closed="handleClientPermissionEditFormClosed"
>
<ClientPermissionEditForm
ref="formClientPermission"
<client-permission-edit-form
:show-dialog="showEditClientPermissionDialog"
:client-id="editClient.clientId"
@closed="handleClientPermissionEditFormClosed"
/>
</el-dialog>
</div>
</template>
<script lang="ts">
import { abpPagerFormat } from '@/utils/index'
import { checkPermission } from '@/utils/permission'
import DataListMiXin from '@/mixins/DataListMiXin'
import Component, { mixins } from 'vue-class-component'
@ -400,6 +333,10 @@ export default class extends mixins(DataListMiXin) {
this.refreshPagedData()
}
protected processDataFilter() {
this.dataFilter.skipCount = abpPagerFormat(this.currentPage, this.pageSize)
}
protected getPagedList(filter: any) {
return ClientService.getClients(filter)
}
@ -417,30 +354,20 @@ export default class extends mixins(DataListMiXin) {
}
private handleClientCreateFormClosed(changed: boolean) {
this.editClientTitle = ''
this.editClient = Client.empty()
this.showCreateClientDialog = false
const frmClient = this.$refs.formCreateClient as ClientCreateForm
frmClient.resetFields()
if (changed) {
this.refreshPagedData()
}
}
private handleClientCloneFormClosed(changed: boolean) {
this.editClientTitle = ''
this.editClient = Client.empty()
this.showCloneClientDialog = false
const frmClient = this.$refs.formCloneClient as ClientCloneForm
frmClient.resetFields()
if (changed) {
this.refreshPagedData()
}
}
private handleClientEditFormClosed(changed: boolean) {
this.editClientTitle = ''
this.editClient = Client.empty()
this.showEditClientDialog = false
if (changed) {
this.refreshPagedData()
@ -449,24 +376,17 @@ export default class extends mixins(DataListMiXin) {
private handleClientSecretEditFormClosed() {
this.showEditClientSecretDialog = false
const frmClientSecret = this.$refs.formClientSecret as ClientSecretEditForm
frmClientSecret.resetFields()
}
private handleClientClaimEditFormClosed() {
this.showEditClientClaimDialog = false
const frmClientClaim = this.$refs.formClientClaim as ClientClaimEditForm
frmClientClaim.resetFields()
}
private handleClientPropertyEditFormClosed() {
this.showEditClientPropertyDialog = false
const frmClientProperty = this.$refs.formClientProperty as ClientPropertyEditForm
frmClientProperty.resetFields()
}
private handleClientPermissionEditFormClosed() {
this.editClient = Client.empty()
this.showEditClientPermissionDialog = false
}

1
vueJs/src/views/admin/identityServer/components/ScopeInput.vue

@ -107,7 +107,6 @@ export default class extends Vue {
}
private remove(index: number) {
console.log(index)
this.scopes.splice(index, 1)
this.tagChange()
}

36
vueJs/src/views/admin/identityServer/identity-resources/components/IdentityResourceCreateOrEditForm.vue

@ -1,6 +1,16 @@
<template>
<el-dialog
v-el-draggable-dialog
width="800px"
:visible="showDialog"
:title="title"
custom-class="modal-form"
:show-close="false"
:close-on-click-modal="false"
:close-on-press-escape="false"
@close="onFormClosed(false)"
>
<div class="app-container">
<div class="filter-container">
<el-form
ref="formIdentityResource"
label-width="120px"
@ -94,7 +104,7 @@
</el-form-item>
</el-form>
</div>
</div>
</el-dialog>
</template>
<script lang="ts">
@ -109,6 +119,12 @@ import ElInputTagEx from '@/components/InputTagEx/index.vue'
}
})
export default class extends Vue {
@Prop({ default: false })
private showDialog!: boolean
@Prop({ default: '' })
private title!: string
@Prop({ default: '' })
private identityResourceId!: string
@ -152,8 +168,7 @@ export default class extends Vue {
this.identityResource = resource
const successMessage = this.l('identityServer.updateIdentityResourceSuccess', { name: resource.name })
this.$message.success(successMessage)
frmIdentityResource.resetFields()
this.$emit('closed', true)
this.onFormClosed(true)
})
} else {
const createIdentityResource = IdentityResourceCreate.create(this.identityResource)
@ -161,20 +176,23 @@ export default class extends Vue {
this.identityResource = resource
const successMessage = this.l('identityServer.createIdentityResourceSuccess', { name: resource.name })
this.$message.success(successMessage)
this.resetFields()
this.$emit('closed', true)
this.onFormClosed(true)
})
}
}
})
}
private onCancel() {
private onFormClosed(changed: boolean) {
this.resetFields()
this.$emit('closed', false)
this.$emit('closed', changed)
}
private onCancel() {
this.onFormClosed(false)
}
public resetFields() {
private resetFields() {
this.identityResource = IdentityResource.empty()
const frmIdentityResource = this.$refs.formIdentityResource as any
frmIdentityResource.resetFields()

32
vueJs/src/views/admin/identityServer/identity-resources/components/IdentityResourcePropertyEditForm.vue

@ -1,6 +1,14 @@
<template>
<el-dialog
v-el-draggable-dialog
width="800px"
:visible="showDialog"
:title="$t('identityServer.identityResourceProperties')"
custom-class="modal-form"
:show-close="false"
@close="onFormClosed(false)"
>
<div class="app-container">
<div class="filter-container">
<el-form
v-if="checkPermission(['IdentityServer.IdentityResources.Properties.Create'])"
ref="formIdentityProperty"
@ -76,7 +84,6 @@
:label="$t('operaActions')"
align="center"
width="150px"
fixed="right"
>
<template slot-scope="{row}">
<el-button
@ -90,13 +97,14 @@
</template>
</el-table-column>
</el-table>
</div>
</el-dialog>
</template>
<script lang="ts">
import IdentityResourceService, { IdentityResource, IdentityPropertyCreate } from '@/api/identityresources'
import { Component, Vue, Prop } from 'vue-property-decorator'
import { checkPermission } from '@/utils/permission'
import { ElForm } from 'element-ui/types/form'
@Component({
name: 'IdentityPropertyEditForm',
@ -105,6 +113,9 @@ import { checkPermission } from '@/utils/permission'
}
})
export default class extends Vue {
@Prop({ default: false })
private showDialog!: boolean
@Prop({ default: () => IdentityResource.empty() })
private identityResource!: IdentityResource
@ -132,7 +143,7 @@ export default class extends Vue {
const deletePropertyIndex = this.identityResource.properties.findIndex(p => p.key === key && p.value === key)
this.identityResource.properties.splice(deletePropertyIndex, 1)
this.$message.success(this.l('identityServer.deleteIdentityPropertySuccess', { key: key }))
this.$emit('closed', true)
this.onFormClosed(true)
})
}
}
@ -149,15 +160,20 @@ export default class extends Vue {
this.identityResource.properties.push(property)
const successMessage = this.l('identityServer.createIdentityPropertySuccess', { key: this.identityProperty.key })
this.$message.success(successMessage)
this.resetFields()
this.$emit('closed', true)
this.onFormClosed(true)
})
}
})
}
public resetFields() {
this.identityProperty = IdentityPropertyCreate.empty()
private onFormClosed(changed: boolean) {
this.resetFields()
this.$emit('closed', changed)
}
private resetFields() {
const frmIdentityProperty = this.$refs.formIdentityProperty as ElForm
frmIdentityProperty.resetFields()
}
private l(name: string, values?: any[] | { [key: string]: any }) {

41
vueJs/src/views/admin/identityServer/identity-resources/index.vue

@ -161,50 +161,29 @@
<Pagination
v-show="dataTotal>0"
:total="dataTotal"
:page.sync="dataFilter.skipCount"
:limit.sync="dataFilter.maxResultCount"
:page.sync="currentPage"
:limit.sync="pageSize"
@pagination="refreshPagedData"
@sort-change="handleSortChange"
/>
<el-dialog
v-el-draggable-dialog
width="800px"
:visible.sync="showEditIdentityResourceDialog"
<identity-resource-create-or-edit-form
:show-dialog="showEditIdentityResourceDialog"
:title="editIdentityResourceTitle"
custom-class="modal-form"
:show-close="false"
:close-on-click-modal="false"
:close-on-press-escape="false"
@closed="handleIdentityResourceEditFormClosed"
>
<IdentityResourceCreateOrEditForm
ref="formIdentityResource"
:identity-resource-id="editIdentityResource.id"
@closed="handleIdentityResourceEditFormClosed"
/>
</el-dialog>
<el-dialog
v-el-draggable-dialog
width="800px"
:visible.sync="showEditIdentityPropertyDialog"
:title="$t('identityServer.identityResourceProperties')"
custom-class="modal-form"
:show-close="false"
@closed="handleIdentityPropertyEditFormClosed"
>
<IdentityPropertyEditForm
ref="formIdentityProperty"
<identity-property-edit-form
:show-dialog="showEditIdentityPropertyDialog"
:identity-resource="editIdentityResource"
@closed="handleIdentityPropertyEditFormClosed"
/>
</el-dialog>
</div>
</template>
<script lang="ts">
import { dateFormat } from '@/utils/index'
import { dateFormat, abpPagerFormat } from '@/utils/index'
import { checkPermission } from '@/utils/permission'
import DataListMiXin from '@/mixins/DataListMiXin'
import Component, { mixins } from 'vue-class-component'
@ -249,6 +228,10 @@ export default class extends mixins(DataListMiXin) {
this.refreshPagedData()
}
protected processDataFilter() {
this.dataFilter.skipCount = abpPagerFormat(this.currentPage, this.pageSize)
}
protected getPagedList(filter: any) {
return IdentityResourceService.getIdentityResources(filter)
}
@ -287,9 +270,9 @@ export default class extends mixins(DataListMiXin) {
}
private handleCommand(command: {key: string, row: IdentityResource}) {
this.editIdentityResource = command.row
switch (command.key) {
case 'property' :
this.editIdentityResource = command.row
this.showEditIdentityPropertyDialog = true
break
case 'delete' :

9
vueJs/src/views/admin/organization-unit/components/RoleOrganizationUint.vue

@ -60,14 +60,15 @@
<pagination
v-show="dataTotal>0"
:total="dataTotal"
:page.sync="dataFilter.skipCount"
:limit.sync="dataFilter.maxResultCount"
:page.sync="currentPage"
:limit.sync="pageSize"
@pagination="refreshPagedData"
/>
</div>
</template>
<script lang="ts">
import { abpPagerFormat } from '@/utils'
import DataListMiXin from '@/mixins/DataListMiXin'
import { Prop, Watch } from 'vue-property-decorator'
import Component, { mixins } from 'vue-class-component'
@ -95,6 +96,10 @@ export default class extends mixins(DataListMiXin) {
}
}
protected processDataFilter() {
this.dataFilter.skipCount = abpPagerFormat(this.currentPage, this.pageSize)
}
protected getPagedList(filter: any) {
if (this.organizationUnitId) {
return OrganizationUnitService.organizationUnitGetRoles(filter)

9
vueJs/src/views/admin/roles/index.vue

@ -136,8 +136,8 @@
<pagination
v-show="dataTotal>0"
:total="dataTotal"
:page.sync="dataFilter.skipCount"
:limit.sync="dataFilter.maxResultCount"
:page.sync="currentPage"
:limit.sync="pageSize"
@pagination="refreshPagedData"
/>
@ -156,6 +156,7 @@
</template>
<script lang="ts">
import { abpPagerFormat } from '@/utils'
import DataListMiXin from '@/mixins/DataListMiXin'
import Component, { mixins } from 'vue-class-component'
import RoleService, { CreateRoleDto, RoleDto, UpdateRoleDto, RoleGetPagedDto } from '@/api/roles'
@ -185,6 +186,10 @@ export default class extends mixins(DataListMiXin) {
this.refreshPagedData()
}
protected processDataFilter() {
this.dataFilter.skipCount = abpPagerFormat(this.currentPage, this.pageSize)
}
/** 获取角色权限列表 */
protected getPagedList(filter: any) {
return RoleService.getRoles(filter)

5
vueJs/src/views/admin/settings/components/SettingEditForm.vue

@ -6,7 +6,7 @@
label-width="180px"
style="width: 96%"
>
<el-tabs>
<el-tabs :tab-position="tabPosition">
<el-tab-pane
v-if="hasSettingExistsed('Abp.Localization.DefaultLanguage')"
:label="$t('settings.systemSetting')"
@ -717,6 +717,9 @@ export default class extends Vue {
@Prop({ default: () => { return Array<Setting>() } })
private settings!: Setting[]
@Prop({ default: 'top' })
private tabPosition!: 'left' | 'right' | 'top' | 'bottom'
private setting: {[key: string]: Setting} = {}
private settingChangeKeys = new Array<string>()

41
vueJs/src/views/admin/tenants/components/TenantEditConnectionForm.vue → vueJs/src/views/admin/tenants/components/TenantConnectionEditForm.vue

@ -1,6 +1,16 @@
<template>
<div class="app-container">
<div class="filter-container">
<el-dialog
v-el-draggable-dialog
:visible="showDialog"
:title="$t('tenant.connectionOptions')"
width="800px"
custom-class="modal-form"
close-on-click-modal
@close="onFormClosed"
>
<div
class="app-container"
>
<el-form
v-if="checkPermission(['AbpTenantManagement.Tenants.ManageConnectionStrings'])"
ref="formTenantConnection"
@ -90,7 +100,7 @@
</template>
</el-table-column>
</el-table>
</div>
</el-dialog>
</template>
<script lang="ts">
@ -99,7 +109,7 @@ import { Component, Vue, Prop, Watch } from 'vue-property-decorator'
import { checkPermission } from '@/utils/permission'
@Component({
name: 'TenantEditConnectionForm',
name: 'TenantConnectionEditForm',
methods: {
checkPermission
}
@ -108,6 +118,9 @@ export default class extends Vue {
@Prop({ default: '' })
private tenantId!: string
@Prop({ default: false })
private showDialog!: boolean
private tenantConnection: TenantConnectionString
private tenantConnections: TenantConnectionString[]
private tenantConnectionRules = {
@ -125,9 +138,17 @@ export default class extends Vue {
this.tenantConnections = new Array<TenantConnectionString>()
}
@Watch('tenantId', { immediate: true })
@Watch('tenantId')
private onTenantIdChanged() {
if (this.tenantId) {
this.handleGetTenantConnections()
}
mounted() {
this.handleGetTenantConnections()
}
private handleGetTenantConnections() {
if (this.showDialog && this.tenantId) {
TenantService.getTenantConnections(this.tenantId).then(connections => {
this.tenantConnections = connections.items
})
@ -146,8 +167,7 @@ export default class extends Vue {
const deleteTenantConnectionIndex = this.tenantConnections.findIndex(p => p.name === name)
this.tenantConnections.splice(deleteTenantConnectionIndex, 1)
this.$message.success(this.l('tenant.deleteTenantConnectionSuccess', { name: name }))
this.resetFields()
this.$emit('closed', true)
this.onFormClosed()
})
}
}
@ -172,6 +192,11 @@ export default class extends Vue {
})
}
private onFormClosed() {
this.resetFields()
this.$emit('closed')
}
public resetFields() {
this.tenantConnection = TenantConnectionString.empty()
}

34
vueJs/src/views/admin/tenants/components/TenantCreateOrEditForm.vue

@ -1,6 +1,15 @@
<template>
<div class="app-container">
<div class="filter-container">
<el-dialog
:visible="showDialog"
:title="$t('tenant.updateTenant')"
width="800px"
custom-class="modal-form"
:show-close="false"
@close="onFormClosed"
>
<div
class="app-container"
>
<el-form
ref="formTenant"
label-width="120px"
@ -56,7 +65,7 @@
</el-form-item>
</el-form>
</div>
</div>
</el-dialog>
</template>
<script lang="ts">
@ -70,6 +79,9 @@ export default class extends Vue {
@Prop({ default: '' })
private tenantId!: string
@Prop({ default: false })
private showDialog!: boolean
private tenant!: TenantCreateOrEdit
get isEditTenant() {
@ -97,9 +109,17 @@ export default class extends Vue {
this.tenant = TenantCreateOrEdit.empty()
}
@Watch('tenantId', { immediate: true })
@Watch('tenantId')
private onTenantIdChanged() {
if (this.tenantId) {
this.handleGetEditTenant()
}
mounted() {
this.handleGetEditTenant()
}
private handleGetEditTenant() {
if (this.showDialog && this.tenantId) {
TenantService.getTenantById(this.tenantId).then(tenant => {
this.tenant.name = tenant.name
})
@ -131,6 +151,10 @@ export default class extends Vue {
})
}
private onFormClosed() {
this.$emit('closed', false)
}
private onCancel() {
this.reset()
this.$emit('closed', false)

4
vueJs/src/views/admin/tenants/components/TenantFeatureEditForm.vue

@ -3,13 +3,15 @@
:visible="showDialog"
:title="$t('AbpTenantManagement.Permission:ManageFeatures')"
width="800px"
custom-class="modal-form"
:show-close="false"
@closed="onFormClosed"
@close="onFormClosed"
>
<feature-management
ref="featureManagement"
provider-name="T"
:provider-key="tenantId"
:load-feature="showDialog"
@closed="onFormClosed"
/>
</el-dialog>

42
vueJs/src/views/admin/tenants/index.vue

@ -144,43 +144,23 @@
<Pagination
v-show="dataTotal>0"
:total="dataTotal"
:page.sync="dataFilter.skipCount"
:limit.sync="dataFilter.maxResultCount"
:page.sync="currentPage"
:limit.sync="pageSize"
@pagination="refreshPagedData"
@sort-change="handleSortChange"
/>
<el-dialog
v-el-draggable-dialog
width="800px"
:visible.sync="showCreateOrEditTenantDialog"
:title="$t('tenant.updateTenant')"
custom-class="modal-form"
:show-close="false"
@closed="handleCreateOrEditTenantFormClosed"
>
<TenantCreateOrEditForm
ref="formCreateOrEditTenant"
<tenant-create-or-edit-form
:show-dialog="showCreateOrEditTenantDialog"
:tenant-id="editTenantId"
@closed="handleCreateOrEditTenantFormClosed"
/>
</el-dialog>
<el-dialog
v-el-draggable-dialog
width="800px"
:visible.sync="showEditTenantConnectionDialog"
:title="$t('tenant.connectionOptions')"
custom-class="modal-form"
:show-close="false"
@closed="handleTenantConnectionEditFormClosed"
>
<TenantEditConnectionForm
ref="formEditTenantConnection"
<tenant-connection-edit-form
:show-dialog="showEditTenantConnectionDialog"
:tenant-id="editTenantId"
@closed="handleTenantConnectionEditFormClosed"
/>
</el-dialog>
<tenant-feature-editForm
:show-dialog="showFeatureEditFormDialog"
@ -194,12 +174,12 @@
import DataListMiXin from '@/mixins/DataListMiXin'
import Component, { mixins } from 'vue-class-component'
import TenantService, { TenantDto, TenantGetByPaged } from '@/api/tenant-management'
import { dateFormat } from '@/utils/index'
import { dateFormat, abpPagerFormat } from '@/utils/index'
import { checkPermission } from '@/utils/permission'
import Pagination from '@/components/Pagination/index.vue'
import TenantFeatureEditForm from './components/TenantFeatureEditForm.vue'
import TenantCreateOrEditForm from './components/TenantCreateOrEditForm.vue'
import TenantEditConnectionForm from './components/TenantEditConnectionForm.vue'
import TenantConnectionEditForm from './components/TenantConnectionEditForm.vue'
@Component({
name: 'RoleList',
@ -207,7 +187,7 @@ import TenantEditConnectionForm from './components/TenantEditConnectionForm.vue'
Pagination,
TenantFeatureEditForm,
TenantCreateOrEditForm,
TenantEditConnectionForm
TenantConnectionEditForm
},
methods: {
checkPermission
@ -231,6 +211,10 @@ export default class extends mixins(DataListMiXin) {
this.refreshPagedData()
}
protected processDataFilter() {
this.dataFilter.skipCount = abpPagerFormat(this.currentPage, this.pageSize)
}
protected getPagedList(filter: any) {
return TenantService.getTenants(filter)
}

10
vueJs/src/views/admin/users/index.vue

@ -152,8 +152,8 @@
<Pagination
v-show="dataTotal>0"
:total="dataTotal"
:page.sync="dataFilter.skipCount"
:limit.sync="dataFilter.maxResultCount"
:page.sync="currentPage"
:limit.sync="pageSize"
@pagination="refreshPagedData"
/>
@ -188,7 +188,7 @@
import DataListMiXin from '@/mixins/DataListMiXin'
import Component, { mixins } from 'vue-class-component'
import Pagination from '@/components/Pagination/index.vue'
import { dateFormat } from '@/utils'
import { dateFormat, abpPagerFormat } from '@/utils'
import UserApiService, { UserDataDto, UsersGetPagedDto } from '@/api/users'
import UserCreateForm from './components/UserCreateForm.vue'
import UserEditForm from './components/UserEditForm.vue'
@ -224,6 +224,10 @@ export default class extends mixins(DataListMiXin) {
this.refreshPagedData()
}
protected processDataFilter() {
this.dataFilter.skipCount = abpPagerFormat(this.currentPage, this.pageSize)
}
/** 查询用户列表 */
protected getPagedList(filter: any) {
return UserApiService.getUsers(filter)

4
vueJs/src/views/file-management/index.vue

@ -154,8 +154,8 @@
<Pagination
v-show="dataTotal>0"
:total="dataTotal"
:page.sync="dataFilter.skipCount"
:limit.sync="dataFilter.maxResultCount"
:page.sync="currentPage"
:limit.sync="pageSize"
@pagination="refreshPagedData"
/>

144
vueJs/src/views/profile-setting/components/MyProfile.vue

@ -0,0 +1,144 @@
<template>
<div class="app-container">
<h4>{{ $t('AbpAccount.ManageYourProfile') }}</h4>
<el-divider />
<el-form
v-model="myProfile"
label-width="180px"
>
<el-row>
<el-col :span="16">
<el-form-item
:label="$t('AbpAccount.DisplayName:UserName')"
prop="userName"
>
<el-input v-model="myProfile.userName" />
</el-form-item>
<el-form-item
:label="$t('AbpAccount.DisplayName:Name')"
prop="name"
>
<el-input v-model="myProfile.name" />
</el-form-item>
<el-form-item
:label="$t('AbpAccount.DisplayName:Surname')"
prop="surname"
>
<el-input v-model="myProfile.surname" />
</el-form-item>
</el-col>
<el-col :span="8">
<div class="user-avatar">
<div class="box-center">
<el-row>
<pan-thumb
:image="myAvatar"
:height="'100px'"
:width="'100px'"
:hoverable="false"
/>
</el-row>
<el-row>
<el-button>
<i class="el-icon-upload2" />
更换头像
</el-button>
</el-row>
</div>
</div>
</el-col>
</el-row>
<el-form-item
:label="$t('AbpAccount.DisplayName:Email')"
prop="email"
>
<el-input v-model="myProfile.email" />
</el-form-item>
<el-form-item
:label="$t('AbpAccount.DisplayName:PhoneNumber')"
prop="phoneNumber"
>
<el-input v-model="myProfile.phoneNumber" />
</el-form-item>
<el-form-item>
<el-button
type="primary"
@click="handleUpdateMyProfile"
>
更新个人资料
</el-button>
</el-form-item>
</el-form>
</div>
</template>
<script lang="ts">
import MyProfileService, { MyProfile, UpdateMyProfile } from '@/api/profile'
import { Component, Vue } from 'vue-property-decorator'
import PanThumb from '@/components/PanThumb/index.vue'
@Component({
name: 'MyProfile',
components: {
PanThumb
}
})
export default class extends Vue {
private myProfile = new MyProfile()
get myAvatar() {
if (this.myProfile.extraProperties) {
const avatar = this.myProfile.extraProperties.avatar
if (avatar) {
return avatar
}
}
return ''
}
set myAvatar(avatar: string) {
if (this.myProfile.extraProperties) {
this.myProfile.extraProperties.avatar = avatar
}
}
mounted() {
MyProfileService.getMyProfile().then(profile => {
this.myProfile = profile
})
}
private handleUpdateMyProfile() {
this.$confirm(this.$t('AbpAccount.ManageYourProfile').toString(),
this.$t('AbpAccount.AreYouSure').toString(), {
callback: (action) => {
if (action === 'confirm') {
const updateProfile = new UpdateMyProfile(
this.myProfile.name,
this.myProfile.email,
this.myProfile.userName,
this.myProfile.surname,
this.myProfile.phoneNumber
)
MyProfileService.updateMyProfile(updateProfile).then(profile => {
this.myProfile = profile
this.$message.success(this.$t('AbpAccount.PersonalSettingsSaved').toString())
})
}
}
})
}
}
</script>
<style lang="scss" scoped>
.box-center {
margin: 0 auto;
display: table;
}
.user-avatar {
.box-center {
padding-top: 10px;
}
}
</style>

0
vueJs/src/views/profile-setting/components/MySecurity.vue

33
vueJs/src/views/profile-setting/index.vue

@ -0,0 +1,33 @@
<template>
<el-tabs
tab-position="left"
style="margin: 30px;"
>
<el-tab-pane label="基本设置">
<my-profile />
</el-tab-pane>
<el-tab-pane label="安全设置">
安全设置
</el-tab-pane>
<el-tab-pane label="账号绑定">
账号绑定
</el-tab-pane>
<el-tab-pane label="消息通知">
消息通知
</el-tab-pane>
</el-tabs>
</template>
<script lang="ts">
import MyProfile from './components/MyProfile.vue'
import { Component, Vue } from 'vue-property-decorator'
@Component({
name: 'ProfileSettingEditForm',
components: {
MyProfile
}
})
export default class extends Vue {
}
</script>
Loading…
Cancel
Save