fix: 排查并修复对无数据未做处理的问题

This commit is contained in:
刘洪洪
2023-09-07 11:35:01 +08:00
parent 6072bd0479
commit 0b859bda88
3 changed files with 24 additions and 14 deletions

View File

@@ -114,11 +114,13 @@ export default {
if (response.status === 200) {
this.showError = false
this.isNoData = res.data.result.length === 0
res.data.result.forEach(e => {
if (e.startTime) {
e.startTime = dateFormatByAppearance(e.startTime)
}
})
if (!this.isNoData) {
res.data.result.forEach(e => {
if (e.startTime) {
e.startTime = dateFormatByAppearance(e.startTime)
}
})
}
this.tableData = res.data.result
} else {
this.httpError(res)