Merge pull request #9529 from dataease/pr@dev@fix_view-export

refactor(视图): 模版视图禁用导出明细防止报错
This commit is contained in:
王嘉豪 2024-05-08 12:09:49 +08:00 committed by GitHub
commit bb3eeab399
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 5 deletions

View File

@ -296,7 +296,7 @@ export default {
return this.curComponent.type === 'view' && this.terminal === 'pc' && this.curComponent.propValue.innerType && this.curComponent.propValue.innerType !== 'richTextView' return this.curComponent.type === 'view' && this.terminal === 'pc' && this.curComponent.propValue.innerType && this.curComponent.propValue.innerType !== 'richTextView'
}, },
exportExcelShow() { exportExcelShow() {
return this.detailsShow && hasDataPermission('export', this.$store.state.panel.panelInfo.privileges) && this.chart return this.detailsShow && hasDataPermission('export', this.$store.state.panel.panelInfo.privileges) && this.chart && this.chart.dataFrom !== 'template'
}, },
enlargeShow() { enlargeShow() {
return this.curComponent.type === 'view' && this.curComponent.propValue.innerType && this.curComponent.propValue.innerType !== 'richTextView' && !this.curComponent.propValue.innerType.includes('table') return this.curComponent.type === 'view' && this.curComponent.propValue.innerType && this.curComponent.propValue.innerType !== 'richTextView' && !this.curComponent.propValue.innerType.includes('table')

View File

@ -159,7 +159,7 @@
</span> </span>
<el-button <el-button
v-if="showChartInfoType==='details'&& hasDataPermission('export',panelInfo.privileges)" v-if="showChartInfoType==='details'&& this.showChartInfo.dataFrom !== 'template' && hasDataPermission('export',panelInfo.privileges)"
size="mini" size="mini"
:disabled="$store.getters.loadingMap[$store.getters.currentPath]" :disabled="$store.getters.loadingMap[$store.getters.currentPath]"
@click="exportExcel" @click="exportExcel"
@ -170,7 +170,7 @@
/>{{ $t('chart.export') }}Excel />{{ $t('chart.export') }}Excel
</el-button> </el-button>
<el-button <el-button
v-if="showChartInfoType==='details' && !userId && hasDataPermission('export',panelInfo.privileges)" v-if="showChartInfoType==='details' && this.showChartInfo.dataFrom !== 'template' && !userId && hasDataPermission('export',panelInfo.privileges)"
size="mini" size="mini"
:disabled="$store.getters.loadingMap[$store.getters.currentPath] || dialogLoading" :disabled="$store.getters.loadingMap[$store.getters.currentPath] || dialogLoading"
@click="exportSourceDetails" @click="exportSourceDetails"

View File

@ -192,7 +192,7 @@
</span> </span>
<el-button <el-button
v-if="showChartInfoType==='details' && hasDataPermission('export',panelInfo.privileges)" v-if="showChartInfoType==='details' && chart.dataFrom !== 'template' && hasDataPermission('export',panelInfo.privileges)"
size="mini" size="mini"
:disabled="$store.getters.loadingMap[$store.getters.currentPath] || dialogLoading" :disabled="$store.getters.loadingMap[$store.getters.currentPath] || dialogLoading"
@click="exportExcel" @click="exportExcel"
@ -204,7 +204,7 @@
</el-button> </el-button>
<el-button <el-button
v-if="showChartInfoType==='details' && !userId && hasDataPermission('export',panelInfo.privileges)" v-if="showChartInfoType==='details' && chart.dataFrom !== 'template' && !userId && hasDataPermission('export',panelInfo.privileges)"
size="mini" size="mini"
:disabled="$store.getters.loadingMap[$store.getters.currentPath] || dialogLoading" :disabled="$store.getters.loadingMap[$store.getters.currentPath] || dialogLoading"
@click="exportSourceDetails" @click="exportSourceDetails"