feat(X-Pack): 导出API权限独立控制 #12840

This commit is contained in:
fit2cloud-chenyw
2024-11-16 13:23:12 +08:00
parent 13db420043
commit 99077ef048
15 changed files with 61 additions and 21 deletions

View File

@@ -173,7 +173,6 @@
v-if="
!['picture-group', 'rich-text'].includes(element.innerType) &&
barShowCheck('previewDownload') &&
authShow &&
showDownload &&
(exportPermissions[0] || exportPermissions[1])
"
@@ -242,7 +241,6 @@ const dvMainStore = dvMainStoreWithOut()
const snapshotStore = snapshotStoreWithOut()
const copyStore = copyStoreWithOut()
const customTabsSortRef = ref(null)
const authShow = computed(() => !dvInfo.value.weight || dvInfo.value.weight > 3)
const exportPermissions = computed(() =>
exportPermission(dvInfo.value['weight'], dvInfo.value['ext'])
)

View File

@@ -73,7 +73,11 @@
>
<span>导出Excel(带格式)</span>
</el-button>
<el-divider class="close-divider" direction="vertical" v-if="authShow" />
<el-divider
class="close-divider"
direction="vertical"
v-if="exportPermissions[0] || exportPermissions[1] || exportPermissions[2]"
/>
</div>
<div
v-loading="downLoading"
@@ -212,8 +216,6 @@ const DETAIL_TABLE_ATTR: DeepPartial<ChartObj> = {
showPosition: 'dialog'
}
const authShow = computed(() => editMode.value === 'edit' || dvInfo.value.weight > 3)
const exportPermissions = computed(() =>
exportPermission(dvInfo.value['weight'], dvInfo.value['ext'])
)
@@ -337,7 +339,8 @@ const downloadViewDetails = (downloadType = 'view') => {
chartExtRequest,
data: viewDataInfo,
type: sourceViewType.value,
downloadType: downloadType
downloadType: downloadType,
busiFlag: dvInfo.value.type
}
exportLoading.value = true
exportExcelDownload(chart, () => {