forked from github/dataease
fix(仪表板): 修复公共链接中水印导致的控制台异常 #4060
This commit is contained in:
parent
8988eab268
commit
548e5e3361
@ -156,7 +156,7 @@ import bus from '@/utils/bus'
|
||||
import { buildFilterMap, buildViewKeyMap, formatCondition, valueValid, viewIdMatch } from '@/utils/conditionUtil'
|
||||
import { hasDataPermission } from '@/utils/permission'
|
||||
import { activeWatermark } from '@/components/canvas/tools/watermark'
|
||||
import { userLoginInfo } from '@/api/systemInfo/userLogin'
|
||||
import { proxyUserLoginInfo, userLoginInfo } from '@/api/systemInfo/userLogin'
|
||||
import html2canvas from 'html2canvasde'
|
||||
import { queryAll } from '@/api/panel/pdfTemplate'
|
||||
import PDFPreExport from '@/views/panel/export/PDFPreExport'
|
||||
@ -457,7 +457,8 @@ export default {
|
||||
if (this.userInfo) {
|
||||
activeWatermark(this.panelInfo.watermarkInfo.settingContent, this.userInfo, waterDomId, this.canvasId, this.panelInfo.watermarkOpen)
|
||||
} else {
|
||||
userLoginInfo().then(res => {
|
||||
const method = this.userId ? proxyUserLoginInfo : userLoginInfo
|
||||
method(this.userId).then(res => {
|
||||
this.userInfo = res.data
|
||||
activeWatermark(this.panelInfo.watermarkInfo.settingContent, this.userInfo, waterDomId, this.canvasId, this.panelInfo.watermarkOpen)
|
||||
})
|
||||
|
@ -565,6 +565,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
userInfo: null,
|
||||
canvasId: 'canvas-main',
|
||||
panelCacheExist: false,
|
||||
viewData: [],
|
||||
@ -798,6 +799,18 @@ export default {
|
||||
this.initWatermark()
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
rightDrawOpen: {
|
||||
handler(newVal, oldVla) {
|
||||
this.initWatermark()
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
outStyle: {
|
||||
handler(newVal, oldVla) {
|
||||
this.initWatermark()
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@ -831,9 +844,15 @@ export default {
|
||||
methods: {
|
||||
initWatermark() {
|
||||
if (this.panelInfo.watermarkInfo) {
|
||||
this.$nextTick(() => {
|
||||
if (this.userInfo) {
|
||||
activeWatermark(this.panelInfo.watermarkInfo.settingContent, this.userInfo, 'canvasInfo-main', this.canvasId, this.panelInfo.watermarkOpen)
|
||||
} else {
|
||||
userLoginInfo().then(res => {
|
||||
const userInfo = res.data
|
||||
activeWatermark(this.panelInfo.watermarkInfo.settingContent, userInfo, 'canvasInfo-main', this.canvasId, this.panelInfo.watermarkOpen)
|
||||
this.userInfo = res.data
|
||||
activeWatermark(this.panelInfo.watermarkInfo.settingContent, this.userInfo, 'canvasInfo-main', this.canvasId, this.panelInfo.watermarkOpen)
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user