| | |
| | | ? [{ label: '扩展值', value: 'metricValue' as keyof DataRow }] |
| | | : fieldOptions.value) |
| | | const batteryOptions = computed(() => [...new Set(sourceRows.value.map(row => row.batteryNo).filter(Boolean))]) |
| | | // 最近数据时间取本测试已接收实时记录里最新的设备绝对时间,与展示刷新节奏无关。 |
| | | const latestRealtimeDataAt = computed(() => { |
| | | const times = rows.value.map(row => row.absoluteTime).filter(value => value && value !== '-') |
| | | return times.length ? times.reduce((latest, current) => (current > latest ? current : latest)) : '-' |
| | | }) |
| | | const cycleOptions = computed(() => [...new Set(sourceRows.value.map(row => row.cycleNo))].sort((a, b) => a - b)) |
| | | const stepOptions = computed(() => [...new Map(sourceRows.value.map(row => [row.stepNo, row.stepName])).entries()].filter(item => item[0] > 0).sort((a, b) => a[0] - b[0])) |
| | | const filteredRows = computed(() => |
| | |
| | | </nav> |
| | | <small>{{ loading ? '加载中...' : `共 ${filteredRows.length} 条` }}</small> |
| | | </header> |
| | | <p v-if="activeTab === 'realtime'" class="realtime-hint">最近数据时间:{{ latestRealtimeDataAt }} · 设备约 60 秒产生一行新数据,展示刷新比它快是正常的</p> |
| | | <div class="filter-grid"> |
| | | <label |
| | | ><span>电池</span><el-select v-model="filters.batteryNo" clearable placeholder="全部"><el-option label="全部" value="" /><el-option v-for="item in batteryOptions" :key="item" :label="item" :value="item" /></el-select></label |
| | |
| | | color: var(--ink); |
| | | font-size: 14px; |
| | | } |
| | | .realtime-hint { |
| | | margin: 0; |
| | | padding: 9px 16px; |
| | | border-bottom: 1px solid var(--line); |
| | | color: #71808d; |
| | | background: #f8fbfe; |
| | | font-size: 11px; |
| | | } |
| | | .section-heading span { |
| | | color: #81909d; |
| | | font-size: 10px; |