serv\web- 日志

This commit is contained in:
2025-10-30 16:40:56 +08:00
parent 82b6f14e64
commit 2b252e1b3c
91 changed files with 6003 additions and 1485 deletions

View File

@@ -42,6 +42,11 @@ export const learningTaskApi = {
return response.data;
},
async getTaskUsers(taskID: string): Promise<ResultDomain<TaskItemVO>> {
const response = await api.get<TaskItemVO>(`${this.learningTaskPrefix}/${taskID}/users`);
return response.data;
},
/**
* 获取任务分页列表
* @param pageParam 分页参数

View File

@@ -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;
}

View File

@@ -13,4 +13,5 @@ export { permissionApi } from './permission';
export { authApi } from './auth';
export { fileApi } from './file';
export { moduleApi } from './module';
export { logApi } from './log';

View 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;
}
};

View File

@@ -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;
},