From 1fd90f65da671b04c70eae35b006d6090d876be3 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Fri, 18 Apr 2025 16:54:41 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BB=AA=E8=A1=A8?= =?UTF-8?q?=E6=9D=BF=E7=BC=96=E8=BE=91=E7=95=8C=E9=9D=A2=E5=8F=AA=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E5=90=8E=E6=96=B0=E9=A1=B5=E9=9D=A2=E9=A2=84=E8=A7=88?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E5=88=B0=E7=9B=AE=E6=A0=87=E4=BB=AA=E8=A1=A8?= =?UTF-8?q?=E6=9D=BF=E5=8F=AF=E8=83=BD=E6=9C=AA=E8=81=94=E5=8A=A8=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/dataease/chart/manage/ChartViewManege.java | 1 + .../src/views/data-visualization/PreviewCanvas.vue | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/core/core-backend/src/main/java/io/dataease/chart/manage/ChartViewManege.java b/core/core-backend/src/main/java/io/dataease/chart/manage/ChartViewManege.java index 40c3ae11e4..06d44c441c 100644 --- a/core/core-backend/src/main/java/io/dataease/chart/manage/ChartViewManege.java +++ b/core/core-backend/src/main/java/io/dataease/chart/manage/ChartViewManege.java @@ -94,6 +94,7 @@ public class ChartViewManege { SnapshotCoreChartView coreChartView = snapshotCoreChartViewMapper.selectById(id); SnapshotCoreChartView record = transDTO2Record(chartViewDTO); if (ObjectUtils.isEmpty(coreChartView)) { + snapshotCoreChartViewMapper.deleteById(record.getId()); snapshotCoreChartViewMapper.insert(record); } else { UpdateWrapper updateWrapper = new UpdateWrapper<>(); diff --git a/core/core-frontend/src/views/data-visualization/PreviewCanvas.vue b/core/core-frontend/src/views/data-visualization/PreviewCanvas.vue index eb921cf79e..6d1af1a694 100644 --- a/core/core-frontend/src/views/data-visualization/PreviewCanvas.vue +++ b/core/core-frontend/src/views/data-visualization/PreviewCanvas.vue @@ -34,7 +34,7 @@ const state = reactive({ curPreviewGap: 0, initState: true, editPreview: false, - showPosition: null, + showPosition: 'preview', showOffset: { top: 3, left: 3 @@ -206,6 +206,7 @@ onMounted(async () => { state.editPreview = router.currentRoute.value.query.editPreview === 'true' dvMainStore.setIframeFlag(isFrameFlag) dvMainStore.setIsPopWindow(isPopWindow) + state.showPosition = state.editPreview ? 'edit-preview' : 'preview' const { dvType, callBackFlag, taskId, showWatermark } = router.currentRoute.value.query if (!!taskId) { dvMainStore.setCanvasAttachInfo({ taskId, showWatermark }) @@ -257,6 +258,7 @@ defineExpose({ :is-selector="props.isSelector" :download-status="downloadStatus" :show-pop-bar="true" + :show-position="state.showPosition" :show-linkage-button="false" >