From f7baf763ebb707aa754fce5478b6fb2d4fd3efd4 Mon Sep 17 00:00:00 2001 From: ulleo Date: Tue, 31 Oct 2023 17:29:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=BC=96=E8=BE=91=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E4=B8=8B=EF=BC=8C=E4=BF=AE=E6=94=B9=E5=9B=BE=E8=A1=A8=E6=A0=87?= =?UTF-8?q?=E9=A2=98=E5=90=8E=E5=AF=BC=E5=87=BA=EF=BC=8Cexcel=E6=A0=87?= =?UTF-8?q?=E9=A2=98=E6=B2=A1=E6=9C=89=E8=B7=9F=E9=9A=8F=E5=8F=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #6406 --- .../components/canvas/components/editor/EditBar.vue | 2 +- .../src/components/canvas/customComponent/UserView.vue | 3 +++ core/frontend/src/components/canvas/utils/utils.js | 10 +++++----- core/frontend/src/views/chart/view/ChartEdit.vue | 1 + 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/core/frontend/src/components/canvas/components/editor/EditBar.vue b/core/frontend/src/components/canvas/components/editor/EditBar.vue index 0a84e82b21..177d829c00 100644 --- a/core/frontend/src/components/canvas/components/editor/EditBar.vue +++ b/core/frontend/src/components/canvas/components/editor/EditBar.vue @@ -145,7 +145,7 @@ :target="curComponent.hyperlinks.openMode " :href="curComponent.hyperlinks.content " > - + diff --git a/core/frontend/src/components/canvas/customComponent/UserView.vue b/core/frontend/src/components/canvas/customComponent/UserView.vue index 912fe84097..6f91a6c50a 100644 --- a/core/frontend/src/components/canvas/customComponent/UserView.vue +++ b/core/frontend/src/components/canvas/customComponent/UserView.vue @@ -566,6 +566,9 @@ export default { }, 'chart.yaxis': function(newVal, oldVal) { this.$emit('fill-chart-2-parent', this.chart) + }, + 'chart.title': function(newVal, oldVal) { + this.$emit('fill-chart-2-parent', this.chart) } }, mounted() { diff --git a/core/frontend/src/components/canvas/utils/utils.js b/core/frontend/src/components/canvas/utils/utils.js index d27463c4e6..b33101930f 100644 --- a/core/frontend/src/components/canvas/utils/utils.js +++ b/core/frontend/src/components/canvas/utils/utils.js @@ -221,7 +221,7 @@ export function checkViewTitle(opt, id, tile) { } } -export function exportImg(imgName,callback) { +export function exportImg(imgName, callback) { const canvasID = document.getElementById('chartCanvas') const a = document.createElement('a') html2canvas(canvasID).then(canvas => { @@ -387,12 +387,12 @@ export function insertBatchTreeNode(nodeInfoArray, tree) { export function updateCacheTree(opt, treeName, nodeInfoFull, tree) { const nodeInfo = deepCopy(nodeInfoFull) - if( nodeInfo instanceof Array){ - nodeInfo.forEach(item=>{ + if (nodeInfo instanceof Array) { + nodeInfo.forEach(item => { delete item.panelData delete item.panelStyle }) - }else{ + } else { delete nodeInfo.panelData delete nodeInfo.panelStyle } @@ -443,7 +443,7 @@ export function exportExcelDownload(chart, snapshot, width, height, loadingWrapp const excelTypes = fields.map(item => item.deType) const excelHeaderKeys = fields.map(item => item.dataeaseName) let excelData = tableRow.map(item => excelHeaderKeys.map(i => item[i])) - const excelName = chart.name + const excelName = chart.title ? chart.title : chart.name let detailFields = [] if (chart.data.detailFields?.length) { detailFields = chart.data.detailFields.map(item => { diff --git a/core/frontend/src/views/chart/view/ChartEdit.vue b/core/frontend/src/views/chart/view/ChartEdit.vue index 3cd0d5dd38..e6e78e5274 100644 --- a/core/frontend/src/views/chart/view/ChartEdit.vue +++ b/core/frontend/src/views/chart/view/ChartEdit.vue @@ -24,6 +24,7 @@ @hide="hideTab" >