fix(仪表板): 导出权限优化

This commit is contained in:
wangjiahao 2024-06-05 17:11:12 +08:00
parent d3a79af605
commit 0505497b27

View File

@ -9,7 +9,7 @@
>
<div class="export-button">
<el-select
v-if="optType === 'enlarge' && dvInfo.weight > 3"
v-if="optType === 'enlarge' && authShow"
v-model="pixel"
class="pixel-select"
size="small"
@ -26,7 +26,7 @@
<el-button
class="m-button"
v-if="optType === 'enlarge' && dvInfo.weight > 3"
v-if="optType === 'enlarge' && authShow"
link
icon="Download"
size="middle"
@ -36,7 +36,7 @@
</el-button>
<el-button
class="m-button"
v-if="optType === 'details' && dvInfo.weight > 3"
v-if="optType === 'details' && authShow"
link
icon="Download"
size="middle"
@ -45,7 +45,7 @@
>
导出Excel
</el-button>
<el-divider class="close-divider" direction="vertical" />
<el-divider class="close-divider" direction="vertical" v-if="authShow" />
</div>
<div
v-loading="downLoading"
@ -98,7 +98,7 @@ const viewContainer = ref(null)
const { t } = useI18n()
const optType = ref(null)
const chartComponentDetails = ref(null)
const { dvInfo } = storeToRefs(dvMainStore)
const { dvInfo, editMode } = storeToRefs(dvMainStore)
const exportLoading = ref(false)
const sourceViewType = ref()
const DETAIL_TABLE_ATTR: DeepPartial<ChartObj> = {
@ -120,6 +120,8 @@ const DETAIL_TABLE_ATTR: DeepPartial<ChartObj> = {
}
}
const authShow = computed(() => editMode.value === 'edit' || dvInfo.value.weight > 3)
const customExport = computed(() => {
if (downLoading.value) {
const bashStyle = pixel.value.split(' * ')