forked from github/dataease
Merge pull request #12325 from dataease/pr@dev-v2@refactor_download2
refactor(数据大屏、仪表板): 模板图表禁用导出
This commit is contained in:
commit
73d1e44f9c
@ -118,7 +118,7 @@
|
||||
>
|
||||
<el-dropdown-item
|
||||
style="padding: 0"
|
||||
v-if="element.innerType !== 'rich-text' && barShowCheck('download')"
|
||||
v-if="element.innerType !== 'rich-text' && barShowCheck('download') && showDownload"
|
||||
@click.prevent
|
||||
>
|
||||
<el-dropdown style="width: 100%" trigger="hover" placement="right-start">
|
||||
@ -161,7 +161,12 @@
|
||||
<el-dropdown
|
||||
trigger="click"
|
||||
placement="right-start"
|
||||
v-if="element.innerType !== 'rich-text' && barShowCheck('previewDownload') && authShow"
|
||||
v-if="
|
||||
element.innerType !== 'rich-text' &&
|
||||
barShowCheck('previewDownload') &&
|
||||
authShow &&
|
||||
showDownload
|
||||
"
|
||||
>
|
||||
<el-icon @click="downloadClick" class="bar-base-icon">
|
||||
<el-tooltip :content="t('chart.export')" effect="dark" placement="bottom">
|
||||
@ -583,6 +588,8 @@ const initCurFields = () => {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const showDownload = computed(() => canvasViewInfo.value[element.value.id]?.dataFrom !== 'template')
|
||||
// 富文本-End
|
||||
|
||||
const datasetParamsSetShow = computed(() => {
|
||||
|
@ -41,7 +41,9 @@
|
||||
icon="Download"
|
||||
size="middle"
|
||||
:loading="exportLoading"
|
||||
:disabled="requestStore.loadingMap[permissionStore.currentPath] > 0"
|
||||
:disabled="
|
||||
requestStore.loadingMap[permissionStore.currentPath] > 0 || state.dataFrom === 'template'
|
||||
"
|
||||
@click="downloadViewDetails('view')"
|
||||
>
|
||||
导出Excel
|
||||
@ -54,7 +56,9 @@
|
||||
size="middle"
|
||||
:loading="exportLoading"
|
||||
@click="downloadViewDetails('dataset')"
|
||||
:disabled="requestStore.loadingMap[permissionStore.currentPath] > 0"
|
||||
:disabled="
|
||||
requestStore.loadingMap[permissionStore.currentPath] > 0 || state.dataFrom === 'template'
|
||||
"
|
||||
>
|
||||
导出原始明细
|
||||
</el-button>
|
||||
@ -196,7 +200,8 @@ const DETAIL_CHART_ATTR: DeepPartial<ChartObj> = {
|
||||
|
||||
const state = reactive({
|
||||
scale: 0.5,
|
||||
componentSourceType: null
|
||||
componentSourceType: null,
|
||||
dataFrom: null
|
||||
})
|
||||
const DETAIL_TABLE_ATTR: DeepPartial<ChartObj> = {
|
||||
senior: {
|
||||
@ -269,6 +274,7 @@ const dialogInit = (canvasStyle, view, item, opt, params = { scale: 0.5 }) => {
|
||||
optType.value = opt
|
||||
dialogShow.value = true
|
||||
state.componentSourceType = view.type
|
||||
state.dataFrom = view.dataFrom
|
||||
viewInfo.value = deepCopy(view) as DeepPartial<ChartObj>
|
||||
viewInfo.value.customStyle.text.show = false
|
||||
config.value = deepCopy(item)
|
||||
|
Loading…
Reference in New Issue
Block a user