refactor: 文案、大屏背景优化

This commit is contained in:
wangjiahao 2023-10-30 12:01:33 +08:00
parent fd88f001e9
commit d470e2b1c9
2 changed files with 16 additions and 12 deletions

View File

@ -110,7 +110,7 @@
{{ t('visualization.view') }}
</el-radio>
<el-radio label="custom" :effect="themes">
{{ t('visualization.panel') }}
{{ resourceType }}
</el-radio>
</el-radio-group>
</el-form-item>
@ -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') {
//

View File

@ -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/')
}
}
}