serv\web- 日志
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
import { api } from '@/apis/index';
|
||||
import type { SysDept, SysRole, DeptRoleVO, SysDeptRole, ResultDomain } from '@/types';
|
||||
import type { SysDept, SysRole, SysDeptRole, ResultDomain, UserDeptRoleVO } from '@/types';
|
||||
|
||||
/**
|
||||
* 部门API服务
|
||||
@@ -89,8 +89,8 @@ export const deptApi = {
|
||||
* @author yslg
|
||||
* @ since 2025-10-06
|
||||
*/
|
||||
async getDeptByRole(dept: SysDept): Promise<ResultDomain<SysRole>> {
|
||||
const response = await api.post<SysRole>('/depts/role', dept);
|
||||
async getDeptByRole(dept: SysDept): Promise<ResultDomain<UserDeptRoleVO>> {
|
||||
const response = await api.post<UserDeptRoleVO>('/depts/role', dept);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
@@ -113,7 +113,7 @@ export const deptApi = {
|
||||
* @author yslg
|
||||
* @ since 2025-10-06
|
||||
*/
|
||||
async bindDeptRole(deptRole: DeptRoleVO): Promise<ResultDomain<SysDeptRole>> {
|
||||
async bindDeptRole(deptRole: UserDeptRoleVO): Promise<ResultDomain<SysDeptRole>> {
|
||||
const response = await api.post<SysDeptRole>('/depts/bind/role', deptRole);
|
||||
return response.data;
|
||||
},
|
||||
@@ -125,7 +125,7 @@ export const deptApi = {
|
||||
* @author yslg
|
||||
* @ since 2025-10-06
|
||||
*/
|
||||
async unbindDeptRole(deptRole: DeptRoleVO): Promise<ResultDomain<SysDeptRole>> {
|
||||
async unbindDeptRole(deptRole: UserDeptRoleVO): Promise<ResultDomain<SysDeptRole>> {
|
||||
const response = await api.post<SysDeptRole>('/depts/unbind/role', deptRole);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
@@ -13,4 +13,5 @@ export { permissionApi } from './permission';
|
||||
export { authApi } from './auth';
|
||||
export { fileApi } from './file';
|
||||
export { moduleApi } from './module';
|
||||
export { logApi } from './log';
|
||||
|
||||
|
||||
33
schoolNewsWeb/src/apis/system/log.ts
Normal file
33
schoolNewsWeb/src/apis/system/log.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* @description 系统日志API
|
||||
* @author yslg
|
||||
* @since 2025-10-30
|
||||
*/
|
||||
|
||||
import { api } from '../index';
|
||||
import type { LoginLog, OperationLog } from '@/types/log';
|
||||
import type { PageParam, ResultDomain } from '@/types';
|
||||
|
||||
/**
|
||||
* 日志API接口
|
||||
*/
|
||||
export const logApi = {
|
||||
baseUrl: '/sys/log',
|
||||
|
||||
async getLoginLogPage(pageParam: PageParam, filter: LoginLog): Promise<ResultDomain<LoginLog>> {
|
||||
const response = await api.post<LoginLog>(`${this.baseUrl}/login/page`, {
|
||||
pageParam,
|
||||
filter,
|
||||
});
|
||||
return response.data;
|
||||
},
|
||||
|
||||
async getOperationLogPage(pageParam: PageParam, filter: OperationLog): Promise<ResultDomain<OperationLog>> {
|
||||
const response = await api.post<OperationLog>(`${this.baseUrl}/operation/page`, {
|
||||
pageParam,
|
||||
filter,
|
||||
});
|
||||
return response.data;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -43,8 +43,8 @@ export const userApi = {
|
||||
* @param filter 过滤条件
|
||||
* @returns Promise<ResultDomain<SysUser>>
|
||||
*/
|
||||
async getUserList(filter: SysUser): Promise<ResultDomain<SysUser>> {
|
||||
const response = await api.post<SysUser>('/users/list', filter);
|
||||
async getUserList(filter: SysUser): Promise<ResultDomain<UserVO>> {
|
||||
const response = await api.post<UserVO>('/users/list', filter);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user