diff --git a/nezha-fronted/src/components/chart/chart/chartTable.vue b/nezha-fronted/src/components/chart/chart/chartTable.vue index 461dc7f9b..39a12a1d9 100644 --- a/nezha-fronted/src/components/chart/chart/chartTable.vue +++ b/nezha-fronted/src/components/chart/chart/chartTable.vue @@ -168,6 +168,7 @@ export default { obj[column.title + 'mapping'] = '' if (this.chartInfo.param.enable && this.chartInfo.param.enable.valueMapping) { valueMapping[column.title].forEach(item => { + // const rowValue = row.display[column.title + 'display'] const rowValue = row.display[column.title + 'display'] if (item.type === 'value') { if (rowValue == item.value) { diff --git a/nezha-fronted/src/components/chart/chartList.vue b/nezha-fronted/src/components/chart/chartList.vue index d4873ab9e..94ed9f159 100644 --- a/nezha-fronted/src/components/chart/chartList.vue +++ b/nezha-fronted/src/components/chart/chartList.vue @@ -3,6 +3,7 @@ 0) { - PDF.addImage(pageData, 'JPEG', 20, position, imgWidth, imgHeight) + PDF.addImage(pageData, 'JPEG', 0, position, imgWidth, imgHeight) leftHeight -= pageHeight position -= 841.89 if (leftHeight > 0) { diff --git a/nezha-fronted/src/components/common/mixin/htmlToPdfMixin.js b/nezha-fronted/src/components/common/mixin/htmlToPdfMixin.js index 03048022a..671296323 100644 --- a/nezha-fronted/src/components/common/mixin/htmlToPdfMixin.js +++ b/nezha-fronted/src/components/common/mixin/htmlToPdfMixin.js @@ -1,3 +1,13 @@ export default { - + methods: { + htmlToPdf () { + const dom = document.getElementsByClassName(this.pdfId)[0] + if (dom) { + this.showScreenLoading(true) + this.getPdf(dom) + } else { + this.showScreenLoading(false) + } + } + } } diff --git a/nezha-fronted/src/components/page/dashboard/panel.vue b/nezha-fronted/src/components/page/dashboard/panel.vue index fd67db3f8..2f43533e7 100644 --- a/nezha-fronted/src/components/page/dashboard/panel.vue +++ b/nezha-fronted/src/components/page/dashboard/panel.vue @@ -1,5 +1,5 @@ @@ -84,7 +84,7 @@
-
+
--> { document.body.style.height = 'auto' - document.getElementsByTagName('html')[0].style.overflow = 'visible' + // document.getElementsByTagName('html')[0].style.overflow = 'visible' const position = dom.getBoundingClientRect() + console.log(position) this.getPdf(dom, -1 * position.left, -1 * position.top) - }, 500) + // this.getPdf(dom, 0, 0) + }, 2000) } }, 200) } else {