From d470e2b1c96ff66b4fbd86035f7ad9d674cca725 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Mon, 30 Oct 2023 12:01:33 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E6=96=87=E6=A1=88=E3=80=81?= =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E8=83=8C=E6=99=AF=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dashboard-style/OverallSetting.vue | 4 +++- core/core-frontend/src/utils/imgUtils.ts | 24 ++++++++++--------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/core/core-frontend/src/components/dashboard/subject-setting/dashboard-style/OverallSetting.vue b/core/core-frontend/src/components/dashboard/subject-setting/dashboard-style/OverallSetting.vue index 931548c386..9b59e77347 100644 --- a/core/core-frontend/src/components/dashboard/subject-setting/dashboard-style/OverallSetting.vue +++ b/core/core-frontend/src/components/dashboard/subject-setting/dashboard-style/OverallSetting.vue @@ -110,7 +110,7 @@ {{ t('visualization.view') }} - {{ t('visualization.panel') }} + {{ resourceType }} @@ -175,6 +175,8 @@ const props = defineProps({ const toolTip = computed(() => { return props.themes === 'dark' ? 'ndark' : 'dark' }) + +const resourceType = computed(() => (dvInfo.value.type === 'dashboard' ? '仪表板' : '数据大屏')) const themeChange = modifyName => { if (modifyName === 'themeColor') { // 主题变更 diff --git a/core/core-frontend/src/utils/imgUtils.ts b/core/core-frontend/src/utils/imgUtils.ts index a6d85aff49..73f4c485c2 100644 --- a/core/core-frontend/src/utils/imgUtils.ts +++ b/core/core-frontend/src/utils/imgUtils.ts @@ -4,17 +4,19 @@ import JsPDF from 'jspdf' const basePath = import.meta.env.VITE_API_BASEPATH export function imgUrlTrans(url) { - if (url && typeof url === 'string' && url.indexOf('static-resource') > -1) { - const rawUrl = url - ? (basePath.endsWith('/') ? basePath.substring(0, basePath.length - 1) : basePath) + url - : null - return window.DataEaseBi - ? `${window.DataEaseBi.baseUrl}${ - rawUrl.startsWith('/api') ? rawUrl.slice(5) : rawUrl - }`.replace('com//', 'com/') - : rawUrl - } else { - return url.replace('com//', 'com/') + if (url) { + if (typeof url === 'string' && url.indexOf('static-resource') > -1) { + const rawUrl = url + ? (basePath.endsWith('/') ? basePath.substring(0, basePath.length - 1) : basePath) + url + : null + return window.DataEaseBi + ? `${window.DataEaseBi.baseUrl}${ + rawUrl.startsWith('/api') ? rawUrl.slice(5) : rawUrl + }`.replace('com//', 'com/') + : rawUrl + } else { + return url.replace('com//', 'com/') + } } }