From 27fe16fd0ad4cc9912d6a680a5738227d87cd7a7 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Thu, 26 May 2022 09:58:00 +0800 Subject: [PATCH 1/2] =?UTF-8?q?refactor:=20=E5=A4=8D=E7=94=A8=E5=AD=98?= =?UTF-8?q?=E9=87=8F=E8=A7=86=E5=9B=BE=E8=87=AA=E5=8A=A8=E5=8B=BE=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../canvas/components/Editor/EditBarView.vue | 9 +++++++-- .../components/canvas/custom-component/UserView.vue | 2 +- frontend/src/views/panel/ViewSelect/multiplexing.vue | 11 ++++++++--- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/frontend/src/components/canvas/components/Editor/EditBarView.vue b/frontend/src/components/canvas/components/Editor/EditBarView.vue index e7d995173d..9d9a652572 100644 --- a/frontend/src/components/canvas/components/Editor/EditBarView.vue +++ b/frontend/src/components/canvas/components/Editor/EditBarView.vue @@ -9,7 +9,7 @@
- +
@@ -41,6 +41,7 @@ export default { }, data() { return { + multiplexingCheckModel: false, componentType: null, linkageActiveStatus: false, editFilter: [ @@ -67,6 +68,10 @@ export default { ]) }, mounted() { + if (this.showPosition === 'multiplexing-view') { + this.multiplexingCheckModel = true + this.multiplexingCheck(this.multiplexingCheckModel) + } }, beforeDestroy() { }, @@ -86,7 +91,7 @@ export default { this.$emit('showViewDetails') }, positionCheck(position) { - return this.showPosition === position + return this.showPosition.includes(position) }, multiplexingCheck(val) { if (val) { diff --git a/frontend/src/components/canvas/custom-component/UserView.vue b/frontend/src/components/canvas/custom-component/UserView.vue index 3b96027fc0..3cfe242ec6 100644 --- a/frontend/src/components/canvas/custom-component/UserView.vue +++ b/frontend/src/components/canvas/custom-component/UserView.vue @@ -233,7 +233,7 @@ export default { } }, editBarViewShowFlag() { - return (this.active && this.inTab && !this.mobileLayoutStatus) || this.showPosition === 'multiplexing' + return (this.active && this.inTab && !this.mobileLayoutStatus) || this.showPosition.includes('multiplexing') }, charViewShowFlag() { return this.httpRequest.status && this.chart.type && !this.chart.type.includes('table') && !this.chart.type.includes('text') && this.chart.type !== 'label' && this.renderComponent() === 'echarts' diff --git a/frontend/src/views/panel/ViewSelect/multiplexing.vue b/frontend/src/views/panel/ViewSelect/multiplexing.vue index 787989953c..93b2dc8ec8 100644 --- a/frontend/src/views/panel/ViewSelect/multiplexing.vue +++ b/frontend/src/views/panel/ViewSelect/multiplexing.vue @@ -11,7 +11,7 @@ v-if="selectedPanel" :component-data="componentData" :canvas-style-data="canvasStyleData" - :show-position="'multiplexing'" + :show-position="showPosition" /> @@ -45,6 +45,7 @@ export default { }, data() { return { + showPosition: 'multiplexing', activeName: 'PanelList', viewLoading: false, panelLoading: false, @@ -60,21 +61,25 @@ export default { }, mounted() { + this.$store.commit('initCurMultiplexingComponents') }, methods: { showDetails(params) { + this.$store.commit('initCurMultiplexingComponents') const _this = this _this.selectedPanel = params if (params.showType === 'panel') { - this.panelLoading = true + _this.showPosition = 'multiplexing' + _this.panelLoading = true findOne(params.showId).then(response => { - this.panelLoading = false + _this.panelLoading = false panelDataPrepare(JSON.parse(response.data.panelData), JSON.parse(response.data.panelStyle), function(rsp) { _this.componentData = rsp.componentData _this.canvasStyleData = rsp.componentStyle }) }) } else if (params.showType === 'view') { + _this.showPosition = 'multiplexing-view' _this.componentData = [] const componentId = uuid.v1() _this.canvasStyleData = deepCopy(DEFAULT_COMMON_CANVAS_STYLE_STRING) From 71dc03b4be7337a91f5e6d1510193f1ce75c3a8f Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Wed, 25 May 2022 21:31:43 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20=E3=80=90=E4=BB=AA=E8=A1=A8?= =?UTF-8?q?=E6=9D=BF=E3=80=91=E7=AD=9B=E9=80=89=E6=A1=86=E6=96=87=E5=AD=97?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E6=8E=92=E5=88=97=E8=AE=BE=E7=BD=AE=EF=BC=88?= =?UTF-8?q?=E9=9D=A0=E4=B8=8A=E3=80=81=E5=B1=85=E4=B8=AD=E7=AD=89=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/canvas/components/TextAttr.vue | 8 +- .../src/components/dataease/DeOutWidget.vue | 129 ++++++------------ .../widget/DeWidget/TitlePostion.vue | 30 +--- 3 files changed, 50 insertions(+), 117 deletions(-) diff --git a/frontend/src/components/canvas/components/TextAttr.vue b/frontend/src/components/canvas/components/TextAttr.vue index cc775d6b4d..b3bab89ced 100644 --- a/frontend/src/components/canvas/components/TextAttr.vue +++ b/frontend/src/components/canvas/components/TextAttr.vue @@ -153,7 +153,7 @@
- +
@@ -181,7 +181,6 @@ diff --git a/frontend/src/components/widget/DeWidget/TitlePostion.vue b/frontend/src/components/widget/DeWidget/TitlePostion.vue index 513a07563f..f2ac85e4e6 100644 --- a/frontend/src/components/widget/DeWidget/TitlePostion.vue +++ b/frontend/src/components/widget/DeWidget/TitlePostion.vue @@ -7,17 +7,16 @@ - + {{ $t('chart.text_pos_left') }} {{ $t('chart.text_pos_center') }} {{ $t('chart.text_pos_right') }} - - + + {{ $t('chart.text_pos_top') }} {{ $t('chart.text_pos_center') }} - {{ $t('chart.text_pos_bottom') }} @@ -37,25 +36,10 @@ export default { styleInfo: { type: Object, default: null - } - }, - - data() { - return { - defaultPosition: { - hPosition: 'left', - vPosition: 'center' - } - } - }, - - created() { - - }, - methods: { - - styleChange() { - this.$store.commit('recordStyleChange') + }, + showVertical: { + type: Boolean, + default: false } }