From 86f49da257e234d51cd2a49d354de6dbaa2a8b71 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Tue, 13 Aug 2024 19:09:05 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E4=BB=AA=E8=A1=A8=E6=9D=BF=E3=80=81?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=A4=A7=E5=B1=8F):=20=E5=A4=8D=E7=94=A8?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E4=B8=BB=E4=BD=93=E9=80=82=E9=85=8D=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E4=BC=B8=E7=BC=A9=E6=96=B9=E5=BC=8F=E4=BC=98=E5=8C=96?= =?UTF-8?q?=EF=BC=8C=E6=94=AF=E6=8C=81=E5=8E=9F=E5=B0=BA=E5=AF=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../custom-component/rich-text/DeRichTextView.vue | 9 ++++++--- .../src/store/modules/data-visualization/copy.ts | 13 +++++++++---- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/core/core-frontend/src/custom-component/rich-text/DeRichTextView.vue b/core/core-frontend/src/custom-component/rich-text/DeRichTextView.vue index 31f3f9b5e6..dafeaba16a 100644 --- a/core/core-frontend/src/custom-component/rich-text/DeRichTextView.vue +++ b/core/core-frontend/src/custom-component/rich-text/DeRichTextView.vue @@ -397,10 +397,13 @@ const calcData = (view: Chart, callback) => { state.viewDataInfo = {} state.totalItems = 0 const curViewInfo = canvasViewInfo.value[element.value.id] - curViewInfo['curFields'] = [] - dvMainStore.setViewDataDetails(element.value.id, state.viewDataInfo) + if (curViewInfo) { + curViewInfo['curFields'] = [] + dvMainStore.setViewDataDetails(element.value.id, state.viewDataInfo) + initReady.value = true + initCurFields(curViewInfo) + } initReady.value = true - initCurFields(curViewInfo) callback?.() nextTick(() => { initReady.value = true 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 7c495711db..7427d5b287 100644 --- a/core/core-frontend/src/store/modules/data-visualization/copy.ts +++ b/core/core-frontend/src/store/modules/data-visualization/copy.ts @@ -13,6 +13,7 @@ const dvMainStore = dvMainStoreWithOut() const composeStore = composeStoreWithOut() const contextmenuStore = contextmenuStoreWithOut() const { + multiplexingStyleAdapt, curComponent, curComponentIndex, curMultiplexingComponents, @@ -52,13 +53,17 @@ export const copyStore = defineStore('copy', { // dashboard 平铺2个 const xPositionOffset = index % 2 const yPositionOffset = index % 2 - newComponent.sizeX = pcMatrixCount.value.x / 2 - newComponent.sizeY = 14 + if (!(copyFrom === 'multiplexing' && !multiplexingStyleAdapt.value)) { + newComponent.sizeX = pcMatrixCount.value.x / 2 + newComponent.sizeY = 14 + // dataV 数据大屏 + newComponent.style.width = ((canvasStyleData.value.width / 3) * scale) / 100 + newComponent.style.height = ((canvasStyleData.value.height / 3) * scale) / 100 + } + // dataV 数据大屏 newComponent.x = newComponent.sizeX * xPositionOffset + 1 newComponent.y = 200 // dataV 数据大屏 - newComponent.style.width = (width * scale) / 400 - newComponent.style.height = (height * scale) / 400 newComponent.style.left = 0 newComponent.style.top = 0 }