fix: list

This commit is contained in:
Fine 2024-01-16 18:07:53 +08:00
parent dd4e106c1c
commit b14f588254
2 changed files with 3 additions and 2 deletions

View File

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

View File

@ -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") || "[]");