fix: 优化精简代码

This commit is contained in:
刘洪洪
2023-03-24 16:37:12 +08:00
parent 50296a6291
commit 102f99e4f5
13 changed files with 177 additions and 175 deletions

View File

@@ -184,14 +184,11 @@ export default {
this.initData(res.data.result, newVal, active, show, n)
}
} else {
this.showError = true
this.errorMsg = this.errorMsgHandler(res)
this.httpError(res)
}
}).catch(e => {
console.error(e)
this.isNoData = false
this.showError = true
this.errorMsg = this.errorMsgHandler(e)
this.httpError(e)
}).finally(() => {
this.toggleLoading(false)
})
@@ -542,6 +539,11 @@ export default {
this.$store.commit('setRangeEchartsData', rangeObj)
}
}
},
httpError (e) {
this.isNoData = false
this.showError = true
this.errorMsg = this.errorMsgHandler(e)
}
},
mounted () {