From 9940b3cbf42c2e56cdde1df926a3e8438fe86ce8 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Thu, 13 Jun 2024 19:25:24 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=95=B0=E6=8D=AE=E5=A4=A7=E5=B1=8F):=20?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=A4=A7=E5=B1=8F=E6=94=AF=E6=8C=81=E5=A4=8D?= =?UTF-8?q?=E7=94=A8=E7=BB=84=E4=BB=B6=E5=8A=9F=E8=83=BD=20#9545?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../store/modules/data-visualization/copy.ts | 11 +++-- .../MultiplexPreviewShow.vue | 43 +++++++++++++------ .../views/data-visualization/PreviewShow.vue | 20 +++++++-- 3 files changed, 54 insertions(+), 20 deletions(-) diff --git a/core/core-frontend/src/store/modules/data-visualization/copy.ts b/core/core-frontend/src/store/modules/data-visualization/copy.ts index 30e41163b8..61f1602246 100644 --- a/core/core-frontend/src/store/modules/data-visualization/copy.ts +++ b/core/core-frontend/src/store/modules/data-visualization/copy.ts @@ -42,6 +42,7 @@ export const copyStore = defineStore('copy', { ) { // eslint-disable-next-line @typescript-eslint/no-this-alias const _this = this + const { width, height, scale } = canvasStyleData.value Object.keys(outerMultiplexingComponents).forEach(function (componentId, index) { const newComponent = deepCopy(outerMultiplexingComponents[componentId]) newComponent.canvasId = 'canvas-main' @@ -56,10 +57,10 @@ export const copyStore = defineStore('copy', { newComponent.x = newComponent.sizeX * xPositionOffset + 1 newComponent.y = 200 // dataV 数据大屏 - newComponent.style.width = canvasStyleData.value.width / 3 - newComponent.style.height = canvasStyleData.value.height / 3 - newComponent.style.left = newComponent.style.width * xPositionOffset - newComponent.style.top = newComponent.style.height * yPositionOffset + newComponent.style.width = (width * scale) / 400 + newComponent.style.height = (height * scale) / 400 + newComponent.style.left = 0 + newComponent.style.top = 0 } _this.copyData = { data: [newComponent], @@ -85,6 +86,8 @@ export const copyStore = defineStore('copy', { } const dataArray = this.copyData.data + console.log('past=' + JSON.stringify(dataArray)) + let i = 0 const copyDataTemp = this.copyData const moveTime = dataArray.length > 1 ? 300 : 10 diff --git a/core/core-frontend/src/views/data-visualization/MultiplexPreviewShow.vue b/core/core-frontend/src/views/data-visualization/MultiplexPreviewShow.vue index 80185079c6..a1c9e0c776 100644 --- a/core/core-frontend/src/views/data-visualization/MultiplexPreviewShow.vue +++ b/core/core-frontend/src/views/data-visualization/MultiplexPreviewShow.vue @@ -1,6 +1,7 @@