From 4cc7891008c7c1d841b998bda92117995e9eb637 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B4=AA=E6=B4=AA?= <2498601771@qq.com> Date: Mon, 28 Nov 2022 18:29:46 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B0=86=E4=B9=8B=E5=89=8D=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E6=8F=90=E7=A4=BA=E7=9A=84msg=E6=94=B9=E4=B8=BAmessag?= =?UTF-8?q?e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../charts2/charts/linkMonitor/LinkDirectionGrid.vue | 8 +++----- src/views/charts2/charts/linkMonitor/LinkTrafficLine.vue | 7 ++++--- .../localComponents/LinkTrafficDrillDownList.vue | 4 +--- src/views/charts2/charts/npm/NpmAppCategoryScore.vue | 1 - src/views/charts2/charts/npm/NpmIpMap.vue | 1 - src/views/charts2/charts/npm/NpmMap.vue | 1 - 6 files changed, 8 insertions(+), 14 deletions(-) diff --git a/src/views/charts2/charts/linkMonitor/LinkDirectionGrid.vue b/src/views/charts2/charts/linkMonitor/LinkDirectionGrid.vue index ff3eac8b..f0e2b242 100644 --- a/src/views/charts2/charts/linkMonitor/LinkDirectionGrid.vue +++ b/src/views/charts2/charts/linkMonitor/LinkDirectionGrid.vue @@ -225,18 +225,16 @@ export default { } else { this.isLinkNoData = false this.isNextShowError = true - // todo 此时返回的是msg,后期记得改为message - this.nextErrorMsg = res[1].msg + this.nextErrorMsg = res[1].message } }).catch(e => { console.error(e) this.isLinkShowError = true - // todo 此时返回的是msg,后期记得改为message - this.linkErrorMsg = e[0].msg + this.linkErrorMsg = e[0].message this.isNextShowError = true - this.nextErrorMsg = e[1].msg + this.nextErrorMsg = e[1].message }).finally(() => { this.toggleLoading(false) }) diff --git a/src/views/charts2/charts/linkMonitor/LinkTrafficLine.vue b/src/views/charts2/charts/linkMonitor/LinkTrafficLine.vue index dfa33b43..80d15601 100644 --- a/src/views/charts2/charts/linkMonitor/LinkTrafficLine.vue +++ b/src/views/charts2/charts/linkMonitor/LinkTrafficLine.vue @@ -277,9 +277,7 @@ export default { }) } else { this.showError = true - // todo 此时返回的是msg,后期记得改 - this.errorMsg = res.msg - // this.errorMsg = res.message + this.errorMsg = res.message } }).catch(e => { console.error(e) @@ -475,6 +473,9 @@ export default { beforeUnmount () { clearTimeout(this.timer) window.removeEventListener('resize', this.resize) + this.myChart = null + this.chartOption = null + this.unitConvert = null } } diff --git a/src/views/charts2/charts/linkMonitor/localComponents/LinkTrafficDrillDownList.vue b/src/views/charts2/charts/linkMonitor/localComponents/LinkTrafficDrillDownList.vue index 90bd7543..a36bf802 100644 --- a/src/views/charts2/charts/linkMonitor/localComponents/LinkTrafficDrillDownList.vue +++ b/src/views/charts2/charts/linkMonitor/localComponents/LinkTrafficDrillDownList.vue @@ -151,9 +151,7 @@ export default { this.linkTrafficListData.npmScore = computeScore(data) } else { this.showError = true - // todo 此时返回的是msg,后期记得改 - this.errorMsg = res.msg - // this.errorMsg = res.message + this.errorMsg = res.message } }).catch(e => { console.error(e) diff --git a/src/views/charts2/charts/npm/NpmAppCategoryScore.vue b/src/views/charts2/charts/npm/NpmAppCategoryScore.vue index 0aedb810..92d9ac8d 100644 --- a/src/views/charts2/charts/npm/NpmAppCategoryScore.vue +++ b/src/views/charts2/charts/npm/NpmAppCategoryScore.vue @@ -242,7 +242,6 @@ export default { }) } else { this.showError = true - // todo 此处目前返回字段为msg,后续字段会修改为message msg = msg + ',' + r.message if (msg.indexOf(',') === 0) { msg = msg.substring(1, msg.length) diff --git a/src/views/charts2/charts/npm/NpmIpMap.vue b/src/views/charts2/charts/npm/NpmIpMap.vue index 3f8459b0..86fc86cd 100644 --- a/src/views/charts2/charts/npm/NpmIpMap.vue +++ b/src/views/charts2/charts/npm/NpmIpMap.vue @@ -123,7 +123,6 @@ export default { }) } else { this.showError = true - // todo 目前返回的字段为msg,以后将改为message this.errorMsg = r.message } }) diff --git a/src/views/charts2/charts/npm/NpmMap.vue b/src/views/charts2/charts/npm/NpmMap.vue index e9f0f820..2cc9bc23 100644 --- a/src/views/charts2/charts/npm/NpmMap.vue +++ b/src/views/charts2/charts/npm/NpmMap.vue @@ -142,7 +142,6 @@ export default { }) } else { this.showError = true - // todo 此处目前返回字段为msg,后续字段会修改为message msg = msg + ',' + r.message if (msg.indexOf(',') === 0) { msg = msg.substring(1, msg.length)