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