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); }