fix: 处理赛事操作日志中操作类型与操作来源不转化成中文的问题

This commit is contained in:
ZhuRui
2026-08-04 19:00:34 +08:00
parent 1251a0be83
commit 2e6f7ca552
2 changed files with 19 additions and 3 deletions
+4 -1
View File
@@ -16,8 +16,11 @@ export interface SysOperationLogVO {
/** 赛事操作日志列表项 */ /** 赛事操作日志列表项 */
export interface TournamentAdminOperationPageVO { export interface TournamentAdminOperationPageVO {
opName: string; /** 操作类型:1=创建赛事、2=删除赛事、3=取消报名、4=编辑选手、5=对阵管理、6=批量修改组别 */
type: string;
/** 操作来源:1=PC、2=小程序 */
source: string; source: string;
opName: string;
nickname: string; nickname: string;
phone: string; phone: string;
tournamentName: string; tournamentName: string;
+15 -2
View File
@@ -81,12 +81,25 @@ export default defineComponent({
const { containerRef, height } = useContainerSize({ headerOffset: 55 }); const { containerRef, height } = useContainerSize({ headerOffset: 55 });
/** 渲染 bodyCell */ /** 渲染 bodyCell */
const renderBodyCell = ({ column, text }: { column: any; text: any }) => { const renderBodyCell = ({
column,
text,
record,
index,
}: {
column: any;
text: any;
record: any;
index: number;
}) => {
if (column.key === 'content') { if (column.key === 'content') {
const raw = text || ''; const raw = text || '';
return raw ? <LogContentCell text={raw} /> : <span>-</span>; return raw ? <LogContentCell text={raw} /> : <span>-</span>;
} }
// 其他列使用 columns 中的 customRender // 有 customRender 的列使用其渲染函数(如操作类型/操作来源的代码→中文映射)
if (column.customRender) {
return column.customRender({ text, record, index, column });
}
return <span>{text || '-'}</span>; return <span>{text || '-'}</span>;
}; };