From 0a3804cd8de4f0957beca025644abc8afbb2eee4 Mon Sep 17 00:00:00 2001
From: wangjiahao <1522128093@qq.com>
Date: Tue, 11 Feb 2025 15:37:43 +0800
Subject: [PATCH] =?UTF-8?q?refactor(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20?=
=?UTF-8?q?=E9=9A=90=E8=97=8F=E7=BB=84=E4=BB=B6=E6=93=8D=E4=BD=9C=E4=BC=98?=
=?UTF-8?q?=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../dashboard/DashboardHiddenComponent.vue | 2 +-
.../src/components/dashboard/DbToolbar.vue | 1 +
.../canvas/ComponentWrapper.vue | 2 ++
.../data-visualization/canvas/Shape.vue | 21 ++++++++++++++++++-
.../modules/data-visualization/dvMain.ts | 1 +
.../views/chart/components/views/index.vue | 3 ++-
6 files changed, 27 insertions(+), 3 deletions(-)
diff --git a/core/core-frontend/src/components/dashboard/DashboardHiddenComponent.vue b/core/core-frontend/src/components/dashboard/DashboardHiddenComponent.vue
index 9c61f41c9d..db90e2895e 100644
--- a/core/core-frontend/src/components/dashboard/DashboardHiddenComponent.vue
+++ b/core/core-frontend/src/components/dashboard/DashboardHiddenComponent.vue
@@ -39,7 +39,7 @@ const addToDashboard = item => {
class="wrapper-design"
show-position="viewDialog"
:search-count="0"
- :scale="65"
+ :scale="canvasStyleData.scale"
/>
diff --git a/core/core-frontend/src/components/dashboard/DbToolbar.vue b/core/core-frontend/src/components/dashboard/DbToolbar.vue
index e1428b8391..f4e67f907a 100644
--- a/core/core-frontend/src/components/dashboard/DbToolbar.vue
+++ b/core/core-frontend/src/components/dashboard/DbToolbar.vue
@@ -396,6 +396,7 @@ const batchOptStatusChange = value => {
state.preBatchComponentData = []
state.preBatchCanvasViewInfo = {}
}
+ dvMainStore.setHiddenListStatus(false)
dvMainStore.setBatchOptStatus(value)
}
diff --git a/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue b/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue
index 05c4b2b240..4a1aeaae40 100644
--- a/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue
+++ b/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue
@@ -13,6 +13,7 @@ import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
import { activeWatermarkCheckUser, removeActiveWatermark } from '@/components/watermark/watermark'
import { isMobile } from '@/utils/utils'
import { isDashboard } from '@/utils/canvasUtils'
+import view from '@antv/g2/src/chart/view'
const componentWrapperInnerRef = ref(null)
const componentEditBarRef = ref(null)
@@ -369,6 +370,7 @@ const showActive = computed(() => props.popActive || (dvMainStore.mobileInPc &&
element-loading-text="导出中..."
element-loading-background="rgba(255, 255, 255, 1)"
>
+ --- {{ viewInfo?.id }}
+
+
+
+
+
+
+
{
+ event.preventDefault()
+ event.stopPropagation()
+ if (element.value) {
+ element.value.dashboardHidden = true
+ eventBus.emit('removeMatrixItemPosition-' + canvasId.value, element.value)
+ snapshotStore.recordSnapshotCache('hide')
+ dvMainStore.setLastHiddenComponent(element.value.id)
+ }
+}
const contentDisplay = ref(true)
const shapeLock = computed(() => {
diff --git a/core/core-frontend/src/store/modules/data-visualization/dvMain.ts b/core/core-frontend/src/store/modules/data-visualization/dvMain.ts
index 6e13ea7481..440caa4190 100644
--- a/core/core-frontend/src/store/modules/data-visualization/dvMain.ts
+++ b/core/core-frontend/src/store/modules/data-visualization/dvMain.ts
@@ -286,6 +286,7 @@ export const dvMainStore = defineStore('dataVisualization', {
},
setCurComponent({ component, index }) {
this.setCurTabName(null)
+ this.setHiddenListStatus(false)
if (!component && this.curComponent) {
this.curComponent['editing'] = false
this.curComponent['resizing'] = false
diff --git a/core/core-frontend/src/views/chart/components/views/index.vue b/core/core-frontend/src/views/chart/components/views/index.vue
index 281695e05f..cb8657e135 100644
--- a/core/core-frontend/src/views/chart/components/views/index.vue
+++ b/core/core-frontend/src/views/chart/components/views/index.vue
@@ -77,7 +77,8 @@ const {
canvasStyleData,
mobileInPc,
inMobile,
- editMode
+ editMode,
+ hiddenListStatus
} = storeToRefs(dvMainStore)
const props = defineProps({