From be94120ae3f95a7c0f8fe9d147dadb346b5d1f68 Mon Sep 17 00:00:00 2001 From: liushiting Date: Sun, 19 Jan 2020 17:09:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=B7=E6=96=B0=E6=97=B6=E9=97=B4=E5=91=A8?= =?UTF-8?q?=E6=9C=9F=E6=98=BE=E7=A4=BA=E5=86=85=E5=AE=B9=E4=B8=8D=E5=AF=B9?= =?UTF-8?q?=20=E5=92=8Cpanel=20=E6=97=A0=E6=B3=95=E6=96=B0=E5=BB=BApanel?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/page/dashboard/panel.vue | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/nezha-fronted/src/components/page/dashboard/panel.vue b/nezha-fronted/src/components/page/dashboard/panel.vue index b901e0fe3..97c423e3e 100644 --- a/nezha-fronted/src/components/page/dashboard/panel.vue +++ b/nezha-fronted/src/components/page/dashboard/panel.vue @@ -37,11 +37,11 @@ --> - Endpoint + {{showPanel.name}} - {{$t('dashboard.panel.createPanelTitleSec')}} - {{item.name}} + {{$t('dashboard.panel.createPanelTitleSec')}} + {{item.name}}
@@ -51,9 +51,9 @@ --> - +
@@ -62,7 +62,7 @@
  • - {{i.value}}{{i.name}} + {{i.name}}
@@ -274,10 +274,15 @@ export default { }, //面板相关操作 panelChange(val) { - + if(!val){ + this.toAdd(); + return false; + } //this.$refs.searchInput.select(); - this.filter.panelId = this.showPanel.id = val; + this.showPanel = val + this.filter.panelId = this.showPanel.id; this.getData(this.filter); + }, del: function (u) { this.$confirm(this.$t("tip.confirmDelete"), { @@ -426,8 +431,10 @@ export default { this.showPanel.name = this.$store.state.showPanel.name; this.showPanel.id = this.$store.state.showPanel.id; } + if (this.showPanel.id === '') { this.showPanel.id = response.data.list[0].id; + this.showPanel.name = response.data.list[0].name; this.filter.panelId = this.showPanel.id; this.getData(this.filter); }