From da5c0479071c623e453e42d7267fa6a03aede47f Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Fri, 20 Sep 2024 12:27:53 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=95=B0=E6=8D=AE=E5=A4=A7=E5=B1=8F?= =?UTF-8?q?=E3=80=81=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E5=9B=BE=E8=A1=A8=E7=A6=81=E7=94=A8=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/visualization/ComponentEditBar.vue | 11 +++++++++-- .../src/components/visualization/UserViewEnlarge.vue | 12 +++++++++--- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/core/core-frontend/src/components/visualization/ComponentEditBar.vue b/core/core-frontend/src/components/visualization/ComponentEditBar.vue index 7a204e9091..3e4d986f08 100644 --- a/core/core-frontend/src/components/visualization/ComponentEditBar.vue +++ b/core/core-frontend/src/components/visualization/ComponentEditBar.vue @@ -118,7 +118,7 @@ > @@ -161,7 +161,12 @@ @@ -583,6 +588,8 @@ const initCurFields = () => { } } } + +const showDownload = computed(() => canvasViewInfo.value[element.value.id]?.dataFrom !== 'template') // 富文本-End const datasetParamsSetShow = computed(() => { diff --git a/core/core-frontend/src/components/visualization/UserViewEnlarge.vue b/core/core-frontend/src/components/visualization/UserViewEnlarge.vue index cde976af18..64cebc6cfe 100644 --- a/core/core-frontend/src/components/visualization/UserViewEnlarge.vue +++ b/core/core-frontend/src/components/visualization/UserViewEnlarge.vue @@ -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' + " > 导出原始明细 @@ -196,7 +200,8 @@ const DETAIL_CHART_ATTR: DeepPartial = { const state = reactive({ scale: 0.5, - componentSourceType: null + componentSourceType: null, + dataFrom: null }) const DETAIL_TABLE_ATTR: DeepPartial = { 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 viewInfo.value.customStyle.text.show = false config.value = deepCopy(item)