forked from github/dataease
Merge pull request #9794 from dataease/pr@dev-v2@fix_excel-export
fix(图表): 修复部分图表到处excel无内容或者缺少内容问题 #9676
This commit is contained in:
commit
cb66451316
@ -8,7 +8,7 @@
|
||||
trigger="click"
|
||||
>
|
||||
<div class="export-button">
|
||||
<el-select v-model="pixel" class="pixel-select" size="small">
|
||||
<el-select v-if="optType === 'enlarge'" v-model="pixel" class="pixel-select" size="small">
|
||||
<el-option-group v-for="group in pixelOptions" :key="group.label" :label="group.label">
|
||||
<el-option
|
||||
v-for="item in group.options"
|
||||
@ -93,6 +93,7 @@ const optType = ref(null)
|
||||
const chartComponentDetails = ref(null)
|
||||
const { dvInfo } = storeToRefs(dvMainStore)
|
||||
const exportLoading = ref(false)
|
||||
const sourceViewType = ref()
|
||||
const DETAIL_TABLE_ATTR: DeepPartial<ChartObj> = {
|
||||
render: 'antv',
|
||||
type: 'table-info',
|
||||
@ -163,6 +164,7 @@ const pixelOptions = [
|
||||
}
|
||||
]
|
||||
const dialogInit = (canvasStyle, view, item, opt) => {
|
||||
sourceViewType.value = view.type
|
||||
optType.value = opt
|
||||
dialogShow.value = true
|
||||
viewInfo.value = deepCopy(view) as DeepPartial<ChartObj>
|
||||
@ -191,7 +193,12 @@ const downloadViewImage = () => {
|
||||
const downloadViewDetails = () => {
|
||||
const viewDataInfo = dvMainStore.getViewDataDetails(viewInfo.value.id)
|
||||
const chartExtRequest = dvMainStore.getLastViewRequestInfo(viewInfo.value.id)
|
||||
const chart = { ...viewInfo.value, chartExtRequest, data: viewDataInfo }
|
||||
const chart = {
|
||||
...viewInfo.value,
|
||||
chartExtRequest,
|
||||
data: viewDataInfo,
|
||||
type: sourceViewType.value
|
||||
}
|
||||
exportLoading.value = true
|
||||
exportExcelDownload(chart, () => {
|
||||
exportLoading.value = false
|
||||
|
Loading…
Reference in New Issue
Block a user