两位小数
This commit is contained in:
parent
f2b50e5b80
commit
09a71eefd3
@ -442,7 +442,8 @@ const queryHistoryData = () => {
|
|||||||
startTime: new Date(timeRange.value[0]).getTime(),
|
startTime: new Date(timeRange.value[0]).getTime(),
|
||||||
endTime: new Date(timeRange.value[1]).getTime(),
|
endTime: new Date(timeRange.value[1]).getTime(),
|
||||||
} as any
|
} as any
|
||||||
historyReq(requestData).then((res) => {
|
historyReq(requestData)
|
||||||
|
.then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
const result = res.data
|
const result = res.data
|
||||||
if (Object.keys(result)?.length) {
|
if (Object.keys(result)?.length) {
|
||||||
@ -453,7 +454,7 @@ const queryHistoryData = () => {
|
|||||||
tableData.push({
|
tableData.push({
|
||||||
name: item,
|
name: item,
|
||||||
times: realResult[item].times,
|
times: realResult[item].times,
|
||||||
value: realResult[item].values.map((val: any) => (val === 0 ? 0 : val.toFixed(2))),
|
value: realResult[item].values.map((val: any) => (val === 0 ? 0 : val?.toFixed(2))),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -486,6 +487,9 @@ const queryHistoryData = () => {
|
|||||||
ElMessage.warning('查询失败')
|
ElMessage.warning('查询失败')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
.finally(() => {
|
||||||
|
reportLoading.value = false
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 时间转换
|
// 时间转换
|
||||||
|
Loading…
Reference in New Issue
Block a user