|
@@ -37,7 +37,7 @@ import { tracksByOrder } from './workOrderTimeline.js'
|
|
|
import { eventLevelTag, shortEventTime, eventStatusText, eventTypeText, eventNameText } from './eventList.js'
|
|
import { eventLevelTag, shortEventTime, eventStatusText, eventTypeText, eventNameText } from './eventList.js'
|
|
|
import { statusVocabulary } from './eventStatusVocab.js'
|
|
import { statusVocabulary } from './eventStatusVocab.js'
|
|
|
import { pagedRows } from './pagination.js'
|
|
import { pagedRows } from './pagination.js'
|
|
|
-import { detailEventLevel, collectionCellAlert, collectionGroupAccent } from './equipmentDetailColors.js'
|
|
|
|
|
|
|
+import { detailEventLevel, collectionCellAssessment, collectionGroupAccent } from './equipmentDetailColors.js'
|
|
|
|
|
|
|
|
const RECORD_TEXT = {
|
|
const RECORD_TEXT = {
|
|
|
COD: '化学需氧量(COD)', PH: '酸碱度(pH)', pH: '酸碱度(pH)',
|
|
COD: '化学需氧量(COD)', PH: '酸碱度(pH)', pH: '酸碱度(pH)',
|
|
@@ -119,10 +119,11 @@ export function collectionRecordTable(data, page = 1) {
|
|
|
const reading = view.layout === 'long' && indicator ? splitIndicatorReading(text) : null
|
|
const reading = view.layout === 'long' && indicator ? splitIndicatorReading(text) : null
|
|
|
// 分离列布局中的纯名称不是数值,只有「名称:读数」组合才需要分栏。
|
|
// 分离列布局中的纯名称不是数值,只有「名称:读数」组合才需要分栏。
|
|
|
const isReading = isReadingColumn(column, view.layout) && (!indicator || Boolean(reading?.label))
|
|
const isReading = isReadingColumn(column, view.layout) && (!indicator || Boolean(reading?.label))
|
|
|
|
|
+ const assessment = isReading ? collectionCellAssessment(cell) : null
|
|
|
return {
|
|
return {
|
|
|
- key: column.key, text, isReading, reading,
|
|
|
|
|
|
|
+ key: column.key, text, isReading, reading, assessment,
|
|
|
alarm: cell?.alarm === true,
|
|
alarm: cell?.alarm === true,
|
|
|
- alert: isReading ? collectionCellAlert(cell) : null,
|
|
|
|
|
|
|
+ alert: assessment?.alert || null,
|
|
|
audioPath: column.isAudio && text !== DETAIL_PLACEHOLDER ? text : '',
|
|
audioPath: column.isAudio && text !== DETAIL_PLACEHOLDER ? text : '',
|
|
|
audioLabel: column.isAudio ? column.label : '',
|
|
audioLabel: column.isAudio ? column.label : '',
|
|
|
}
|
|
}
|
|
@@ -148,8 +149,9 @@ export function collectionRecordTable(data, page = 1) {
|
|
|
groups.push({ key: rows[start].groupKey, rows: rows.slice(start, end), isLatest: rows[start].latestGroup, ...rows[start].accent })
|
|
groups.push({ key: rows[start].groupKey, rows: rows.slice(start, end), isLatest: rows[start].latestGroup, ...rows[start].accent })
|
|
|
start = end
|
|
start = end
|
|
|
}
|
|
}
|
|
|
|
|
+ const hasUnknown = allRows.some((row) => row.cells.some((cell) => cell.assessment?.state === 'unknown'))
|
|
|
return { ...window, rows, columns, groups,
|
|
return { ...window, rows, columns, groups,
|
|
|
- assessmentNote: '采集接口暂未提供阈值、预警判定与等级;当前仅按已返回的报警标记着色,绿色为最新记录默认强调。',
|
|
|
|
|
|
|
+ assessmentNote: hasUnknown ? '部分指标暂未判定(阈值未配置、数据缺失或接口未提供);白色读数不代表正常,绿色行底仅为最新采集默认强调。' : '',
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|