refactor(视图): 模版视图禁用导出明细防止报错

This commit is contained in:
wangjiahao 2024-05-08 12:08:54 +08:00
parent b6accf53e1
commit fe740e3cf8
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'
},
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() {
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>
<el-button
v-if="showChartInfoType==='details'&& hasDataPermission('export',panelInfo.privileges)"
v-if="showChartInfoType==='details'&& this.showChartInfo.dataFrom !== 'template' && hasDataPermission('export',panelInfo.privileges)"
size="mini"
:disabled="$store.getters.loadingMap[$store.getters.currentPath]"
@click="exportExcel"
@ -170,7 +170,7 @@
/>{{ $t('chart.export') }}Excel
</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"
:disabled="$store.getters.loadingMap[$store.getters.currentPath] || dialogLoading"
@click="exportSourceDetails"

View File

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