实施测试特性曲线与结果展示特性曲线不一致问题
This commit is contained in:
@@ -123,6 +123,30 @@ const normalizeFormalRealPayload = (payload: any) => {
|
||||
}
|
||||
}
|
||||
|
||||
const extractResultArray = (payload: any) => {
|
||||
if (Array.isArray(payload)) {
|
||||
return payload
|
||||
}
|
||||
|
||||
if (Array.isArray(payload?.data)) {
|
||||
return payload.data
|
||||
}
|
||||
|
||||
if (Array.isArray(payload?.data?.records)) {
|
||||
return payload.data.records
|
||||
}
|
||||
|
||||
if (Array.isArray(payload?.records)) {
|
||||
return payload.records
|
||||
}
|
||||
|
||||
if (Array.isArray(payload?.list)) {
|
||||
return payload.list
|
||||
}
|
||||
|
||||
return [] as any[]
|
||||
}
|
||||
|
||||
const handleSocketMessage = (payload: any) => {
|
||||
const requestId = `${payload?.requestId ?? ''}`
|
||||
const normalizedRequestId = requestId.trim().toLowerCase()
|
||||
@@ -289,7 +313,7 @@ const handleStart = async () => {
|
||||
const historyResult = await getFreqConverterResult({
|
||||
converterId: mapping.freqConverterId
|
||||
})
|
||||
historyResultData.value = historyResult?.data ?? historyResult
|
||||
historyResultData.value = extractResultArray(historyResult?.data ?? historyResult)
|
||||
} else {
|
||||
historyResultData.value = null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user