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"
|
trigger="click"
|
||||||
>
|
>
|
||||||
<div class="export-button">
|
<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-group v-for="group in pixelOptions" :key="group.label" :label="group.label">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in group.options"
|
v-for="item in group.options"
|
||||||
@ -93,6 +93,7 @@ const optType = ref(null)
|
|||||||
const chartComponentDetails = ref(null)
|
const chartComponentDetails = ref(null)
|
||||||
const { dvInfo } = storeToRefs(dvMainStore)
|
const { dvInfo } = storeToRefs(dvMainStore)
|
||||||
const exportLoading = ref(false)
|
const exportLoading = ref(false)
|
||||||
|
const sourceViewType = ref()
|
||||||
const DETAIL_TABLE_ATTR: DeepPartial<ChartObj> = {
|
const DETAIL_TABLE_ATTR: DeepPartial<ChartObj> = {
|
||||||
render: 'antv',
|
render: 'antv',
|
||||||
type: 'table-info',
|
type: 'table-info',
|
||||||
@ -163,6 +164,7 @@ const pixelOptions = [
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
const dialogInit = (canvasStyle, view, item, opt) => {
|
const dialogInit = (canvasStyle, view, item, opt) => {
|
||||||
|
sourceViewType.value = view.type
|
||||||
optType.value = opt
|
optType.value = opt
|
||||||
dialogShow.value = true
|
dialogShow.value = true
|
||||||
viewInfo.value = deepCopy(view) as DeepPartial<ChartObj>
|
viewInfo.value = deepCopy(view) as DeepPartial<ChartObj>
|
||||||
@ -191,7 +193,12 @@ const downloadViewImage = () => {
|
|||||||
const downloadViewDetails = () => {
|
const downloadViewDetails = () => {
|
||||||
const viewDataInfo = dvMainStore.getViewDataDetails(viewInfo.value.id)
|
const viewDataInfo = dvMainStore.getViewDataDetails(viewInfo.value.id)
|
||||||
const chartExtRequest = dvMainStore.getLastViewRequestInfo(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
|
exportLoading.value = true
|
||||||
exportExcelDownload(chart, () => {
|
exportExcelDownload(chart, () => {
|
||||||
exportLoading.value = false
|
exportLoading.value = false
|
||||||
|
Loading…
Reference in New Issue
Block a user