fix: 处理打包警告,处理命名问题
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
/**
|
||||
* 赛事操作日志假数据
|
||||
*/
|
||||
import type {
|
||||
OperationLogQueryParams,
|
||||
PageData,
|
||||
TournamentAdminOperationPageVO,
|
||||
} from '@/api/logs/types';
|
||||
|
||||
const MOCK_EVENT_LOGS: TournamentAdminOperationPageVO[] = [
|
||||
{
|
||||
opName: '创建赛事',
|
||||
source: 'PC',
|
||||
nickname: '张三',
|
||||
phone: '13800000001',
|
||||
tournamentName: '第二届全国地学羽毛球邀请赛',
|
||||
obj: '赛事',
|
||||
content: '创建赛事「第二届全国地学羽毛球邀请赛」',
|
||||
createDate: '2026-07-30 08:00:00',
|
||||
},
|
||||
{
|
||||
opName: '修改赛事',
|
||||
source: '小程序',
|
||||
nickname: '李四',
|
||||
phone: '13800000002',
|
||||
tournamentName: '春季马拉松大赛',
|
||||
obj: '赛事',
|
||||
content: '修改赛事基础信息',
|
||||
createDate: '2026-07-29 10:12:00',
|
||||
},
|
||||
];
|
||||
|
||||
export function buildMockEventOperationLogPage(
|
||||
page: number,
|
||||
limit: number,
|
||||
params: OperationLogQueryParams,
|
||||
): PageData<TournamentAdminOperationPageVO> {
|
||||
let filtered = [...MOCK_EVENT_LOGS];
|
||||
|
||||
if (params.source) {
|
||||
const sourceLabel = params.source === '1' ? 'PC' : '小程序';
|
||||
filtered = filtered.filter((item) => item.source === sourceLabel);
|
||||
}
|
||||
if (params.sourceNickname) {
|
||||
filtered = filtered.filter((item) => item.nickname.includes(params.sourceNickname!));
|
||||
}
|
||||
if (params.sourcePhone) {
|
||||
filtered = filtered.filter((item) => item.phone.includes(params.sourcePhone!));
|
||||
}
|
||||
if (params.tournamentName) {
|
||||
filtered = filtered.filter((item) => item.tournamentName.includes(params.tournamentName!));
|
||||
}
|
||||
|
||||
const total = filtered.length;
|
||||
const start = (page - 1) * limit;
|
||||
return { total, list: filtered.slice(start, start + limit) };
|
||||
}
|
||||
@@ -5,7 +5,7 @@
|
||||
* 支持按 type、nickname、dateBegin/dateEnd 前端筛选,
|
||||
* 模拟后端分页行为。
|
||||
*/
|
||||
import type { SysOperationLogVO, OperationLogQueryParams, PageData } from '@/api/logs';
|
||||
import type { SysOperationLogVO, OperationLogQueryParams, PageData } from '@/api/logs/types';
|
||||
|
||||
const MOCK_LOGS: SysOperationLogVO[] = [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user