Merge pull request #6455 from ulleo/dev

fix: 编辑页面下,修改图表标题后导出,excel标题没有跟随变化
This commit is contained in:
ulleo 2023-10-31 17:29:52 +08:00 committed by GitHub
commit 4f5e3df611
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 6 deletions

View File

@ -145,7 +145,7 @@
:target="curComponent.hyperlinks.openMode "
:href="curComponent.hyperlinks.content "
>
<i class="icon iconfont icon-com-jump"/>
<i class="icon iconfont icon-com-jump" />
</a>
</span>

View File

@ -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() {

View File

@ -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 => {

View File

@ -24,6 +24,7 @@
@hide="hideTab"
>
<dataset-chart-detail
v-if="tabStatus"
type="chart"
:data="view"
:tab-status="tabStatus"