diff --git a/apps/vue/src/api/permission-management/definitions/groups/index.ts b/apps/vue/src/api/permission-management/definitions/groups/index.ts new file mode 100644 index 000000000..f2065dc43 --- /dev/null +++ b/apps/vue/src/api/permission-management/definitions/groups/index.ts @@ -0,0 +1,40 @@ +import { defHttp } from '/@/utils/http/axios'; +import { + PermissionGroupDefinitionDto, + PermissionGroupDefinitionCreateDto, + PermissionGroupDefinitionUpdateDto, + PermissionGroupDefinitionGetListInput, +} from './model'; + +export const CreateAsyncByInput = (input: PermissionGroupDefinitionCreateDto) => { + return defHttp.post({ + url: '/api/permission-management/definitions/groups', + data: input, + }); +}; + +export const DeleteAsyncByName = (name: string) => { + return defHttp.delete({ + url: `/api/permission-management/definitions/groups/${name}`, + }); +}; + +export const GetAsyncByName = (name: string) => { + return defHttp.get({ + url: `/api/permission-management/definitions/groups/${name}`, + }); +}; + +export const GetListAsyncByInput = (input: PermissionGroupDefinitionGetListInput) => { + return defHttp.get>({ + url: '/api/permission-management/definitions/groups', + params: input, + }); +}; + +export const UpdateAsyncByNameAndInput = (name: string, input: PermissionGroupDefinitionUpdateDto) => { + return defHttp.put({ + url: `/api/permission-management/definitions/groups/${name}`, + data: input, + }); +}; diff --git a/apps/vue/src/api/permission-management/definitions/groups/model/index.ts b/apps/vue/src/api/permission-management/definitions/groups/model/index.ts new file mode 100644 index 000000000..58537fa6c --- /dev/null +++ b/apps/vue/src/api/permission-management/definitions/groups/model/index.ts @@ -0,0 +1,19 @@ +interface PermissionGroupDefinitionCreateOrUpdateDto extends IHasExtraProperties { + displayName: string; +} + +export interface PermissionGroupDefinitionCreateDto extends PermissionGroupDefinitionCreateOrUpdateDto { + name: string; +} + +export interface PermissionGroupDefinitionDto extends IHasExtraProperties { + name: string; + displayName: string; + isStatic: boolean; +} + +export interface PermissionGroupDefinitionGetListInput { + filter?: string; +} + +export type PermissionGroupDefinitionUpdateDto = PermissionGroupDefinitionCreateOrUpdateDto; \ No newline at end of file diff --git a/apps/vue/src/api/permission-management/definitions/permissions/index.ts b/apps/vue/src/api/permission-management/definitions/permissions/index.ts new file mode 100644 index 000000000..8dc321576 --- /dev/null +++ b/apps/vue/src/api/permission-management/definitions/permissions/index.ts @@ -0,0 +1,40 @@ +import { defHttp } from '/@/utils/http/axios'; +import { + PermissionDefinitionDto, + PermissionDefinitionCreateDto, + PermissionDefinitionUpdateDto, + PermissionDefinitionGetListInput, +} from './model'; + +export const CreateAsyncByInput = (input: PermissionDefinitionCreateDto) => { + return defHttp.post({ + url: '/api/permission-management/definitions', + data: input, + }); +}; + +export const DeleteAsyncByName = (name: string) => { + return defHttp.delete({ + url: `/api/permission-management/definitions/${name}`, + }); +}; + +export const GetAsyncByName = (name: string) => { + return defHttp.get({ + url: `/api/permission-management/definitions/${name}`, + }); +}; + +export const GetListAsyncByInput = (input: PermissionDefinitionGetListInput) => { + return defHttp.get>({ + url: '/api/permission-management/definitions', + params: input, + }); +}; + +export const UpdateAsyncByNameAndInput = (name: string, input: PermissionDefinitionUpdateDto) => { + return defHttp.put({ + url: `/api/permission-management/definitions/${name}`, + data: input, + }); +}; diff --git a/apps/vue/src/api/permission-management/definitions/permissions/model/index.ts b/apps/vue/src/api/permission-management/definitions/permissions/model/index.ts new file mode 100644 index 000000000..1c85dbc09 --- /dev/null +++ b/apps/vue/src/api/permission-management/definitions/permissions/model/index.ts @@ -0,0 +1,36 @@ +export enum MultiTenancySides { + Tenant = 0x1, + Host = 0x2, + Both = 0x3, +} + +interface PermissionDefinitionCreateOrUpdateDto extends IHasExtraProperties { + displayName: string; + parentName?: string; + isEnabled: boolean; + providers: string[]; + stateCheckers: string; +} + +export interface PermissionDefinitionCreateDto extends PermissionDefinitionCreateOrUpdateDto { + groupName: string; + name: string; +} + +export interface PermissionDefinitionDto extends IHasExtraProperties { + groupName: string; + name: string; + displayName: string; + parentName?: string; + isEnabled: boolean; + isStatic: boolean; + providers: string[]; + stateCheckers: string; +} + +export interface PermissionDefinitionGetListInput { + filter?: string; + groupName?: string; +} + +export type PermissionDefinitionUpdateDto = PermissionDefinitionCreateOrUpdateDto; diff --git a/apps/vue/src/api/permission-management/permission.ts b/apps/vue/src/api/permission-management/permissions/index.ts similarity index 68% rename from apps/vue/src/api/permission-management/permission.ts rename to apps/vue/src/api/permission-management/permissions/index.ts index bb8be92eb..0c6437b81 100644 --- a/apps/vue/src/api/permission-management/permission.ts +++ b/apps/vue/src/api/permission-management/permissions/index.ts @@ -1,21 +1,16 @@ import { defAbpHttp } from '/@/utils/http/abp'; -import { PermissionProvider, PermissionResult, UpdatePermissions } from './model/permissionModel'; - -enum Api { - Get = '/api/permission-management/permissions', - Update = '/api/permission-management/permissions', -} +import { PermissionProvider, PermissionResult, UpdatePermissions } from './model'; export const get = (provider: PermissionProvider) => { return defAbpHttp.get({ - url: Api.Get, + url: '/api/permission-management/permissions', params: provider, }); }; export const update = (provider: PermissionProvider, input: UpdatePermissions) => { return defAbpHttp.put({ - url: Api.Update, + url: '/api/permission-management/permissions', data: input, params: provider, }); diff --git a/apps/vue/src/api/permission-management/model/permissionModel.ts b/apps/vue/src/api/permission-management/permissions/model/index.ts similarity index 94% rename from apps/vue/src/api/permission-management/model/permissionModel.ts rename to apps/vue/src/api/permission-management/permissions/model/index.ts index 2c993bcbc..b8a4d43c4 100644 --- a/apps/vue/src/api/permission-management/model/permissionModel.ts +++ b/apps/vue/src/api/permission-management/permissions/model/index.ts @@ -1,4 +1,4 @@ -import { IPermission } from '../../model/baseModel'; +import { IPermission } from '/@/api/model/baseModel'; export class PermissionProvider { providerName!: string; diff --git a/apps/vue/src/components/Abp/ExtraPropertyDictionary/ExtraPropertyDictionary.vue b/apps/vue/src/components/Abp/ExtraPropertyDictionary/ExtraPropertyDictionary.vue index afcc5fd45..060bcf918 100644 --- a/apps/vue/src/components/Abp/ExtraPropertyDictionary/ExtraPropertyDictionary.vue +++ b/apps/vue/src/components/Abp/ExtraPropertyDictionary/ExtraPropertyDictionary.vue @@ -5,7 +5,7 @@ - +