diff --git a/core/core-backend/src/main/java/io/dataease/chart/manage/ChartDataManage.java b/core/core-backend/src/main/java/io/dataease/chart/manage/ChartDataManage.java index 29938ca456..3f1b08a83c 100644 --- a/core/core-backend/src/main/java/io/dataease/chart/manage/ChartDataManage.java +++ b/core/core-backend/src/main/java/io/dataease/chart/manage/ChartDataManage.java @@ -371,10 +371,7 @@ public class ChartDataManage { provider = ProviderFactory.getProvider(dsMap.entrySet().iterator().next().getValue().getType()); } - if (ObjectUtils.isEmpty(view.getCalParams())) { - view.setCalParams(Utils.getParams(transFields(allFields))); - } - + view.setCalParams(Utils.getParams(transFields(allFields))); SQLMeta sqlMeta = new SQLMeta(); Table2SQLObj.table2sqlobj(sqlMeta, null, "(" + sql + ")", crossDs); CustomWhere2Str.customWhere2sqlObj(sqlMeta, fieldCustomFilter, transFields(allFields), crossDs, dsMap, Utils.getParams(transFields(allFields)), view.getCalParams(), pluginManage); diff --git a/core/core-frontend/src/components/data-visualization/canvas/Shape.vue b/core/core-frontend/src/components/data-visualization/canvas/Shape.vue index 68c87e5801..7842c9bb87 100644 --- a/core/core-frontend/src/components/data-visualization/canvas/Shape.vue +++ b/core/core-frontend/src/components/data-visualization/canvas/Shape.vue @@ -829,6 +829,30 @@ const commonBackgroundSvgInner = computed(() => { } }) +const padding3D = computed(() => { + const width = defaultStyle.value.width // 原始元素宽度 + const height = defaultStyle.value.height // 原始元素高度 + const rotateX = element.value['multiDimensional'].x // 旋转X角度 + const rotateY = element.value['multiDimensional'].y // 旋转Y角度 + + // 将角度转换为弧度 + const radX = (rotateX * Math.PI) / 180 + const radY = (rotateY * Math.PI) / 180 + + // 计算旋转后新宽度和高度 + const newWidth = Math.abs(width * Math.cos(radY)) + Math.abs(height * Math.sin(radX)) + const newHeight = Math.abs(height * Math.cos(radX)) + Math.abs(width * Math.sin(radY)) + + // 计算需要的 padding + const paddingX = (newWidth - width) / 2 + const paddingY = (newHeight - height) / 2 + + return { + paddingX: `${paddingX}px`, + paddingY: `${paddingY}px` + } +}) + const componentBackgroundStyle = computed(() => { if (element.value.commonBackground && element.value.component !== 'GroupArea') { const { diff --git a/core/core-frontend/src/components/visualization/OuterParamsSet.vue b/core/core-frontend/src/components/visualization/OuterParamsSet.vue index b3387d8208..5a76a3a111 100644 --- a/core/core-frontend/src/components/visualization/OuterParamsSet.vue +++ b/core/core-frontend/src/components/visualization/OuterParamsSet.vue @@ -68,7 +68,7 @@ - + 选择参数关联组件 @@ -249,7 +249,7 @@ - + 参数配置 diff --git a/core/core-frontend/src/components/visualization/common/ComponentPosition.vue b/core/core-frontend/src/components/visualization/common/ComponentPosition.vue index 1e0991e6eb..bea33fd1bb 100644 --- a/core/core-frontend/src/components/visualization/common/ComponentPosition.vue +++ b/core/core-frontend/src/components/visualization/common/ComponentPosition.vue @@ -183,6 +183,7 @@ const maintainRadioChange = () => { } const multiDimensionalChange = () => { // do change + snapshotStore.recordSnapshotCache() } const positionInit = () => {