Merge pull request #6415 from dataease/pr@dev-v2@refactor_screen

refactor: 文案、大屏背景优化
This commit is contained in:
王嘉豪 2023-10-30 12:16:02 +08:00 committed by GitHub
commit 6151a995b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 12 deletions

View File

@ -110,7 +110,7 @@
{{ t('visualization.view') }} {{ t('visualization.view') }}
</el-radio> </el-radio>
<el-radio label="custom" :effect="themes"> <el-radio label="custom" :effect="themes">
{{ t('visualization.panel') }} {{ resourceType }}
</el-radio> </el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
@ -175,6 +175,8 @@ const props = defineProps({
const toolTip = computed(() => { const toolTip = computed(() => {
return props.themes === 'dark' ? 'ndark' : 'dark' return props.themes === 'dark' ? 'ndark' : 'dark'
}) })
const resourceType = computed(() => (dvInfo.value.type === 'dashboard' ? '仪表板' : '数据大屏'))
const themeChange = modifyName => { const themeChange = modifyName => {
if (modifyName === 'themeColor') { if (modifyName === 'themeColor') {
// //

View File

@ -4,7 +4,8 @@ import JsPDF from 'jspdf'
const basePath = import.meta.env.VITE_API_BASEPATH const basePath = import.meta.env.VITE_API_BASEPATH
export function imgUrlTrans(url) { export function imgUrlTrans(url) {
if (url && typeof url === 'string' && url.indexOf('static-resource') > -1) { if (url) {
if (typeof url === 'string' && url.indexOf('static-resource') > -1) {
const rawUrl = url const rawUrl = url
? (basePath.endsWith('/') ? basePath.substring(0, basePath.length - 1) : basePath) + url ? (basePath.endsWith('/') ? basePath.substring(0, basePath.length - 1) : basePath) + url
: null : null
@ -17,6 +18,7 @@ export function imgUrlTrans(url) {
return url.replace('com//', 'com/') return url.replace('com//', 'com/')
} }
} }
}
export function downloadCanvas(type, canvasDom, name, callBack?) { export function downloadCanvas(type, canvasDom, name, callBack?) {
// const canvasDom = document.getElementById(canvasId) // const canvasDom = document.getElementById(canvasId)