From cc726fe7381c4505c7d8bb8319164a4345a9604c Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Mon, 16 Aug 2021 14:45:34 +0800 Subject: [PATCH 1/5] =?UTF-8?q?feat:=20=E6=96=87=E6=9C=AC=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E7=BB=84=E4=BB=B6=E5=A2=9E=E5=8A=A0=E6=BB=9A=E5=8A=A8?= =?UTF-8?q?=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/widget/DeWidget/DeSelectGrid.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/widget/DeWidget/DeSelectGrid.vue b/frontend/src/components/widget/DeWidget/DeSelectGrid.vue index c50648ee74..35b590e281 100644 --- a/frontend/src/components/widget/DeWidget/DeSelectGrid.vue +++ b/frontend/src/components/widget/DeWidget/DeSelectGrid.vue @@ -4,7 +4,7 @@ -
+
From 4d5b35b03882e6bd6efebb8e4851d0d88d8f3a3e Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Mon, 16 Aug 2021 15:40:37 +0800 Subject: [PATCH 2/5] =?UTF-8?q?fix:=20=E6=96=87=E6=9C=AC=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E5=BF=AB=E9=80=9F=E6=A3=80=E7=B4=A2=E6=97=A0?= =?UTF-8?q?=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/DeDrag/index.vue | 2 +- .../components/Editor/ComponentWrapper.vue | 2 +- .../canvas/components/Editor/Shape.vue | 2 +- .../widget/DeWidget/DeSelectGrid.vue | 22 +++++++++---------- frontend/src/styles/index.scss | 9 ++++++++ frontend/src/views/panel/edit/index.vue | 2 +- 6 files changed, 24 insertions(+), 15 deletions(-) diff --git a/frontend/src/components/DeDrag/index.vue b/frontend/src/components/DeDrag/index.vue index b47cb117ca..300e8c53c3 100644 --- a/frontend/src/components/DeDrag/index.vue +++ b/frontend/src/components/DeDrag/index.vue @@ -629,7 +629,7 @@ export default { elementMouseDown(e) { // private 设置当前组件数据及状态 this.$store.commit('setClickComponentStatus', true) - if (this.element.component !== 'v-text' && this.element.component !== 'rect-shape' && this.element.component !== 'de-input-search' && this.element.component !== 'de-number-range') { + if (this.element.component !== 'v-text' && this.element.component !== 'rect-shape' && this.element.component !== 'de-input-search' && this.element.component !== 'de-select-grid' && this.element.component !== 'de-number-range') { e.preventDefault() } // 阻止冒泡事件 diff --git a/frontend/src/components/canvas/components/Editor/ComponentWrapper.vue b/frontend/src/components/canvas/components/Editor/ComponentWrapper.vue index 88216e9e1a..b789d127d8 100644 --- a/frontend/src/components/canvas/components/Editor/ComponentWrapper.vue +++ b/frontend/src/components/canvas/components/Editor/ComponentWrapper.vue @@ -104,7 +104,7 @@ export default { elementMouseDown(e) { // private 设置当前组件数据及状态 this.$store.commit('setClickComponentStatus', true) - if (this.config.component !== 'v-text' && this.config.component !== 'rect-shape' && this.config.component !== 'de-input-search' && this.config.component !== 'de-number-range') { + if (this.config.component !== 'v-text' && this.config.component !== 'rect-shape' && this.config.component !== 'de-input-search' && this.config.component !== 'de-select-grid' && this.config.component !== 'de-number-range') { e.preventDefault() } // 阻止冒泡事件 diff --git a/frontend/src/components/canvas/components/Editor/Shape.vue b/frontend/src/components/canvas/components/Editor/Shape.vue index b0475bd00d..b4c0e74bbf 100644 --- a/frontend/src/components/canvas/components/Editor/Shape.vue +++ b/frontend/src/components/canvas/components/Editor/Shape.vue @@ -226,7 +226,7 @@ export default { handleMouseDownOnShape(e) { this.$store.commit('setClickComponentStatus', true) - if (this.element.component !== 'v-text' && this.element.component !== 'rect-shape' && this.element.component !== 'de-input-search' && this.element.component !== 'de-number-range') { + if (this.element.component !== 'v-text' && this.element.component !== 'rect-shape' && this.element.component !== 'de-input-search' && this.element.component !== 'de-select-grid' && this.element.component !== 'de-number-range') { e.preventDefault() } diff --git a/frontend/src/components/widget/DeWidget/DeSelectGrid.vue b/frontend/src/components/widget/DeWidget/DeSelectGrid.vue index 35b590e281..ccf8d14349 100644 --- a/frontend/src/components/widget/DeWidget/DeSelectGrid.vue +++ b/frontend/src/components/widget/DeWidget/DeSelectGrid.vue @@ -8,10 +8,9 @@ @@ -71,7 +70,7 @@ export default { label: 'text', children: 'children' }, - keyWord: null, + keyWord: '', allNode: { id: (-2 << 16) + '', text: this.$t('commons.all'), @@ -107,10 +106,11 @@ export default { sourceValid && Array.isArray(sourceValue) && (this.options.value = sourceValue[0]) !this.inDraw && (this.options.value = null) } - }, - keyWord(val) { - this.$refs.deSelectGrid.filter(val) } + // keyWord(val) { + // console.log(val) + // this.$refs.deSelectGrid.filter(val) + // } }, created() { this.options = this.element.options @@ -206,10 +206,10 @@ export default { this.options.value = null this.changeRadioBox() }, - filterNode(value, data) { - if (!value) return true - return data[this.defaultProp.label].indexOf(value) !== -1 - }, + // filterNode(value, data) { + // if (!value) return true + // return data[this.defaultProp.label].indexOf(value) !== -1 + // }, styleChange() { this.$store.state.styleChangeTimes++ } @@ -251,7 +251,7 @@ export default { overflow-y: auto; width: 100%; position: absolute; - top: 0; + top: 30px; bottom: 0; } } diff --git a/frontend/src/styles/index.scss b/frontend/src/styles/index.scss index 424329d78f..c9ac0ad0dd 100644 --- a/frontend/src/styles/index.scss +++ b/frontend/src/styles/index.scss @@ -235,6 +235,15 @@ div:focus { div.el-input-group__append { width: 10% !important; } + .de-select-grid-class { + .list { + position: relative !important; + height: 200px !important; + overflow-y: scroll !important; + top: 0px !important; + } + } + } %field-icon { diff --git a/frontend/src/views/panel/edit/index.vue b/frontend/src/views/panel/edit/index.vue index 5149e7ab18..729d4f6f62 100644 --- a/frontend/src/views/panel/edit/index.vue +++ b/frontend/src/views/panel/edit/index.vue @@ -116,7 +116,7 @@ From 928384c6e2a54745ddab65a6307a714b8df4748f Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Mon, 16 Aug 2021 16:01:55 +0800 Subject: [PATCH 3/5] =?UTF-8?q?fix:=20=E7=BB=84=E4=BB=B6=E5=BC=B9=E6=A1=86?= =?UTF-8?q?=E6=A0=91=E8=8A=82=E7=82=B9=E5=A2=9E=E5=8A=A0tip?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/panel/filter/filterDialog.vue | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/frontend/src/views/panel/filter/filterDialog.vue b/frontend/src/views/panel/filter/filterDialog.vue index c655a042b1..af9c4f8d90 100644 --- a/frontend/src/views/panel/filter/filterDialog.vue +++ b/frontend/src/views/panel/filter/filterDialog.vue @@ -39,8 +39,18 @@ @node-click="handleNodeClick" >
- - {{ node.label }} + + + + + + + + +
{{ node.label }}
+ {{ node.label }} +
+
From 3386b1dd7384ab7200e7d290168207e46eef3de5 Mon Sep 17 00:00:00 2001 From: junjie Date: Mon, 16 Aug 2021 16:23:57 +0800 Subject: [PATCH 4/5] =?UTF-8?q?feat:=20=E8=A7=86=E5=9B=BE=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E7=AE=80=E5=8D=95=E9=A2=9C=E8=89=B2=E4=BF=AE=E6=94=B9?= 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/shape-attr/ColorSelector.vue | 90 +++++++++++++++++-- 4 files changed, 91 insertions(+), 11 deletions(-) diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js index 4d44955432..5610bfa22e 100644 --- a/frontend/src/lang/en.js +++ b/frontend/src/lang/en.js @@ -840,7 +840,9 @@ export default { bubble_symbol: 'Shape', gap_width: 'Gap Width', width: 'Width', - height: 'Height' + height: 'Height', + system_case: 'System', + custom_case: 'Custom' }, 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 de5f09c092..db021d0347 100644 --- a/frontend/src/lang/tw.js +++ b/frontend/src/lang/tw.js @@ -840,7 +840,9 @@ export default { bubble_symbol: '圖形', gap_width: '間隔', width: '寬度', - height: '高度' + height: '高度', + system_case: '系統方案', + custom_case: '自定義' }, dataset: { sheet_warn: '有多個sheet頁面,默認抽取第一個', diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js index 555aaad834..5589c11340 100644 --- a/frontend/src/lang/zh.js +++ b/frontend/src/lang/zh.js @@ -840,7 +840,9 @@ export default { bubble_symbol: '图形', gap_width: '间隔', width: '宽度', - height: '高度' + height: '高度', + system_case: '系统方案', + custom_case: '自定义' }, dataset: { sheet_warn: '有多个 Sheet 页,默认抽取第一个', diff --git a/frontend/src/views/chart/components/shape-attr/ColorSelector.vue b/frontend/src/views/chart/components/shape-attr/ColorSelector.vue index f397633982..e3f270a9ef 100644 --- a/frontend/src/views/chart/components/shape-attr/ColorSelector.vue +++ b/frontend/src/views/chart/components/shape-attr/ColorSelector.vue @@ -4,14 +4,46 @@
- - -
- + +
+
+ {{ $t('chart.system_case') }} + + +
+ +
+ {{ option.name }} +
+
+ {{ $t('commons.reset') }}
- {{ option.name }} - - +
+ {{ $t('chart.custom_case') }} + + + + + + + +
+
+ + + + +
+
+
+ +
+
@@ -149,12 +181,16 @@ export default { colors: ['#00a3af', '#4da798', '#57baaa', '#62d0bd', '#6ee4d0', '#86e7d6', '#aeede1', '#bde1e6', '#e5e5e5'] } ], - colorForm: JSON.parse(JSON.stringify(DEFAULT_COLOR_CASE)) + colorForm: JSON.parse(JSON.stringify(DEFAULT_COLOR_CASE)), + customColor: null, + colorIndex: 0 } }, watch: { 'chart': { handler: function() { + this.customColor = null + this.colorIndex = 0 this.init() } } @@ -172,6 +208,8 @@ export default { val.value = items[0].value val.colors = items[0].colors this.$emit('onColorChange', val) + this.customColor = null + this.colorIndex = 0 }, init() { const chart = JSON.parse(JSON.stringify(this.chart)) @@ -184,8 +222,26 @@ export default { } if (customAttr.color) { this.colorForm = customAttr.color + if (!this.customColor) { + this.customColor = this.colorForm.colors[0] + this.colorIndex = 0 + } } } + }, + + switchColor(index) { + this.colorIndex = index + }, + switchColorCase() { + this.colorForm.colors[this.colorIndex] = this.customColor + this.$emit('onColorChange', this.colorForm) + }, + + resetCustomColor() { + this.customColor = this.colorForm.colors[0] + this.colorIndex = 0 + this.changeColorCase() } } } @@ -220,4 +276,22 @@ export default { cursor: pointer; z-index: 1003; } + .color-label{ + display: inline-block; + width: 60px; + } + + .color-type>>>.el-radio__input{ + display: none; + } + .el-radio{ + margin:0 4px 0 0!important; + } + .el-radio>>>.el-radio__label{ + padding-left: 0; + } + + .el-radio.is-checked{ + border: 1px solid #0a7be0; + } From 6e1300f9376075f0979a41823ca2430b096d22ab Mon Sep 17 00:00:00 2001 From: junjie Date: Mon, 16 Aug 2021 16:34:12 +0800 Subject: [PATCH 5/5] =?UTF-8?q?feat:=20=E8=A7=86=E5=9B=BE=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E7=AE=80=E5=8D=95=E9=A2=9C=E8=89=B2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/chart/components/shape-attr/ColorSelector.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/views/chart/components/shape-attr/ColorSelector.vue b/frontend/src/views/chart/components/shape-attr/ColorSelector.vue index e3f270a9ef..7ea65b4b82 100644 --- a/frontend/src/views/chart/components/shape-attr/ColorSelector.vue +++ b/frontend/src/views/chart/components/shape-attr/ColorSelector.vue @@ -40,7 +40,7 @@
-
+
@@ -285,7 +285,7 @@ export default { display: none; } .el-radio{ - margin:0 4px 0 0!important; + margin:0 2px 0 0!important; } .el-radio>>>.el-radio__label{ padding-left: 0;