From b14f588254e944b15683fde7cf020f5aefb9e1f5 Mon Sep 17 00:00:00 2001 From: Fine Date: Tue, 16 Jan 2024 18:07:53 +0800 Subject: [PATCH] fix: list --- src/store/modules/dashboard.ts | 3 +-- src/views/dashboard/List.vue | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/store/modules/dashboard.ts b/src/store/modules/dashboard.ts index 6aa3da63..6aca1c06 100644 --- a/src/store/modules/dashboard.ts +++ b/src/store/modules/dashboard.ts @@ -429,8 +429,7 @@ export const dashboardStore = defineStore({ d.layer === this.currentDashboard?.layer, ); if (index > -1) { - const { t } = useI18n(); - ElMessage.error(t("nameError")); + ElMessage.error("The dashboard name cannot be duplicate"); return; } res = await graphql.query("addNewTemplate").params({ setting: { configuration: JSON.stringify(c) } }); diff --git a/src/views/dashboard/List.vue b/src/views/dashboard/List.vue index 40e76bb9..e57a92df 100644 --- a/src/views/dashboard/List.vue +++ b/src/views/dashboard/List.vue @@ -336,6 +336,7 @@ limitations under the License. --> dashboards.value = dashboardStore.dashboards; loading.value = false; dashboardFile.value = null; + searchDashboards(currentPage.value); } function exportTemplates() { if (!multipleSelection.value.length) { @@ -597,6 +598,7 @@ limitations under the License. --> loading.value = false; sessionStorage.setItem("dashboards", JSON.stringify(dashboards.value)); sessionStorage.removeItem(`${row.layer}_${row.entity}_${row.name}`); + searchDashboards(currentPage.value); } function searchDashboards(pageIndex: number) { const list = JSON.parse(sessionStorage.getItem("dashboards") || "[]");