feat(sis): 新增通行权限组功能
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
This commit is contained in:
61
apps/web-antd/src/api/sis/authGroup/index.ts
Normal file
61
apps/web-antd/src/api/sis/authGroup/index.ts
Normal file
@@ -0,0 +1,61 @@
|
||||
import type { AuthGroupVO, AuthGroupForm, AuthGroupQuery } from './model';
|
||||
|
||||
import type { ID, IDS } from '#/api/common';
|
||||
import type { PageResult } from '#/api/common';
|
||||
|
||||
import { commonExport } from '#/api/helper';
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
/**
|
||||
* 查询授权组列表
|
||||
* @param params
|
||||
* @returns 授权组列表
|
||||
*/
|
||||
export function authGroupList(params?: AuthGroupQuery) {
|
||||
return requestClient.get<PageResult<AuthGroupVO>>('/sis/authGroup/list', { params });
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出授权组列表
|
||||
* @param params
|
||||
* @returns 授权组列表
|
||||
*/
|
||||
export function authGroupExport(params?: AuthGroupQuery) {
|
||||
return commonExport('/sis/authGroup/export', params ?? {});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询授权组详情
|
||||
* @param id id
|
||||
* @returns 授权组详情
|
||||
*/
|
||||
export function authGroupInfo(id: ID) {
|
||||
return requestClient.get<AuthGroupVO>(`/sis/authGroup/${id}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增授权组
|
||||
* @param data
|
||||
* @returns void
|
||||
*/
|
||||
export function authGroupAdd(data: AuthGroupForm) {
|
||||
return requestClient.postWithMsg<void>('/sis/authGroup', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新授权组
|
||||
* @param data
|
||||
* @returns void
|
||||
*/
|
||||
export function authGroupUpdate(data: AuthGroupForm) {
|
||||
return requestClient.putWithMsg<void>('/sis/authGroup', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除授权组
|
||||
* @param id id
|
||||
* @returns void
|
||||
*/
|
||||
export function authGroupRemove(id: ID | IDS) {
|
||||
return requestClient.deleteWithMsg<void>(`/sis/authGroup/${id}`);
|
||||
}
|
69
apps/web-antd/src/api/sis/authGroup/model.d.ts
vendored
Normal file
69
apps/web-antd/src/api/sis/authGroup/model.d.ts
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
import type { PageQuery, BaseEntity } from '#/api/common';
|
||||
|
||||
export interface AuthGroupVO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 权限名称
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* 面向对象(1-单位、2-个人)
|
||||
*/
|
||||
groupType: number;
|
||||
|
||||
/**
|
||||
* 是否启用(0:禁用,1启用)
|
||||
*/
|
||||
isEnable: boolean;
|
||||
|
||||
}
|
||||
|
||||
export interface AuthGroupForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 权限名称
|
||||
*/
|
||||
name?: string;
|
||||
|
||||
/**
|
||||
* 面向对象(1-单位、2-个人)
|
||||
*/
|
||||
groupType?: number;
|
||||
|
||||
/**
|
||||
* 是否启用(0:禁用,1启用)
|
||||
*/
|
||||
isEnable?: boolean;
|
||||
|
||||
}
|
||||
|
||||
export interface AuthGroupQuery extends PageQuery {
|
||||
/**
|
||||
* 权限名称
|
||||
*/
|
||||
name?: string;
|
||||
|
||||
/**
|
||||
* 面向对象(1-单位、2-个人)
|
||||
*/
|
||||
groupType?: number;
|
||||
|
||||
/**
|
||||
* 是否启用(0:禁用,1启用)
|
||||
*/
|
||||
isEnable?: boolean;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
Reference in New Issue
Block a user