am-freescan/am-web/src/views/lab/inspection/display.ts
lixiaolong c903364fa2 feat: integrate dimension comparison and optimize task workbench
Connect task CAD, PDF and PLY to the supplier workspace and preserve paired result provenance. Add fixture framework download/copy, reduce idle map and task polling, improve tab navigation, and update standalone schema migration.
2026-11-12 10:24:55 +08:00

26 lines
688 B
TypeScript

export const statusText = (s: string) =>
({
processing: '计算中',
created: '待处理',
done: '计算完成',
blocked: '诊断结果',
error: '处理失败',
review: '待确认点云'
})[s] ||
s ||
'—'
export const dateText = (value: any) =>
value == null
? '—'
: typeof value === 'number'
? new Date(value).toLocaleString()
: String(value).replace('T', ' ').slice(0, 19)
export const inputName = (row: any, role: string) => {
try {
return JSON.parse(row.inputsJson || '{}')[role]?.name || '—'
} catch {
return '—'
}
}
export const fileSize = (n: number) => (n ? `${(n / 1024 / 1024).toFixed(2)} MB` : '—')