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 "
|
:target="curComponent.hyperlinks.openMode "
|
||||||
:href="curComponent.hyperlinks.content "
|
:href="curComponent.hyperlinks.content "
|
||||||
>
|
>
|
||||||
<i class="icon iconfont icon-com-jump"/>
|
<i class="icon iconfont icon-com-jump" />
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
|
@ -566,6 +566,9 @@ export default {
|
|||||||
},
|
},
|
||||||
'chart.yaxis': function(newVal, oldVal) {
|
'chart.yaxis': function(newVal, oldVal) {
|
||||||
this.$emit('fill-chart-2-parent', this.chart)
|
this.$emit('fill-chart-2-parent', this.chart)
|
||||||
|
},
|
||||||
|
'chart.title': function(newVal, oldVal) {
|
||||||
|
this.$emit('fill-chart-2-parent', this.chart)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
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 canvasID = document.getElementById('chartCanvas')
|
||||||
const a = document.createElement('a')
|
const a = document.createElement('a')
|
||||||
html2canvas(canvasID).then(canvas => {
|
html2canvas(canvasID).then(canvas => {
|
||||||
@ -387,12 +387,12 @@ export function insertBatchTreeNode(nodeInfoArray, tree) {
|
|||||||
|
|
||||||
export function updateCacheTree(opt, treeName, nodeInfoFull, tree) {
|
export function updateCacheTree(opt, treeName, nodeInfoFull, tree) {
|
||||||
const nodeInfo = deepCopy(nodeInfoFull)
|
const nodeInfo = deepCopy(nodeInfoFull)
|
||||||
if( nodeInfo instanceof Array){
|
if (nodeInfo instanceof Array) {
|
||||||
nodeInfo.forEach(item=>{
|
nodeInfo.forEach(item => {
|
||||||
delete item.panelData
|
delete item.panelData
|
||||||
delete item.panelStyle
|
delete item.panelStyle
|
||||||
})
|
})
|
||||||
}else{
|
} else {
|
||||||
delete nodeInfo.panelData
|
delete nodeInfo.panelData
|
||||||
delete nodeInfo.panelStyle
|
delete nodeInfo.panelStyle
|
||||||
}
|
}
|
||||||
@ -443,7 +443,7 @@ export function exportExcelDownload(chart, snapshot, width, height, loadingWrapp
|
|||||||
const excelTypes = fields.map(item => item.deType)
|
const excelTypes = fields.map(item => item.deType)
|
||||||
const excelHeaderKeys = fields.map(item => item.dataeaseName)
|
const excelHeaderKeys = fields.map(item => item.dataeaseName)
|
||||||
let excelData = tableRow.map(item => excelHeaderKeys.map(i => item[i]))
|
let excelData = tableRow.map(item => excelHeaderKeys.map(i => item[i]))
|
||||||
const excelName = chart.name
|
const excelName = chart.title ? chart.title : chart.name
|
||||||
let detailFields = []
|
let detailFields = []
|
||||||
if (chart.data.detailFields?.length) {
|
if (chart.data.detailFields?.length) {
|
||||||
detailFields = chart.data.detailFields.map(item => {
|
detailFields = chart.data.detailFields.map(item => {
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
@hide="hideTab"
|
@hide="hideTab"
|
||||||
>
|
>
|
||||||
<dataset-chart-detail
|
<dataset-chart-detail
|
||||||
|
v-if="tabStatus"
|
||||||
type="chart"
|
type="chart"
|
||||||
:data="view"
|
:data="view"
|
||||||
:tab-status="tabStatus"
|
:tab-status="tabStatus"
|
||||||
|
Loading…
Reference in New Issue
Block a user