Fixes: - VideoPlayer.vue: restore allTags, filteredMarks, marksByTag (removed by mistake) - PeopleView.vue: fix frameTime scope in playFaceDetailVideo catch block - Both errors caused white screen on build failure Root cause: 1. visibleTags duplicate declaration (old + new logic) 2. frameTime undefined in catch block (scope issue) Solution: 1. Keep allTags/filteredMarks/marksByTag (needed in template) 2. Keep visibleTags (new logic for processor toggles) 3. Move frameTime calculation to correct scope in catch block
33 lines
896 B
TypeScript
33 lines
896 B
TypeScript
export const PARAM_MAP: Record<string, string> = {
|
|
pageSize: 'page_size',
|
|
perPage: 'per_page',
|
|
fileUuid: 'file_uuid',
|
|
startTime: 'start_time',
|
|
endTime: 'end_time',
|
|
startFrame: 'start_frame',
|
|
endFrame: 'end_frame',
|
|
bboxX: 'bbox_x',
|
|
bboxY: 'bbox_y',
|
|
bboxW: 'bbox_w',
|
|
bboxH: 'bbox_h',
|
|
conversationId: 'conversation_id',
|
|
historyId: 'history_id',
|
|
mergeId: 'merge_id',
|
|
traceId: 'trace_id',
|
|
faceId: 'face_id',
|
|
}
|
|
|
|
export function toSnakeCase(key: string): string {
|
|
if (PARAM_MAP[key]) return PARAM_MAP[key]
|
|
return key.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`)
|
|
}
|
|
|
|
export function mapParams(params: Record<string, any>): Record<string, any> {
|
|
const result: Record<string, any> = {}
|
|
for (const [key, value] of Object.entries(params)) {
|
|
if (value !== undefined && value !== null) {
|
|
result[toSnakeCase(key)] = value
|
|
}
|
|
}
|
|
return result
|
|
} |