From c8ee1d3836239a3f4d98199082031267b91126c5 Mon Sep 17 00:00:00 2001 From: junjie Date: Tue, 2 Nov 2021 15:35:53 +0800 Subject: [PATCH 1/6] =?UTF-8?q?refactor:=20=E8=BD=B4=E7=BA=BF=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E5=88=BB=E5=BA=A6=E6=95=B0=E9=99=90=E5=88=B6?= =?UTF-8?q?=E4=B8=8D=E8=B6=85=E8=BF=87100?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/lang/en.js | 3 ++- frontend/src/lang/tw.js | 3 ++- frontend/src/lang/zh.js | 3 ++- .../chart/components/component-style/XAxisSelectorAntV.vue | 7 +++++++ .../components/component-style/YAxisExtSelectorAntV.vue | 7 +++++++ .../chart/components/component-style/YAxisSelectorAntV.vue | 7 +++++++ 6 files changed, 27 insertions(+), 3 deletions(-) diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js index 3673a59bfa..d41d8550ef 100644 --- a/frontend/src/lang/en.js +++ b/frontend/src/lang/en.js @@ -953,7 +953,8 @@ export default { table_page_size: 'Page Size', table_page_size_unit: 'Item/Page', result_count: 'Result', - result_mode_all: 'ALL' + result_mode_all: 'ALL', + splitCount_less_100: 'Split Count must less 100' }, 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 7174fef792..7d2dc6e127 100644 --- a/frontend/src/lang/tw.js +++ b/frontend/src/lang/tw.js @@ -954,7 +954,8 @@ export default { table_page_size: '分頁', table_page_size_unit: '條/頁', result_count: '結果展示', - result_mode_all: '全部' + result_mode_all: '全部', + splitCount_less_100: '刻度數不能超過100' }, dataset: { sheet_warn: '有多個 Sheet 頁,默認抽取第一個', diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js index 50c666be33..7eb2130404 100644 --- a/frontend/src/lang/zh.js +++ b/frontend/src/lang/zh.js @@ -957,7 +957,8 @@ export default { table_page_size: '分页', table_page_size_unit: '条/页', result_count: '结果展示', - result_mode_all: '全部' + result_mode_all: '全部', + splitCount_less_100: '刻度数不能超过100' }, dataset: { sheet_warn: '有多个 Sheet 页,默认抽取第一个', diff --git a/frontend/src/views/chart/components/component-style/XAxisSelectorAntV.vue b/frontend/src/views/chart/components/component-style/XAxisSelectorAntV.vue index 1eda3c6655..9ca3aa0b28 100644 --- a/frontend/src/views/chart/components/component-style/XAxisSelectorAntV.vue +++ b/frontend/src/views/chart/components/component-style/XAxisSelectorAntV.vue @@ -160,6 +160,13 @@ export default { if (!this.axisForm.show) { this.isSetting = false } + if (this.axisForm.axisValue.splitCount && parseInt(this.axisForm.axisValue.splitCount) > 100) { + this.$message({ + message: this.$t('chart.splitCount_less_100'), + type: 'error' + }) + return + } this.$emit('onChangeXAxisForm', this.axisForm) } } diff --git a/frontend/src/views/chart/components/component-style/YAxisExtSelectorAntV.vue b/frontend/src/views/chart/components/component-style/YAxisExtSelectorAntV.vue index 28b24cc025..f10d9cbc9c 100644 --- a/frontend/src/views/chart/components/component-style/YAxisExtSelectorAntV.vue +++ b/frontend/src/views/chart/components/component-style/YAxisExtSelectorAntV.vue @@ -163,6 +163,13 @@ export default { if (!this.axisForm.show) { this.isSetting = false } + if (this.axisForm.axisValue.splitCount && parseInt(this.axisForm.axisValue.splitCount) > 100) { + this.$message({ + message: this.$t('chart.splitCount_less_100'), + type: 'error' + }) + return + } this.$emit('onChangeYAxisForm', this.axisForm) } } diff --git a/frontend/src/views/chart/components/component-style/YAxisSelectorAntV.vue b/frontend/src/views/chart/components/component-style/YAxisSelectorAntV.vue index 1bd3392688..1125ddaff5 100644 --- a/frontend/src/views/chart/components/component-style/YAxisSelectorAntV.vue +++ b/frontend/src/views/chart/components/component-style/YAxisSelectorAntV.vue @@ -171,6 +171,13 @@ export default { if (!this.axisForm.show) { this.isSetting = false } + if (this.axisForm.axisValue.splitCount && parseInt(this.axisForm.axisValue.splitCount) > 100) { + this.$message({ + message: this.$t('chart.splitCount_less_100'), + type: 'error' + }) + return + } this.$emit('onChangeYAxisForm', this.axisForm) } } From b8d583cea009d9611ea7c23856403f9f478f9ce8 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Tue, 2 Nov 2021 15:56:00 +0800 Subject: [PATCH 2/6] =?UTF-8?q?refactor:=E8=B7=B3=E8=BD=AC=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE,=E8=81=94=E5=8A=A8=E8=A7=86=E5=9B=BE=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/panel/LinkJumpSet/index.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/frontend/src/views/panel/LinkJumpSet/index.vue b/frontend/src/views/panel/LinkJumpSet/index.vue index 79c8186a45..9c1ec9fbf0 100644 --- a/frontend/src/views/panel/LinkJumpSet/index.vue +++ b/frontend/src/views/panel/LinkJumpSet/index.vue @@ -26,7 +26,7 @@
- +
@@ -88,7 +88,10 @@ :label="item.name" :value="item.id" > - {{ item.name }} + + + + {{ item.name }} @@ -108,7 +111,7 @@ - {{ viewField.name }} + {{ viewField.name }} From 7d57394fec37775e2357510c137c648b67766ceb Mon Sep 17 00:00:00 2001 From: junjie Date: Tue, 2 Nov 2021 16:01:30 +0800 Subject: [PATCH 3/6] =?UTF-8?q?refactor:=20=E8=BD=B4=E7=BA=BF=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E5=88=BB=E5=BA=A6=E6=95=B0=E9=99=90=E5=88=B6?= =?UTF-8?q?=E4=B8=8D=E8=B6=85=E8=BF=87100?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/lang/en.js | 2 +- frontend/src/lang/tw.js | 2 +- frontend/src/lang/zh.js | 2 +- .../chart/components/component-style/XAxisSelectorAntV.vue | 2 +- .../chart/components/component-style/YAxisExtSelectorAntV.vue | 2 +- .../chart/components/component-style/YAxisSelectorAntV.vue | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js index d41d8550ef..61c5c068b3 100644 --- a/frontend/src/lang/en.js +++ b/frontend/src/lang/en.js @@ -954,7 +954,7 @@ export default { table_page_size_unit: 'Item/Page', result_count: 'Result', result_mode_all: 'ALL', - splitCount_less_100: 'Split Count must less 100' + splitCount_less_100: 'Split Count Range 0-100' }, 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 7d2dc6e127..cab7541558 100644 --- a/frontend/src/lang/tw.js +++ b/frontend/src/lang/tw.js @@ -955,7 +955,7 @@ export default { table_page_size_unit: '條/頁', result_count: '結果展示', result_mode_all: '全部', - splitCount_less_100: '刻度數不能超過100' + splitCount_less_100: '刻度數範圍0-100' }, dataset: { sheet_warn: '有多個 Sheet 頁,默認抽取第一個', diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js index 7eb2130404..2c58090311 100644 --- a/frontend/src/lang/zh.js +++ b/frontend/src/lang/zh.js @@ -958,7 +958,7 @@ export default { table_page_size_unit: '条/页', result_count: '结果展示', result_mode_all: '全部', - splitCount_less_100: '刻度数不能超过100' + splitCount_less_100: '刻度数范围0-100' }, dataset: { sheet_warn: '有多个 Sheet 页,默认抽取第一个', diff --git a/frontend/src/views/chart/components/component-style/XAxisSelectorAntV.vue b/frontend/src/views/chart/components/component-style/XAxisSelectorAntV.vue index 9ca3aa0b28..10d81c10c4 100644 --- a/frontend/src/views/chart/components/component-style/XAxisSelectorAntV.vue +++ b/frontend/src/views/chart/components/component-style/XAxisSelectorAntV.vue @@ -160,7 +160,7 @@ export default { if (!this.axisForm.show) { this.isSetting = false } - if (this.axisForm.axisValue.splitCount && parseInt(this.axisForm.axisValue.splitCount) > 100) { + if (this.axisForm.axisValue.splitCount && (parseInt(this.axisForm.axisValue.splitCount) > 100 || parseInt(this.axisForm.axisValue.splitCount) < 0)) { this.$message({ message: this.$t('chart.splitCount_less_100'), type: 'error' diff --git a/frontend/src/views/chart/components/component-style/YAxisExtSelectorAntV.vue b/frontend/src/views/chart/components/component-style/YAxisExtSelectorAntV.vue index f10d9cbc9c..9fc47388aa 100644 --- a/frontend/src/views/chart/components/component-style/YAxisExtSelectorAntV.vue +++ b/frontend/src/views/chart/components/component-style/YAxisExtSelectorAntV.vue @@ -163,7 +163,7 @@ export default { if (!this.axisForm.show) { this.isSetting = false } - if (this.axisForm.axisValue.splitCount && parseInt(this.axisForm.axisValue.splitCount) > 100) { + if (this.axisForm.axisValue.splitCount && (parseInt(this.axisForm.axisValue.splitCount) > 100 || parseInt(this.axisForm.axisValue.splitCount) < 0)) { this.$message({ message: this.$t('chart.splitCount_less_100'), type: 'error' diff --git a/frontend/src/views/chart/components/component-style/YAxisSelectorAntV.vue b/frontend/src/views/chart/components/component-style/YAxisSelectorAntV.vue index 1125ddaff5..f13242255c 100644 --- a/frontend/src/views/chart/components/component-style/YAxisSelectorAntV.vue +++ b/frontend/src/views/chart/components/component-style/YAxisSelectorAntV.vue @@ -171,7 +171,7 @@ export default { if (!this.axisForm.show) { this.isSetting = false } - if (this.axisForm.axisValue.splitCount && parseInt(this.axisForm.axisValue.splitCount) > 100) { + if (this.axisForm.axisValue.splitCount && (parseInt(this.axisForm.axisValue.splitCount) > 100 || parseInt(this.axisForm.axisValue.splitCount) < 0)) { this.$message({ message: this.$t('chart.splitCount_less_100'), type: 'error' From 7d818d33d048db3153e763df79e7dd2525ff6bd9 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Tue, 2 Nov 2021 16:23:31 +0800 Subject: [PATCH 4/6] =?UTF-8?q?fix:=20=E9=BB=91=E8=89=B2=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E9=80=89=E8=89=B2=E6=9D=BF=E9=80=BB=E8=BE=91=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/styles/index.scss | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/frontend/src/styles/index.scss b/frontend/src/styles/index.scss index b58c0c5049..b957141d59 100644 --- a/frontend/src/styles/index.scss +++ b/frontend/src/styles/index.scss @@ -676,3 +676,11 @@ div:focus { } +.el-color-svpanel__black { + background: linear-gradient(to top, #000, rgba(0,0,0,0)) !important; +} + +.el-color-svpanel__white { + background: linear-gradient(to right, #fff, rgba(255,255,255,0)) !important; +} + From 58035c944ba41f3ad113bda6588175583e434ed8 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Tue, 2 Nov 2021 16:40:49 +0800 Subject: [PATCH 5/6] =?UTF-8?q?fix:=E9=80=89=E6=8B=A9=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E5=90=8E=E6=8B=96=E5=8A=A8=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E7=BB=84=E4=BB=B6,=E9=A1=B6=E9=83=A8=E7=9A=84=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E6=A0=8F=E4=B8=8D=E4=BC=9A=E8=B7=9F=E7=9D=80=E4=B8=80?= =?UTF-8?q?=E8=B5=B7=E7=A7=BB=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/panel/edit/index.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/panel/edit/index.vue b/frontend/src/views/panel/edit/index.vue index 6fb99cba46..e6fd6daf46 100644 --- a/frontend/src/views/panel/edit/index.vue +++ b/frontend/src/views/panel/edit/index.vue @@ -218,7 +218,7 @@ import generateID from '@/components/canvas/utils/generateID' import RectangleAttr from '@/components/canvas/components/RectangleAttr' import TextAttr from '@/components/canvas/components/TextAttr' import FilterTextAttr from '@/components/canvas/components/FilterTextAttr' -import {queryPanelJumpInfo} from "@/api/panel/linkJump"; +import { queryPanelJumpInfo } from '@/api/panel/linkJump' export default { name: 'PanelEdit', @@ -560,6 +560,11 @@ export default { this.currentFilterCom.style.top = (this.dragComponentInfo.y - 1) * this.curCanvasScale.matrixStyleOriginHeight this.currentFilterCom.style.width = this.dragComponentInfo.sizex * this.curCanvasScale.matrixStyleOriginWidth this.currentFilterCom.style.height = this.dragComponentInfo.sizey * this.curCanvasScale.matrixStyleOriginHeight + } else { + this.currentFilterCom.style.left = this.dragComponentInfo.shadowStyle.x + this.currentFilterCom.style.top = this.dragComponentInfo.shadowStyle.y + this.currentFilterCom.style.width = this.dragComponentInfo.style.width + this.currentFilterCom.style.height = this.dragComponentInfo.style.height } this.currentFilterCom.id = newComponentId this.currentFilterCom.auxiliaryMatrix = this.canvasStyleData.auxiliaryMatrix From 5145b19340457e49099143387113fa0caa72ebcd Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Tue, 2 Nov 2021 23:08:38 +0800 Subject: [PATCH 6/6] =?UTF-8?q?refactor:=E5=88=87=E6=8D=A2=E7=9F=A9?= =?UTF-8?q?=E9=98=B5=E5=BC=8F=E4=B8=8E=E6=82=AC=E6=B5=AE=E6=97=B6=E5=BB=BA?= =?UTF-8?q?=E8=AE=AE=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/DeDrag/index.vue | 2 +- .../components/canvas/components/Editor/index.vue | 15 ++++++++++++--- frontend/src/components/canvas/store/copy.js | 6 +++++- frontend/src/views/panel/edit/index.vue | 2 +- 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/frontend/src/components/DeDrag/index.vue b/frontend/src/components/DeDrag/index.vue index 2c51cb80d0..b5087c6f46 100644 --- a/frontend/src/components/DeDrag/index.vue +++ b/frontend/src/components/DeDrag/index.vue @@ -1603,7 +1603,7 @@ export default { style.height = height style.rotate = this.rotate // this.hasMove = true - // console.log('recordMatrixCurShadowStyle:t1:' + t1 + ';mw:' + this.curCanvasScale.matrixStyleWidth + ';width:' + width) + console.log('recordMatrixCurShadowStyle:t1:' + JSON.stringify(style)) this.$store.commit('setShapeStyle', style) diff --git a/frontend/src/components/canvas/components/Editor/index.vue b/frontend/src/components/canvas/components/Editor/index.vue index e890b44cc4..d5ce8a86b5 100644 --- a/frontend/src/components/canvas/components/Editor/index.vue +++ b/frontend/src/components/canvas/components/Editor/index.vue @@ -51,7 +51,7 @@ @onResizing="onResizing" @elementMouseDown="containerMouseDown" @amRemoveItem="removeItem(item._dragId)" - @amAddItme="addItemBox(item)" + @amAddItem="addItemBox(item)" @linkJumpSet="linkJumpSet(item)" > @@ -338,6 +338,7 @@ function recalcCellWidth() { } function init() { + console.log('init') this.cellWidth = this.baseWidth + this.baseMarginLeft this.cellHeight = this.baseHeight + this.baseMarginTop this.yourList = this.getList() @@ -357,7 +358,6 @@ function init() { recalcCellWidth.call(this) resetPositionBox.call(this) - let i = 0 // console.log('initList:' + JSON.stringify(vm.yourList)) const timeid = setInterval(function() { @@ -376,6 +376,7 @@ function init() { } function resizePlayer(item, newSize) { + // console.log('resizePlayer') const vm = this removeItemFromPositionBox(item) @@ -424,6 +425,7 @@ function resizePlayer(item, newSize) { * @param {any} position */ function checkItemPosition(item, position) { + // console.log('checkItemPosition-info' + JSON.stringify(item)) position = position || {} position.x = position.x || item.x position.y = position.y || item.y @@ -469,6 +471,7 @@ function checkItemPosition(item, position) { * @param {any} position */ function movePlayer(item, position) { + // console.log('movePlayer') const vm = this removeItemFromPositionBox(item) @@ -483,7 +486,7 @@ function movePlayer(item, position) { item.x = position.x item.y = position.y - + // console.log('checkItemPosition3') checkItemPosition.call(this, item, position) emptyTargetCell.call(this, item) @@ -520,11 +523,13 @@ function removeItem(index) { } function addItem(item, index) { + // console.log('addItem') if (index < 0) { index = this.yourList.length } item._dragId = index + // console.log('checkItemPosition4') checkItemPosition.call(this, item, { x: item.x, y: item.y @@ -652,6 +657,7 @@ function changeItemCoord(item) { * @param {any} item */ function emptyTargetCell(item) { + // console.log('emptyTargetCell') const vm = this const belowItems = findBelowItems(item) @@ -708,6 +714,7 @@ function moveItemDown(item, size) { y: item.y + size } setPlayerPosition.call(this, item, targetPosition) + // console.log('checkItemPosition1') checkItemPosition.call(this, item, targetPosition) addItemToPositionBox.call(this, item) @@ -1458,6 +1465,7 @@ export default { infoBox.oldSizeY = item.sizey }, onMouseUp(e) { + // console.log('onMouseUp') const vm = this if (_.isEmpty(vm.infoBox)) return if (vm.infoBox.cloneItem) { @@ -1626,6 +1634,7 @@ export default { }, 100) }, addItemBox(item) { + // console.log('addItemBox:' + JSON.stringify(item)) this.yourList.push(item) this.$nextTick(function() { diff --git a/frontend/src/components/canvas/store/copy.js b/frontend/src/components/canvas/store/copy.js index c79d7a9b5b..80decf5614 100644 --- a/frontend/src/components/canvas/store/copy.js +++ b/frontend/src/components/canvas/store/copy.js @@ -3,6 +3,7 @@ import toast from '@/components/canvas/utils/toast' import generateID from '@/components/canvas/utils/generateID' import { deepCopy } from '@/components/canvas/utils/utils' import { chartCopy } from '@/api/chart/chart' +import { uuid } from 'vue-uuid' export default { state: { @@ -46,11 +47,14 @@ export default { if (data.type === 'view') { chartCopy(data.propValue.viewId).then(res => { const newView = deepCopy(data) + newView.id = uuid.v1() newView.propValue.viewId = res.data store.commit('addComponent', { component: newView }) }) } else { - store.commit('addComponent', { component: deepCopy(data) }) + const newCop = deepCopy(data) + newCop.id = uuid.v1() + store.commit('addComponent', { component: newCop }) } if (state.isCut) { state.copyData = null diff --git a/frontend/src/views/panel/edit/index.vue b/frontend/src/views/panel/edit/index.vue index e6fd6daf46..0af8fe5e24 100644 --- a/frontend/src/views/panel/edit/index.vue +++ b/frontend/src/views/panel/edit/index.vue @@ -813,7 +813,7 @@ export default { } }, canvasScroll(event) { - console.log('testTop' + event.target.scrollTop) + // console.log('testTop' + event.target.scrollTop) this.scrollLeft = event.target.scrollLeft this.scrollTop = event.target.scrollTop },