From 270751e76ec73b0c2fc384f17ba83770c70dba59 Mon Sep 17 00:00:00 2001 From: hx <190679152@qq.com> Date: Fri, 8 May 2026 15:57:29 +0800 Subject: [PATCH] =?UTF-8?q?=E9=BB=98=E8=AE=A4=E8=B0=B7=E6=AD=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/Navbar.vue | 11 ++++-- src/utils/brand.js | 4 ++- src/views/dashboard/index.vue | 36 ++++++++++++++----- .../user/components/ProfileSettingsCard.vue | 2 ++ 4 files changed, 40 insertions(+), 13 deletions(-) diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 1b6dcae..417c691 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -31,7 +31,7 @@
- + {{ nickName }}
@@ -62,7 +62,7 @@ import Search from '@/components/HeaderSearch' import RuoYiGit from '@/components/RuoYi/Git' import RuoYiDoc from '@/components/RuoYi/Doc' import { getLanguage, setLanguage, languageOptions } from '@/utils/language' -import { getBrandedLoginPath } from '@/utils/brand' +import { getBrandedLoginPath, resolveBrandAsset } from '@/utils/brand' export default { emits: ['setLayout'], @@ -87,8 +87,13 @@ export default { 'avatar', 'device', 'nickName', - 'brandBusinessNo' + 'brandBusinessNo', + 'brand' ]), + headerAvatar() { + const brandLogo = resolveBrandAsset(this.brand && this.brand.appLogoUrl) + return brandLogo || this.avatar + }, setting: { get() { return this.$store.state.settings.showSettings diff --git a/src/utils/brand.js b/src/utils/brand.js index 6ebb724..a9c76d7 100644 --- a/src/utils/brand.js +++ b/src/utils/brand.js @@ -103,7 +103,9 @@ export function applyBrandFavicon(iconUrl) { if (typeof document === "undefined") { return; } - const href = iconUrl ? resolveBrandAsset(iconUrl) : getDefaultFaviconHref(); + const baseHref = iconUrl ? resolveBrandAsset(iconUrl) : getDefaultFaviconHref(); + const version = Date.now(); + const href = `${baseHref}${baseHref.includes("?") ? "&" : "?"}_v=${version}`; let link = document.querySelector("link[rel*='icon']"); if (!link) { link = document.createElement("link"); diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index 8e2db60..f1636b9 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -67,11 +67,11 @@ {{ $t("dashboard.overview.provider.google") }} - + {{ $t("dashboard.overview.provider.amap") }} - + {{ $t("dashboard.overview.provider.maptiler") }} @@ -86,13 +86,14 @@ :closable="false" class="dashboard-map-panel__alert" /> - -
+
+
@@ -254,7 +255,14 @@ export default { this.$message.warning((error && error.message) || this.$t("dashboard.overview.message.mapConfigLoadFailed")); } }, - async handleProviderChange() { + async handleProviderChange(provider) { + if (provider === "amap" && !this.hasAmapKey) { + this.$message.warning(this.$t("dashboard.overview.message.missingAmapKey")); + this.mapProvider = "google"; + } else if (provider === "maptiler" && !this.hasMaptilerKey) { + this.$message.warning(this.$t("dashboard.overview.message.missingMaptilerKey")); + this.mapProvider = "google"; + } await this.initCurrentMap(); this.renderMapPoints(); }, @@ -763,6 +771,16 @@ export default { border: 1px solid #ebeef5; } +.dashboard-map-empty-overlay { + position: absolute; + inset: 0; + z-index: 20; + pointer-events: none; + display: flex; + align-items: center; + justify-content: center; +} + :deep(.dashboard-map-popup) { line-height: 1.8; font-size: 12px; diff --git a/src/views/system/user/components/ProfileSettingsCard.vue b/src/views/system/user/components/ProfileSettingsCard.vue index 0b380f1..3a456e8 100644 --- a/src/views/system/user/components/ProfileSettingsCard.vue +++ b/src/views/system/user/components/ProfileSettingsCard.vue @@ -230,6 +230,8 @@ export default { .then(() => { this.$modal.msgSuccess(this.$t("profile.message.profileUpdated")); this.loadProfile(); + this.$store.dispatch("brand/loadCurrentBrand").catch(() => null); + this.$store.dispatch("GetInfo").catch(() => null); }) .finally(() => { this.profileSaving = false;