forked from github/dataease
Merge pull request #6455 from ulleo/dev
fix: 编辑页面下,修改图表标题后导出,excel标题没有跟随变化
This commit is contained in:
commit
4f5e3df611
@ -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>
|
||||
|
||||
|
@ -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() {
|
||||
|
@ -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 => {
|
||||
|
@ -24,6 +24,7 @@
|
||||
@hide="hideTab"
|
||||
>
|
||||
<dataset-chart-detail
|
||||
v-if="tabStatus"
|
||||
type="chart"
|
||||
:data="view"
|
||||
:tab-status="tabStatus"
|
||||
|
Loading…
Reference in New Issue
Block a user