diff --git a/frontend/src/components/DeDrag/index.vue b/frontend/src/components/DeDrag/index.vue index 98add1ebf9..867d64dd3e 100644 --- a/frontend/src/components/DeDrag/index.vue +++ b/frontend/src/components/DeDrag/index.vue @@ -44,7 +44,7 @@ > -
+
@@ -385,6 +385,13 @@ export default { } }, computed: { + componentCanvasId() { + if (this.element.type === 'view') { + return 'user-view-' + this.element.propValue.viewId + } else { + return 'components-' + this.element.id + } + }, // 编辑组件显示 editBarShow() { // 编辑组件显示条件:1.当前组件存在 2.组件是激活状态或者当前在联动设置状态 3.当前不在移动端画布编辑状态 4.或者批量操作状态 @@ -1741,8 +1748,8 @@ export default { removeEvent(document.documentElement, 'touchend touchcancel', this.deselect) removeEvent(window, 'resize', this.checkParentSize) }, - showViewDetails() { - this.$emit('showViewDetails') + showViewDetails(params) { + this.$emit('showViewDetails', params) }, amAddItem() { this.$emit('amAddItem') diff --git a/frontend/src/components/canvas/components/Editor/ComponentWrapper.vue b/frontend/src/components/canvas/components/Editor/ComponentWrapper.vue index 2348da6501..b0b45dd7a9 100644 --- a/frontend/src/components/canvas/components/Editor/ComponentWrapper.vue +++ b/frontend/src/components/canvas/components/Editor/ComponentWrapper.vue @@ -5,8 +5,8 @@ @click="handleClick" @mousedown="elementMouseDown" > -
- + +
- + - - + + @@ -157,12 +157,8 @@ export default { this.timer = null } }, - showViewDetails() { - this.$emit('showViewDetails') - }, - componentJump() { - window.open(url, '_blank') - // this.$emit('showViewDetails') + showViewDetails(openType = 'details') { + this.$emit('showViewDetails', { openType: openType }) }, auxiliaryMatrixChange() { if (this.curComponent.auxiliaryMatrix) { diff --git a/frontend/src/components/canvas/components/Editor/EditBarView.vue b/frontend/src/components/canvas/components/Editor/EditBarView.vue index 9d9a652572..db57a2f0ba 100644 --- a/frontend/src/components/canvas/components/Editor/EditBarView.vue +++ b/frontend/src/components/canvas/components/Editor/EditBarView.vue @@ -5,7 +5,7 @@ - +
@@ -87,8 +87,8 @@ export default { amRemoveItem() { this.$emit('amRemoveItem') }, - showViewDetails() { - this.$emit('showViewDetails') + showViewDetails(params) { + this.$emit('showViewDetails', params) }, positionCheck(position) { return this.showPosition.includes(position) diff --git a/frontend/src/components/canvas/components/Editor/Preview.vue b/frontend/src/components/canvas/components/Editor/Preview.vue index 6e15a7685b..19a7d214cc 100644 --- a/frontend/src/components/canvas/components/Editor/Preview.vue +++ b/frontend/src/components/canvas/components/Editor/Preview.vue @@ -37,22 +37,20 @@ - - - {{ $t('chart.export') }} - - - Excel - {{ $t('chart.image') }} - - + + {{ $t('chart.export_img') }} + + + {{ $t('chart.export') }}Excel + - + @@ -169,6 +167,7 @@ export default { mobileChartDetailsVisible: false, showChartInfo: {}, showChartTableInfo: {}, + showChartInfoType: 'details', // 布局展示 1.pc pc端布局 2.mobile 移动端布局 terminal: 'pc' } @@ -189,9 +188,6 @@ export default { return this.panelInfo.status === 'unpublished' } }, - showExportImgButton() { - return this.showChartInfo.type && !this.showChartInfo.type.includes('table') - }, canvasInfoMainStyle() { if (this.backScreenShot) { return { @@ -378,6 +374,7 @@ export default { openChartDetailsDialog(chartInfo) { this.showChartInfo = chartInfo.chart this.showChartTableInfo = chartInfo.tableChart + this.showChartInfoType = chartInfo.openType if (this.terminal === 'pc') { this.chartDetailsVisible = true } else { diff --git a/frontend/src/components/canvas/components/Editor/index.vue b/frontend/src/components/canvas/components/Editor/index.vue index c5c50d1b3e..2996cd6174 100644 --- a/frontend/src/components/canvas/components/Editor/index.vue +++ b/frontend/src/components/canvas/components/Editor/index.vue @@ -45,7 +45,7 @@ :linkage-active="linkageActiveCheck(item)" :batch-opt-active="batchOptActiveCheck(item)" @refLineParams="getRefLineParams" - @showViewDetails="showViewDetails(index)" + @showViewDetails="showViewDetails($event,index)" @resizeView="resizeView(index,item)" @onResizeStart="startResize" @onDragStart="onStartMove" @@ -137,27 +137,26 @@ - - - {{ $t('chart.export') }} - - - Excel - {{ $t('chart.image') }} - - + + {{ $t('chart.export_img') }} + + + {{ $t('chart.export') }}Excel + @@ -912,6 +911,7 @@ export default { chartDetailsVisible: false, showChartInfo: {}, showChartTableInfo: {}, + showChartInfoType: 'details', // 挤占式画布设计 baseWidth: 100, baseHeight: 100, @@ -1351,6 +1351,7 @@ export default { openChartDetailsDialog(chartInfo) { this.showChartInfo = chartInfo.chart this.showChartTableInfo = chartInfo.tableChart + this.showChartInfoType = chartInfo.openType this.chartDetailsVisible = true }, exportExcel() { @@ -1359,8 +1360,8 @@ export default { exportViewImg() { this.$refs['userViewDialog'].exportViewImg() }, - showViewDetails(index) { - this.$refs.wrapperChild[index].openChartDetailsDialog() + showViewDetails(params, index) { + this.$refs.wrapperChild[index].openChartDetailsDialog(params) }, resizeView(index, item) { diff --git a/frontend/src/components/canvas/custom-component/UserView.vue b/frontend/src/components/canvas/custom-component/UserView.vue index 11ea5fe040..7701922790 100644 --- a/frontend/src/components/canvas/custom-component/UserView.vue +++ b/frontend/src/components/canvas/custom-component/UserView.vue @@ -593,7 +593,7 @@ export default { viewIdMatch(viewIds, viewId) { return !viewIds || viewIds.length === 0 || viewIds.includes(viewId) }, - openChartDetailsDialog() { + openChartDetailsDialog(params) { const tableChart = deepCopy(this.chart) tableChart.customAttr = JSON.parse(this.chart.customAttr) tableChart.customStyle = JSON.parse(this.chart.customStyle) @@ -604,7 +604,7 @@ export default { tableChart.customStyle.text.show = false tableChart.customAttr = JSON.stringify(tableChart.customAttr) tableChart.customStyle = JSON.stringify(tableChart.customStyle) - eventBus.$emit('openChartDetailsDialog', { chart: this.chart, tableChart: tableChart }) + eventBus.$emit('openChartDetailsDialog', { chart: this.chart, tableChart: tableChart, openType: params.openType }) }, chartClick(param) { if (this.drillClickDimensionList.length < this.chart.drillFields.length - 1) { diff --git a/frontend/src/components/canvas/custom-component/UserViewDialog.vue b/frontend/src/components/canvas/custom-component/UserViewDialog.vue index f450247a5e..2cb6895c96 100644 --- a/frontend/src/components/canvas/custom-component/UserViewDialog.vue +++ b/frontend/src/components/canvas/custom-component/UserViewDialog.vue @@ -1,6 +1,6 @@