parent
9da4050b71
commit
af4a5f83ae
@ -993,14 +993,11 @@ export default {
|
|||||||
if (this.chart.type === 'map' && this.scaleCoefficientType === 'mobile') {
|
if (this.chart.type === 'map' && this.scaleCoefficientType === 'mobile') {
|
||||||
customAttrChart.label.show = false
|
customAttrChart.label.show = false
|
||||||
}
|
}
|
||||||
const data = this.chart.data
|
|
||||||
delete this.chart.data
|
|
||||||
this.chart = {
|
this.chart = {
|
||||||
...this.chart,
|
...this.chart,
|
||||||
customAttr: JSON.stringify(customAttrChart),
|
customAttr: JSON.stringify(customAttrChart),
|
||||||
customStyle: JSON.stringify(customStyleChart)
|
customStyle: JSON.stringify(customStyleChart)
|
||||||
}
|
}
|
||||||
this.chart.data = data
|
|
||||||
},
|
},
|
||||||
getData(id, cache = true, dataBroadcast = false) {
|
getData(id, cache = true, dataBroadcast = false) {
|
||||||
if (this.requestStatus === 'waiting') {
|
if (this.requestStatus === 'waiting') {
|
||||||
@ -1060,12 +1057,8 @@ export default {
|
|||||||
try {
|
try {
|
||||||
// 将视图传入echart组件
|
// 将视图传入echart组件
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
const data = response.data.data
|
|
||||||
delete response.data.data
|
|
||||||
this.chart = response.data
|
this.chart = response.data
|
||||||
this.view = response.data
|
this.view = response.data
|
||||||
this.chart.data = data
|
|
||||||
this.view.data = data
|
|
||||||
this.$store.commit('setLastViewRequestInfo', { viewId: id, requestInfo: requestInfo })
|
this.$store.commit('setLastViewRequestInfo', { viewId: id, requestInfo: requestInfo })
|
||||||
this.buildInnerRefreshTimer(this.chart.refreshViewEnable, this.chart.refreshUnit, this.chart.refreshTime)
|
this.buildInnerRefreshTimer(this.chart.refreshViewEnable, this.chart.refreshUnit, this.chart.refreshTime)
|
||||||
this.$emit('fill-chart-2-parent', this.chart)
|
this.$emit('fill-chart-2-parent', this.chart)
|
||||||
|
|||||||
@ -504,6 +504,19 @@ export function exportExcelDownload(chart, snapshot, width, height, loadingWrapp
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
if (chart.render === 'echarts' && chart.type === 'table-normal') {
|
||||||
|
const initTotal = fields.map(i => [2, 3].includes(i.deType) ? 0 : undefined)
|
||||||
|
initTotal[0] = '合计'
|
||||||
|
tableRow.reduce((p, n) => {
|
||||||
|
p.forEach((v, i) => {
|
||||||
|
if (!isNaN(v)) {
|
||||||
|
p[i] = v + n[excelHeaderKeys[i]]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return p
|
||||||
|
}, initTotal)
|
||||||
|
excelData.push(initTotal)
|
||||||
|
}
|
||||||
const request = {
|
const request = {
|
||||||
proxy: null,
|
proxy: null,
|
||||||
viewId: chart.id,
|
viewId: chart.id,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user