From bfbeb179c07fae4d09451b0dcd79c354e82cbfd7 Mon Sep 17 00:00:00 2001 From: hanyuxia Date: Fri, 21 Feb 2020 22:01:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E6=94=B9BUG=20dashboard=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=201.=E8=BF=9E=E7=BB=AD=E7=82=B9=E5=87=BBdashboard=20p?= =?UTF-8?q?anel=E9=A1=B5=E9=9D=A2=E6=90=9C=E7=B4=A0=E6=8C=89=E9=92=AE?= =?UTF-8?q?=EF=BC=8C=E7=95=8C=E9=9D=A2=E6=8F=90=E7=A4=BA=E9=94=99=E8=AF=AF?= =?UTF-8?q?=EF=BC=8C=E6=B2=A1=E6=9C=89=E6=98=BE=E7=A4=BA=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/charts/chart-list.vue | 5 +---- .../src/components/page/dashboard/panel.vue | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/nezha-fronted/src/components/charts/chart-list.vue b/nezha-fronted/src/components/charts/chart-list.vue index 25f4147cb..44ec7cc13 100644 --- a/nezha-fronted/src/components/charts/chart-list.vue +++ b/nezha-fronted/src/components/charts/chart-list.vue @@ -370,10 +370,7 @@ export default { } }).catch((error) => { if (error) { - this.$message.error({ - content: this.$t("tip.refreshLater"),//'Please refesh later',//请稍后刷新 - duration: 3, - }); + this.$message.error(error.toString()); } }); }); diff --git a/nezha-fronted/src/components/page/dashboard/panel.vue b/nezha-fronted/src/components/page/dashboard/panel.vue index 6d720f309..172c147d3 100644 --- a/nezha-fronted/src/components/page/dashboard/panel.vue +++ b/nezha-fronted/src/components/page/dashboard/panel.vue @@ -458,8 +458,21 @@ this.$store.state.showPanel.id = 0; this.$store.state.showPanel.name = ''; + }else { + if(response.msg){ + this.$message.error(response.msg); + }else if(response.error){ + this.$message.error(response.error); + }else { + this.$message.error(response); + } } - }) + }).catch((error) => { + //console.log('error................'+JSON.stringify(error)); + if (error) { + this.$message.error(error.toString()); + } + }); }, //定期刷新 selectInterval(val) {