From 5c4bb9f7c588b7c07a0257384c2ec0807916cab3 Mon Sep 17 00:00:00 2001 From: junjie Date: Mon, 19 Jul 2021 12:36:25 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E8=A7=86=E5=9B=BEUI=E5=B8=83?= =?UTF-8?q?=E5=B1=80=E5=88=9D=E6=AD=A5=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/lang/en.js | 4 +- frontend/src/lang/tw.js | 4 +- frontend/src/lang/zh.js | 4 +- .../components/drag-item/DimensionItem.vue | 16 +- .../chart/components/drag-item/QuotaItem.vue | 17 +- frontend/src/views/chart/view/ChartEdit.vue | 547 +++++++++--------- 6 files changed, 324 insertions(+), 268 deletions(-) diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js index 20ee467184..145e3dc5e2 100644 --- a/frontend/src/lang/en.js +++ b/frontend/src/lang/en.js @@ -804,7 +804,9 @@ export default { color_energy: 'Energy', color_red: 'Red', color_fast: 'Fast', - color_spiritual: 'Spiritual' + color_spiritual: 'Spiritual', + chart_data: 'Data', + chart_style: 'Style' }, dataset: { sheet_warn: 'There are multiple sheet pages, and the first one is extracted by default', diff --git a/frontend/src/lang/tw.js b/frontend/src/lang/tw.js index 7bdb3db881..61e56996ca 100644 --- a/frontend/src/lang/tw.js +++ b/frontend/src/lang/tw.js @@ -804,7 +804,9 @@ export default { color_fast: '輕快', color_spiritual: '靈動', chart_details: '视图明细', - export_details: '导出明细' + export_details: '导出明细', + chart_data: '數據', + chart_style: '樣式' }, dataset: { sheet_warn: '有多個sheet頁面,默認抽取第一個', diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js index dba1f7cf6c..ac6646de9a 100644 --- a/frontend/src/lang/zh.js +++ b/frontend/src/lang/zh.js @@ -804,7 +804,9 @@ export default { color_fast: '轻快', color_spiritual: '灵动', chart_details: '视图明细', - export_details: '导出明细' + export_details: '导出明细', + chart_data: '数据', + chart_style: '样式' }, dataset: { sheet_warn: '有多个 Sheet 页,默认抽取第一个', diff --git a/frontend/src/views/chart/components/drag-item/DimensionItem.vue b/frontend/src/views/chart/components/drag-item/DimensionItem.vue index b160a32e56..b8e6d5e124 100644 --- a/frontend/src/views/chart/components/drag-item/DimensionItem.vue +++ b/frontend/src/views/chart/components/drag-item/DimensionItem.vue @@ -7,7 +7,7 @@ - {{ item.name }} + {{ item.name }} @@ -18,7 +18,8 @@ - {{ item.name }} + {{ item.name }} + @@ -192,10 +193,11 @@ export default { text-align: left; height: 24px; line-height: 22px; - display: inline-block; + display: flex; border-radius: 4px; box-sizing: border-box; white-space: nowrap; + width: 159px; } .item-axis:hover { @@ -218,4 +220,12 @@ export default { align-items: center; width: 100% } + + .item-span-style{ + display: inline-block; + width: 100px; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + } diff --git a/frontend/src/views/chart/components/drag-item/QuotaItem.vue b/frontend/src/views/chart/components/drag-item/QuotaItem.vue index d268ff94a6..f9a72f6483 100644 --- a/frontend/src/views/chart/components/drag-item/QuotaItem.vue +++ b/frontend/src/views/chart/components/drag-item/QuotaItem.vue @@ -7,7 +7,7 @@ - {{ item.name }} + {{ item.name }} {{ $t('chart.'+item.summary) }} @@ -19,9 +19,9 @@ - {{ item.name }} + {{ item.name }} {{ $t('chart.'+item.summary) }} - + @@ -196,10 +196,11 @@ export default { text-align: left; height: 24px; line-height: 22px; - display: inline-block; + display: flex; border-radius: 4px; box-sizing: border-box; white-space: nowrap; + width: 159px; } .item-axis:hover { @@ -222,4 +223,12 @@ export default { align-items: center; width: 100% } + + .item-span-style{ + display: inline-block; + width: 80px; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + } diff --git a/frontend/src/views/chart/view/ChartEdit.vue b/frontend/src/views/chart/view/ChartEdit.vue index 6f3f41462a..9902748916 100644 --- a/frontend/src/views/chart/view/ChartEdit.vue +++ b/frontend/src/views/chart/view/ChartEdit.vue @@ -13,9 +13,9 @@ {{ view.name }} - - {{ $t('chart.change_ds') }} - + + + {{ $t('commons.save') }} @@ -26,259 +26,274 @@ - -
- - -
-
- {{ $t('chart.dimension') }} - - - - - - - - {{ item.name }} - - - -
-
- {{ $t('chart.quota') }} - - - - - - - - {{ item.name }} - - - -
-
+ + + + +
+ + + +
+
+ {{ $t('chart.dimension') }} + + + + + + + + {{ item.name }} + + + +
+
+ {{ $t('chart.quota') }} + + + + + + + + {{ item.name }} + + + +
+
- - - - - - - - - - - - - - - - - - -
- {{ $t('chart.chart_type') }} - -
- - -
- - - + + + + + + + + + + + + + + + + + + +
+ {{ $t('chart.chart_type') }} + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + +
+
+
+
+ + + + Tips: {{ $t('chart.only_one_quota') }} - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - - - -
- -
+ + + + + + + + +
+
+ + + {{ $t('chart.dimension') }} + + + + + + + + {{ $t('chart.quota') }} + + + + + + +
+ {{ $t('chart.result_filter') }} + + {{ $t('chart.filter_condition') }} + +
+
+
+
- - - - Tips: {{ $t('chart.only_one_quota') }} - - - - - - - - - -
-
- - {{ $t('chart.style_priority') }} - - - {{ $t('chart.chart') }} - {{ $t('chart.dashboard') }} - + + +
+ + {{ $t('chart.style_priority') }} + + + {{ $t('chart.chart') }} + {{ $t('chart.dashboard') }} + + - - - - - - - - - - - - - - - - - -
-
- {{ $t('chart.result_filter') }} - - {{ $t('chart.filter_condition') }} - -
- + + {{ $t('chart.shape_attr') }} + + + + + + + + + {{ $t('chart.module_style') }} + + + + + + + + + +
+
+
- - - {{ $t('chart.dimension') }} - - - - - - - - {{ $t('chart.quota') }} - - - - - - -
@@ -506,7 +521,7 @@ export default { watch: { 'param': function() { if (this.param.optType === 'new') { - + // } else { this.getData(this.param.id) } @@ -762,8 +777,8 @@ export default { // 左边往右边拖动时的事件 start1(e) { // console.log(e) - e.clone.className = 'item-on-move' - e.item.className = 'item-on-move' + e.clone.className = 'item' + e.item.className = 'item' }, end1(e) { // console.log(e) @@ -1046,7 +1061,8 @@ export default { }, changeDs() { - this.changeDsTitle = this.$t('chart.change_ds') + '[' + this.table.name + ']' + const dialogTitle = (this.table && this.table.name) ? ('[' + this.table.name + ']') : '' + this.changeDsTitle = this.$t('chart.change_ds') + dialogTitle this.selectTableFlag = true }, @@ -1179,9 +1195,15 @@ export default { .tab-header>>>.el-tabs__nav-scroll{ padding-left: 0!important; } + .tab-header>>>.el-tabs__header{ + margin: 0!important; + } + .tab-header>>>.el-tabs__content{ + height: 100%; + } .draggable-group { - display: inline-block; + display: block; width: 100%; height: calc(100% - 6px); } @@ -1203,7 +1225,7 @@ export default { } .el-radio{ - margin:6px; + margin:5px; } .el-radio>>>.el-radio__label{ @@ -1211,7 +1233,7 @@ export default { } .attr-style{ - height: calc(100vh - 56px - 25vh - 40px - 62px - 60px - 20px); + height: calc(100vh - 56px - 25vh - 40px - 60px); } .attr-selector{ @@ -1238,11 +1260,11 @@ export default { } .chart-class{ - height: calc(100% - 84px); + height: 100%; padding: 10px; } .table-class{ - height: calc(100% - 104px); + height: calc(100% - 20px); margin: 10px; } @@ -1275,4 +1297,13 @@ export default { .field-height{ height: calc(50% - 20px); } + .padding-tab{ + padding: 0; + height: 100%; + } + .collapse-style>>>.el-collapse-item__header{ + height: 40px; + line-height: 40px; + padding: 0 0 0 10px; + }