diff --git a/frontend/src/api/panel/view.js b/frontend/src/api/panel/view.js index 1c3f9c12c6..5cc64150b1 100644 --- a/frontend/src/api/panel/view.js +++ b/frontend/src/api/panel/view.js @@ -4,6 +4,7 @@ export function tree(data) { return request({ url: '/api/panelView/tree', method: 'post', + timeout: 30000, data }) } @@ -12,6 +13,7 @@ export function viewsWithIds(data) { return request({ url: '/api/panelView/viewsWithIds', method: 'post', + timeout: 30000, loading: true, data }) @@ -21,6 +23,7 @@ export function findOne(id) { return request({ url: '/api/panelView/findOne/' + id, method: 'get', + timeout: 30000, loading: true }) } diff --git a/frontend/src/components/canvas/components/Editor/Preview.vue b/frontend/src/components/canvas/components/Editor/Preview.vue index 27cf09c80b..07db29246d 100644 --- a/frontend/src/components/canvas/components/Editor/Preview.vue +++ b/frontend/src/components/canvas/components/Editor/Preview.vue @@ -4,6 +4,7 @@
{ _this.$nextTick(() => { _this.restore() + }) + }) + // 监听div变动事件 + const tempCanvas = document.getElementById('canvasInfoTemp') + erd.listenTo(tempCanvas, element => { + _this.$nextTick(() => { // 将mainHeight 修改为px 临时解决html2canvas 截图不全的问题 - _this.mainHeight = mainDom.scrollHeight + 'px!important' + _this.mainHeight = tempCanvas.scrollHeight + 'px!important' }) }) eventBus.$on('openChartDetailsDialog', this.openChartDetailsDialog) diff --git a/frontend/src/components/canvas/components/Editor/index.vue b/frontend/src/components/canvas/components/Editor/index.vue index 43417422d3..a56ec4bd6c 100644 --- a/frontend/src/components/canvas/components/Editor/index.vue +++ b/frontend/src/components/canvas/components/Editor/index.vue @@ -813,6 +813,10 @@ export default { y: 18 } } + }, + scrollTop: { + type: Number, + default: 0 } }, data() { @@ -1251,9 +1255,8 @@ export default { } }, handleDragOver(e) { - // console.log('handleDragOver-Editor') this.dragComponentInfo.shadowStyle.x = e.pageX - 220 - this.dragComponentInfo.shadowStyle.y = e.pageY - 90 + this.dragComponentInfo.shadowStyle.y = e.pageY - 90 + this.scrollTop this.dragComponentInfo.style.left = this.dragComponentInfo.shadowStyle.x / this.scalePointWidth this.dragComponentInfo.style.top = this.dragComponentInfo.shadowStyle.y / this.scalePointHeight if (this.dragComponentInfo.auxiliaryMatrix) { diff --git a/frontend/src/components/canvas/components/TextAttr.vue b/frontend/src/components/canvas/components/TextAttr.vue index 1bca4d1795..0e8ce60e93 100644 --- a/frontend/src/components/canvas/components/TextAttr.vue +++ b/frontend/src/components/canvas/components/TextAttr.vue @@ -78,14 +78,6 @@
- - - - -
- -
- diff --git a/frontend/src/views/panel/SubjectSetting/PanelStyle/BackgroundSelector.vue b/frontend/src/views/panel/SubjectSetting/PanelStyle/BackgroundSelector.vue index 4818ff5f4a..85cbcd70b3 100644 --- a/frontend/src/views/panel/SubjectSetting/PanelStyle/BackgroundSelector.vue +++ b/frontend/src/views/panel/SubjectSetting/PanelStyle/BackgroundSelector.vue @@ -106,6 +106,7 @@ export default { _this.panel.imageUrl = reader.result this.commitStyle() } + this.$store.state.styleChangeTimes++ reader.readAsDataURL(file.raw) }, upload(file) { diff --git a/frontend/src/views/panel/edit/index.vue b/frontend/src/views/panel/edit/index.vue index dfd7316478..5a08771880 100644 --- a/frontend/src/views/panel/edit/index.vue +++ b/frontend/src/views/panel/edit/index.vue @@ -106,7 +106,7 @@ @mouseup="deselectCurComponent" @scroll="canvasScroll" > - + @@ -126,7 +126,7 @@ id="canvasInfoMobile" class="this_mobile_canvas_main" > - + @@ -661,8 +661,6 @@ export default { }, sureFilter() { this.currentFilterCom.options.value = [] - const component = deepCopy(this.currentFilterCom) - this.$store.commit('setComponentWithId', component) this.$store.commit('recordSnapshot', 'sureFilter') this.closeFilter() }, diff --git a/frontend/src/views/panel/export/PDFPreExport.vue b/frontend/src/views/panel/export/PDFPreExport.vue index 3051561bae..558ab012a9 100644 --- a/frontend/src/views/panel/export/PDFPreExport.vue +++ b/frontend/src/views/panel/export/PDFPreExport.vue @@ -96,7 +96,7 @@ export default { const contentWidth = canvas.width const contentHeight = canvas.height const pageData = canvas.toDataURL('image/jpeg', 1.0) - const PDF = new JsPDF('l', 'px', [contentWidth, contentHeight]) + const PDF = new JsPDF('p', 'pt', [contentWidth, contentHeight]) PDF.addImage(pageData, 'JPEG', 0, 0, contentWidth, contentHeight) PDF.save(_this.panelName + '.pdf') _this.$emit('closePreExport') diff --git a/frontend/src/views/panel/list/PanelViewShow.vue b/frontend/src/views/panel/list/PanelViewShow.vue index 4a662aea1d..f934f6be10 100644 --- a/frontend/src/views/panel/list/PanelViewShow.vue +++ b/frontend/src/views/panel/list/PanelViewShow.vue @@ -75,7 +75,7 @@
- +