From 548e5e3361cb067c136766fa71234fd57eb6f98c Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Mon, 12 Dec 2022 17:40:19 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=85=AC=E5=85=B1=E9=93=BE=E6=8E=A5=E4=B8=AD=E6=B0=B4?= =?UTF-8?q?=E5=8D=B0=E5=AF=BC=E8=87=B4=E7=9A=84=E6=8E=A7=E5=88=B6=E5=8F=B0?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=20#4060?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../canvas/components/editor/Preview.vue | 5 ++- frontend/src/views/panel/edit/index.vue | 43 +++++++++++++------ 2 files changed, 34 insertions(+), 14 deletions(-) diff --git a/frontend/src/components/canvas/components/editor/Preview.vue b/frontend/src/components/canvas/components/editor/Preview.vue index 9e1b6dd97d..59e9220595 100644 --- a/frontend/src/components/canvas/components/editor/Preview.vue +++ b/frontend/src/components/canvas/components/editor/Preview.vue @@ -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) }) diff --git a/frontend/src/views/panel/edit/index.vue b/frontend/src/views/panel/edit/index.vue index 27c14f0d62..bfb9fa9dcb 100644 --- a/frontend/src/views/panel/edit/index.vue +++ b/frontend/src/views/panel/edit/index.vue @@ -165,12 +165,12 @@ v-show=" show &&showIndex===1" :canvas-id="canvasId" /> - - + + - + - + {{ panelInfo.name }} @@ -205,7 +205,7 @@ class="this_mobile_canvas_main" :style="mobileCanvasStyle" > - + - + - + @@ -268,7 +268,7 @@ />
- +
@@ -287,7 +287,7 @@ >{{ $t('panel.position_adjust') }} - +
{ - const userInfo = res.data - activeWatermark(this.panelInfo.watermarkInfo.settingContent, userInfo, 'canvasInfo-main', this.canvasId, this.panelInfo.watermarkOpen) + this.$nextTick(() => { + if (this.userInfo) { + activeWatermark(this.panelInfo.watermarkInfo.settingContent, this.userInfo, 'canvasInfo-main', this.canvasId, this.panelInfo.watermarkOpen) + } else { + userLoginInfo().then(res => { + this.userInfo = res.data + activeWatermark(this.panelInfo.watermarkInfo.settingContent, this.userInfo, 'canvasInfo-main', this.canvasId, this.panelInfo.watermarkOpen) + }) + } }) } },