| | |
| | | const detail = backendDetail.value |
| | | if (!detail) return [] as Array<[string, string]> |
| | | const thresholds = (detail.thresholds || []).map(item => `${item.metricCode}: ${item.minValue ?? '-'} ~ ${item.maxValue ?? '-'} ${item.unit}`).join(';') |
| | | const sharedFields = (detail.fieldSnapshots || []).map(item => `${item.fieldName}: ${item.fieldValue ?? '-'}`).join(';') |
| | | const currentFields = detail.batteries |
| | | .flatMap(battery => battery.fields || []) |
| | | .filter((field, index, all) => all.findIndex(item => item.fieldName === field.fieldName) === index) |
| | | const sharedFields = currentFields.length |
| | | ? currentFields.map(item => `${item.fieldName}: ${item.fieldValue ?? '-'}`).join(';') |
| | | : (detail.fieldSnapshots || []).map(item => `${item.fieldName}: ${item.fieldValue ?? '-'}`).join(';') |
| | | return [ |
| | | ['测试名称', detail.testName || '-'], ['创建者', detail.creatorName || '-'], ['负责人', detail.principalName || '-'], |
| | | ['测试类型', detail.testTypeName || '-'], ['测试目的', detail.testPurpose || '-'], ['创建时间', formatDateTime(detail.createTime)], |