Add scanner API integration, workflow components, execution-bound live images and 3D model viewing. Harden task control, parameters, resource protection and reports, with automated regressions and detailed verification records.
15 lines
1020 B
JavaScript
15 lines
1020 B
JavaScript
export const isLiveScannerExecution = status => ['RUNNING', 'PAUSED'].includes(status)
|
|
export const scannerViewCaption = (view = {}, active = true, watching = true) => {
|
|
if (!active || !watching) return '已暂停查看画面,扫描任务继续按流程执行'
|
|
if (!view.available) return view.message || '等待本次执行建立扫描工程关联'
|
|
if (view.executionStatus === 'PAUSED' && view.scanning) return '流程已暂停,设备仍在采集,请核对停止状态'
|
|
if (!view.previewEnabled) return '当前工程尚未开启预览,请检查流程中的开启预览步骤'
|
|
return view.scanning ? '正在采集' : '采集已暂停,查看当前工程画面'
|
|
}
|
|
|
|
// A late response from a previous sample/attempt must never update the current sample.
|
|
export const acceptsScannerFrame = (request, current) =>
|
|
request.generation === current.generation &&
|
|
String(request.executionId) === String(current.executionId) &&
|
|
current.active && current.watching && isLiveScannerExecution(current.status)
|